[PATCH] ppc64: Fix return value of some vDSO calls

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Apr 28 10:23:11 EST 2005


Hi !

The ppc vDSO would not properly clear the return value for some calls,
which will be a problem when interfacing those calls with glibc. This
should be fixed before 2.6.12 is released (as it is the first kernel
with the ppc vDSO) so that we don't have to play with symbol versioning
and ugly workarounds.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>

Index: linux-work/arch/ppc64/kernel/vdso32/cacheflush.S
===================================================================
--- linux-work.orig/arch/ppc64/kernel/vdso32/cacheflush.S	2005-03-07 10:22:15.000000000 +1100
+++ linux-work/arch/ppc64/kernel/vdso32/cacheflush.S	2005-04-28 10:20:05.000000000 +1000
@@ -47,6 +47,7 @@
 	addi	r6,r6,128
 	bdnz	1b
 	isync
+	li	r3,0
 	blr
   .cfi_endproc
 V_FUNCTION_END(__kernel_sync_dicache)
@@ -59,6 +60,7 @@
   .cfi_startproc
 	sync
 	isync
+	li	r3,0
 	blr
   .cfi_endproc
 V_FUNCTION_END(__kernel_sync_dicache_p5)
Index: linux-work/arch/ppc64/kernel/vdso64/cacheflush.S
===================================================================
--- linux-work.orig/arch/ppc64/kernel/vdso64/cacheflush.S	2005-03-07 10:22:15.000000000 +1100
+++ linux-work/arch/ppc64/kernel/vdso64/cacheflush.S	2005-04-28 10:19:58.000000000 +1000
@@ -47,6 +47,7 @@
 	addi	r6,r6,128
 	bdnz	1b
 	isync
+	li	r3,0
 	blr
   .cfi_endproc
 V_FUNCTION_END(__kernel_sync_dicache)
@@ -59,6 +60,7 @@
   .cfi_startproc
 	sync
 	isync
+	li	r3,0
 	blr
   .cfi_endproc
 V_FUNCTION_END(__kernel_sync_dicache_p5)
Index: linux-work/arch/ppc64/kernel/vdso32/gettimeofday.S
===================================================================
--- linux-work.orig/arch/ppc64/kernel/vdso32/gettimeofday.S	2005-03-10 13:43:01.000000000 +1100
+++ linux-work/arch/ppc64/kernel/vdso32/gettimeofday.S	2005-04-28 10:18:48.000000000 +1000
@@ -58,6 +58,7 @@
 	stw	r5,TZONE_TZ_DSTTIME(r11)
 
 1:	mtlr	r12
+	li	r3,0
 	blr
 
 2:	mr	r3,r10





More information about the Linuxppc64-dev mailing list