summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/vdso32/vdso32.lds.S
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2019-12-02 07:57:27 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2020-01-23 21:31:14 +1100
commit902137ba8e469ed07c7f120a390161937a6288fb (patch)
tree031cb524d3cd71a32efe368600dbc1c2d93b9117 /arch/powerpc/kernel/vdso32/vdso32.lds.S
parent8c452a889821ca0cd2a5f2e3e87fbc01e56408cb (diff)
powerpc/32: Add VDSO version of getcpu on non SMP
Commit 18ad51dd342a ("powerpc: Add VDSO version of getcpu") added getcpu() for PPC64 only, by making use of a user readable general purpose SPR. PPC32 doesn't have any such SPR. For non SMP, just return CPU id 0 from the VDSO directly. PPC32 doesn't support CONFIG_NUMA so NUMA node is always 0. Before the patch, vdsotest reported: getcpu: syscall: 1572 nsec/call getcpu: libc: 1787 nsec/call getcpu: vdso: not tested Now, vdsotest reports: getcpu: syscall: 1582 nsec/call getcpu: libc: 502 nsec/call getcpu: vdso: 187 nsec/call Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/eaac4b6494ecff1811220fccc895bf282aab884a.1575273217.git.christophe.leroy@c-s.fr
Diffstat (limited to 'arch/powerpc/kernel/vdso32/vdso32.lds.S')
-rw-r--r--arch/powerpc/kernel/vdso32/vdso32.lds.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/vdso32/vdso32.lds.S b/arch/powerpc/kernel/vdso32/vdso32.lds.S
index 00c025ba4a92..5206c2eb2a1d 100644
--- a/arch/powerpc/kernel/vdso32/vdso32.lds.S
+++ b/arch/powerpc/kernel/vdso32/vdso32.lds.S
@@ -155,7 +155,7 @@ VERSION
__kernel_sync_dicache_p5;
__kernel_sigtramp32;
__kernel_sigtramp_rt32;
-#ifdef CONFIG_PPC64
+#if defined(CONFIG_PPC64) || !defined(CONFIG_SMP)
__kernel_getcpu;
#endif