| 1 |
From 750bd41aeaeb1f0e0128aa4f8fcd6dd759713641 Mon Sep 17 00:00:00 2001 |
| 2 |
Message-ID: <750bd41aeaeb1f0e0128aa4f8fcd6dd759713641.1709892187.git.osandov@osandov.com> |
| 3 |
From: Nicholas Piggin <[email protected]> |
| 4 |
Date: Tue, 9 May 2023 19:15:59 +1000 |
| 5 |
Subject: [PATCH] powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n |
| 6 |
|
| 7 |
With JUMP_LABEL=n, hcall_tracepoint_refcount's address is being tested |
| 8 |
instead of its value. This results in the tracing slowpath always being |
| 9 |
taken unnecessarily. |
| 10 |
|
| 11 |
Fixes: 9a10ccb29c0a2 ("powerpc/pseries: move hcall_tracepoint_refcount out of .toc") |
| 12 |
Signed-off-by: Nicholas Piggin <[email protected]> |
| 13 |
Signed-off-by: Michael Ellerman <[email protected]> |
| 14 |
Link: https://msgid.link/[email protected] |
| 15 |
--- |
| 16 |
arch/powerpc/platforms/pseries/hvCall.S | 1 + |
| 17 |
1 file changed, 1 insertion(+) |
| 18 |
|
| 19 |
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S |
| 20 |
index 35254ac7af5e..ca0674b0b683 100644 |
| 21 |
--- a/arch/powerpc/platforms/pseries/hvCall.S |
| 22 |
+++ b/arch/powerpc/platforms/pseries/hvCall.S |
| 23 |
@@ -91,6 +91,7 @@ BEGIN_FTR_SECTION; \ |
| 24 |
b 1f; \ |
| 25 |
END_FTR_SECTION(0, 1); \ |
| 26 |
LOAD_REG_ADDR(r12, hcall_tracepoint_refcount) ; \ |
| 27 |
+ ld r12,0(r12); \ |
| 28 |
std r12,32(r1); \ |
| 29 |
cmpdi r12,0; \ |
| 30 |
bne- LABEL; \ |
| 31 |
-- |
| 32 |
2.44.0 |
| 33 |
|