summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/vdso64/vdso64.lds.S
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2012-07-04 20:37:11 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-07-11 04:18:40 (GMT)
commit18ad51dd342a7eb09dbcd059d0b451b616d4dafc (patch)
tree94809605669eb3b5e4e049501958a2fa93ae2de7 /arch/powerpc/kernel/vdso64/vdso64.lds.S
parente6a74c6ea331b79c86e1898c504790b3dadc591d (diff)
downloadlinux-fsl-qoriq-18ad51dd342a7eb09dbcd059d0b451b616d4dafc.tar.xz
powerpc: Add VDSO version of getcpu
We have a request for a fast method of getting CPU and NUMA node IDs from userspace. This patch implements a getcpu VDSO function, similar to x86. Ben suggested we use SPRG3 which is userspace readable. SPRG3 can be modified by a KVM guest, so we save the SPRG3 value in the paca and restore it when transitioning from the guest to the host. I have a glibc patch that implements sched_getcpu on top of this. Testing on a POWER7: baseline: 538 cycles vdso: 30 cycles Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/vdso64/vdso64.lds.S')
-rw-r--r--arch/powerpc/kernel/vdso64/vdso64.lds.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/vdso64/vdso64.lds.S b/arch/powerpc/kernel/vdso64/vdso64.lds.S
index 0e61540..e6c1758 100644
--- a/arch/powerpc/kernel/vdso64/vdso64.lds.S
+++ b/arch/powerpc/kernel/vdso64/vdso64.lds.S
@@ -146,6 +146,7 @@ VERSION
__kernel_sync_dicache;
__kernel_sync_dicache_p5;
__kernel_sigtramp_rt64;
+ __kernel_getcpu;
local: *;
};