Skip to content

Commit 61d7ebe

Browse files
npigginmpe
authored andcommitted
powerpc/pseries: Remove unused hcall tracing instruction
When JUMP_LABEL=n, the tracepoint refcount test in the pre-call stores the refcount value to the stack, so the same value can be used for the post-call (presumably to avoid racing with the value concurrently changing). On little-endian (ELFv2) that might have just worked by luck, because 32(r1) is STK_PARAM(R3) there and so the value save gets clobbered by the tracing code when it's non-zero, but fortunately r3 is the hcall number and 0 is an invalid hcall number so it should get clobbered by another non-zero value. In any case, commit cc1adb5 ("powerpc/pseries: Use jump labels for hcall tracepoints") removed the code that actually used the value stored, so now it's just dead code. It's fragile to be storing to the stack like this, and confusing. Better remove it. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230509091600.70994-2-npiggin@gmail.com
1 parent 750bd41 commit 61d7ebe

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

arch/powerpc/platforms/pseries/hvCall.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ BEGIN_FTR_SECTION; \
9292
END_FTR_SECTION(0, 1); \
9393
LOAD_REG_ADDR(r12, hcall_tracepoint_refcount) ; \
9494
ld r12,0(r12); \
95-
std r12,32(r1); \
9695
cmpdi r12,0; \
9796
bne- LABEL; \
9897
1:

0 commit comments

Comments
 (0)