* [PATCH] powerpc/pseries: move hcall_tracepoint_refcount out of .toc
@ 2022-09-26 5:38 Nicholas Piggin
2022-10-04 13:25 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Piggin @ 2022-09-26 5:38 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Nicholas Piggin
The .toc section is not really intended for arbitrary data. Writable
data in particular prevents making the TOC read-only after relocation.
Move hcall_tracepoint_refcount into the .data section.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
This is split out from "[v2,2/5] powerpc/64: asm use consistent global
variable declaration and access" because another series to make TOC
read-only depends on it. This patch decouples the two series.
Thanks,
Nick
arch/powerpc/platforms/pseries/hvCall.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S
index ab9fc6506861..762eb15d3bd4 100644
--- a/arch/powerpc/platforms/pseries/hvCall.S
+++ b/arch/powerpc/platforms/pseries/hvCall.S
@@ -16,7 +16,7 @@
#ifdef CONFIG_TRACEPOINTS
#ifndef CONFIG_JUMP_LABEL
- .section ".toc","aw"
+ .data
.globl hcall_tracepoint_refcount
hcall_tracepoint_refcount:
@@ -88,7 +88,7 @@ hcall_tracepoint_refcount:
BEGIN_FTR_SECTION; \
b 1f; \
END_FTR_SECTION(0, 1); \
- ld r12,hcall_tracepoint_refcount@toc(r2); \
+ LOAD_REG_ADDR(r12, hcall_tracepoint_refcount) ; \
std r12,32(r1); \
cmpdi r12,0; \
bne- LABEL; \
--
2.37.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/pseries: move hcall_tracepoint_refcount out of .toc
2022-09-26 5:38 [PATCH] powerpc/pseries: move hcall_tracepoint_refcount out of .toc Nicholas Piggin
@ 2022-10-04 13:25 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2022-10-04 13:25 UTC (permalink / raw)
To: Nicholas Piggin, linuxppc-dev
On Mon, 26 Sep 2022 15:38:23 +1000, Nicholas Piggin wrote:
> The .toc section is not really intended for arbitrary data. Writable
> data in particular prevents making the TOC read-only after relocation.
> Move hcall_tracepoint_refcount into the .data section.
>
>
Applied to powerpc/next.
[1/1] powerpc/pseries: move hcall_tracepoint_refcount out of .toc
https://git.kernel.org/powerpc/c/9a10ccb29c0a2befa5a9f691ed0ae37ee3e799a8
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-04 13:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 5:38 [PATCH] powerpc/pseries: move hcall_tracepoint_refcount out of .toc Nicholas Piggin
2022-10-04 13:25 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).