Patch "powerpc/powernv: Fix opal_exit tracepoint opcode" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
powerpc/powernv: Fix opal_exit tracepoint opcode
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-powernv-fix-opal_exit-tracepoint-opcode.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
a7e0fb6c2029a780444d09560f739e020d54fe4dMon Sep 17 00:00:00 2001
From: Michael Ellerman <[email protected]>
Date: Tue, 7 Feb 2017 21:01:01 +1100
Subject: powerpc/powernv: Fix opal_exit tracepoint opcode
From: Michael Ellerman <[email protected]>
commit a7e0fb6c2029a780444d09560f739e020d54fe4d upstream.
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
--- arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/powernv/opal-wrappers.S +1 -1
@@ -146,7 +146,7 @@ opal_tracepoint_entry: opal_tracepoint_return: std r3,STK_REG(R31)(r1) mr r4,r3 - ld r0,STK_REG(R23)(r1) + ld r3,STK_REG(R23)(r1) bl __trace_opal_exit ld r3,STK_REG(R31)(r1) addi r1,r1,STACKFRAMESIZE
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/powerpc-mm-fixup-wrong-lpcr_vrmasd-value.patch queue-4.9/powerpc-correctly-disable-latent-entropy-gcc-plugin-on-prom_init.o.patch queue-4.9/powerpc-ftrace-fix-confusing-help-text-for-disable_mprofile_kernel.patch queue-4.9/powerpc-powernv-fix-opal_exit-tracepoint-opcode.patch