1. 01 May, 2016 35 commits
  2. 27 Apr, 2016 1 commit
  3. 26 Apr, 2016 4 commits
    • Thiago Jung Bauermann's avatar
      ftrace: Match dot symbols when searching functions on ppc64 · 7132e2d6
      Thiago Jung Bauermann authored
      In the ppc64 big endian ABI, function symbols point to function
      descriptors. The symbols which point to the function entry points
      have a dot in front of the function name. Consequently, when the
      ftrace filter mechanism searches for the symbol corresponding to
      an entry point address, it gets the dot symbol.
      
      As a result, ftrace filter users have to be aware of this ABI detail on
      ppc64 and prepend a dot to the function name when setting the filter.
      
      The perf probe command insulates the user from this by ignoring the dot
      in front of the symbol name when matching function names to symbols,
      but the sysfs interface does not. This patch makes the ftrace filter
      mechanism do the same when searching symbols.
      
      Fixes the following failure in ftracetest's kprobe_ftrace.tc:
      
        .../kprobe_ftrace.tc: line 9: echo: write error: Invalid argument
      
      That failure is on this line of kprobe_ftrace.tc:
      
        echo _do_fork > set_ftrace_filter
      
      This is because there's no _do_fork entry in the functions list:
      
        # cat available_filter_functions | grep _do_fork
        ._do_fork
      
      This change introduces no regressions on the perf and ftracetest
      testsuite results.
      
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarThiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      7132e2d6
    • Daniel Axtens's avatar
      powerpc: rework sparse for lib/xor_vmx.c · 8fe08885
      Daniel Axtens authored
      Sparse doesn't seem to be passing -maltivec around properly, leading
      to lots of errors:
      
      .../include/altivec.h:34:2: error: Use the "-maltivec" flag to enable PowerPC AltiVec support
      arch/powerpc/lib/xor_vmx.c:27:16: error: Expected ; at end of declaration
      arch/powerpc/lib/xor_vmx.c:27:16: error: got signed
      arch/powerpc/lib/xor_vmx.c:60:9: error: No right hand side of '*'-expression
      arch/powerpc/lib/xor_vmx.c:60:9: error: Expected ; at end of statement
      arch/powerpc/lib/xor_vmx.c:60:9: error: got v1_in
      ...
      arch/powerpc/lib/xor_vmx.c:87:9: error: too many errors
      
      Only include the altivec.h header for non-__CHECKER__ builds.
      For builds with __CHECKER__, make up some stubs instead, as
      suggested by Balbir. (The vector size of 16 is arbitrary.)
      Suggested-by: default avatarBalbir Singh <bsingharora@gmail.com>
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Tested-by: default avatarBalbir Singh <bsingharora@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      8fe08885
    • Chris Smart's avatar
      powerpc: Add support for userspace P9 copy paste · 8a649045
      Chris Smart authored
      The copy paste facility introduced in POWER9 provides an optimised
      mechanism for a userspace application to copy a cacheline. This is
      provided by a pair of instructions, copy and paste, while a third,
      cp_abort (copy paste abort), provides a clean up of the state in case of
      a failure.
      
      The copy instruction will read a 128 byte cacheline and store it in an
      internal buffer. The subsequent paste instruction will store this
      internal buffer to memory and set a CR field if the paste succeeds.
      
      Since the state of the copy paste buffer is internal (and not
      architecturally visible), in the unlikely event of a context switch, the
      state cannot be stored and the paste should therefore fail.
      
      The cp_abort instruction exists to fail and clean up any such
      interrupted copy paste sequence and is to be called by the kernel as
      part of the context switch. Doing so prevents data from a preceding copy
      in one process leaking into the paste of another.
      
      This code enables use of the cp_abort instruction if a supported
      processor is detected.
      
      NOTE: this is for userspace only, not in kernel, and does not deal
      with KVM guests.
      
      Patch created with much assistance from Michael Neuling
      <mikey@neuling.org>
      Signed-off-by: default avatarChris Smart <chris@distroguy.com>
      Reviewed-by: default avatarCyril Bur <cyrilbur@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      8a649045
    • Andrew Donnellan's avatar
      powerpc/mpic: handle subsys_system_register() failure · 4ad5e883
      Andrew Donnellan authored
      mpic_init_sys() currently doesn't check whether
      subsys_system_register() succeeded or not. Check the return code of
      subsys_system_register() and clean up if there's an error.
      Signed-off-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      4ad5e883