aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/vdso64/datapage.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-11-15 21:54:32 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-15 22:05:11 -0500
commit5d66da3d71e6aeca80ca08dbebd8a1cd72e6ee1f (patch)
tree1bdc54e617fc209925f33118f414ce0a4ebb62ac /arch/powerpc/kernel/vdso64/datapage.S
parentd3ed65832029dcaf5fe086670a2f2c25600b51e9 (diff)
[PATCH] powerpc: Make the vDSO functions set error code (#2)
The vDSO functions should have the same calling convention as a syscall. Unfortunately, they currently don't set the cr0.so bit which is used to indicate an error. This patch makes them clear this bit unconditionally since all functions currently succeed. The syscall fallback done by some of them will eventually override this if the syscall fails. This also changes the symbol version of all vdso exports to make sure glibc can differenciate between old and fixed calls for existing ones like __kernel_gettimeofday. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/vdso64/datapage.S')
-rw-r--r--arch/powerpc/kernel/vdso64/datapage.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S
index 6393e4137bc7..3b2dd7d0c1eb 100644
--- a/arch/powerpc/kernel/vdso64/datapage.S
+++ b/arch/powerpc/kernel/vdso64/datapage.S
@@ -54,12 +54,12 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
54 .cfi_startproc 54 .cfi_startproc
55 mflr r12 55 mflr r12
56 .cfi_register lr,r12 56 .cfi_register lr,r12
57
58 mr r4,r3 57 mr r4,r3
59 bl V_LOCAL_FUNC(__get_datapage) 58 bl V_LOCAL_FUNC(__get_datapage)
60 mtlr r12 59 mtlr r12
61 addi r3,r3,CFG_SYSCALL_MAP64 60 addi r3,r3,CFG_SYSCALL_MAP64
62 cmpli cr0,r4,0 61 cmpli cr0,r4,0
62 crclr cr0*4+so
63 beqlr 63 beqlr
64 li r0,__NR_syscalls 64 li r0,__NR_syscalls
65 stw r0,0(r4) 65 stw r0,0(r4)
@@ -80,6 +80,7 @@ V_FUNCTION_BEGIN(__kernel_get_tbfreq)
80 bl V_LOCAL_FUNC(__get_datapage) 80 bl V_LOCAL_FUNC(__get_datapage)
81 ld r3,CFG_TB_TICKS_PER_SEC(r3) 81 ld r3,CFG_TB_TICKS_PER_SEC(r3)
82 mtlr r12 82 mtlr r12
83 crclr cr0*4+so
83 blr 84 blr
84 .cfi_endproc 85 .cfi_endproc
85V_FUNCTION_END(__kernel_get_tbfreq) 86V_FUNCTION_END(__kernel_get_tbfreq)