Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfe5fda8 authored by Anton Blanchard's avatar Anton Blanchard Committed by Michael Ellerman
Browse files

powernv: Fix OPAL tracepoint code



Patch c49f6353 ("powernv: Add OPAL tracepoints") has a spurious
store to the stack:

	ld      r12,opal_tracepoint_refcount@toc(r2);           \
	std     r12,32(r1);                                     \

The store was originally used to save the current tracepoint status
so the entry and the exit tracepoints were always balanced. In the
end I just created a separate path when tracepoints are enabled.

The offset on the stack used for this store is not valid for ABIv2
and it causes strange issues. I noticed it because OPAL console input
was broken.

Fixes: c49f6353 ("powernv: Add OPAL tracepoints")
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent eaa27f34
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -40,7 +40,6 @@ BEGIN_FTR_SECTION; \
	b	1f;						\
	b	1f;						\
END_FTR_SECTION(0, 1);						\
END_FTR_SECTION(0, 1);						\
	ld	r12,opal_tracepoint_refcount@toc(r2);		\
	ld	r12,opal_tracepoint_refcount@toc(r2);		\
	std	r12,32(r1);					\
	cmpdi	r12,0;						\
	cmpdi	r12,0;						\
	bne-	LABEL;						\
	bne-	LABEL;						\
1:
1: