]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Fix opal_exit tracepoint opcode
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 Feb 2017 10:01:01 +0000 (21:01 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 10 Feb 2017 02:40:22 +0000 (13:40 +1100)
commit0e9db4d0020415a0db1b8aecbd86009a45b35668
tree95f85a62fb4d13ed13f4f3b84d58c611830f2de2
parent73269e0bc5f283a5732fd45a309754503b645ccc
powerpc/powernv: Fix opal_exit tracepoint opcode

Currently the opal_exit tracepoint usually shows the opcode as 0:

  <idle>-0     [047] d.h.   635.654292: opal_entry: opcode=63
  <idle>-0     [047] d.h.   635.654296: opal_exit: opcode=0 retval=0
  kopald-1209  [019] d...   636.420943: opal_entry: opcode=10
  kopald-1209  [019] d...   636.420959: opal_exit: opcode=0 retval=0

This is because we incorrectly load the opcode into r0 before calling
__trace_opal_exit(), whereas it expects the opcode in r3 (first function
parameter). In fact we are leaving the retval in r3, so opcode and
retval will always show the same value.

Instead load the opcode into r3, resulting in:

  <idle>-0     [040] d.h.   636.618625: opal_entry: opcode=63
  <idle>-0     [040] d.h.   636.618627: opal_exit: opcode=63 retval=0

Fixes: 9b92db512268 ("powernv: Add OPAL tracepoints")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal-wrappers.S