Re: [PATCH] parisc: Fix syscall restarts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2015-12-20, at 2:46 PM, John David Anglin wrote:

> I think we should fix syscall().  It's not used that much.

Attached is glibc fix.  Testing.

Dave
--
John David Anglin	dave.anglin@xxxxxxxx


diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.c b/sysdeps/unix/sysv/linux/hppa/syscall.c
index 958fa47..9c7ee4f 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscall.c
+++ b/sysdeps/unix/sysv/linux/hppa/syscall.c
@@ -48,8 +48,9 @@ syscall (long int __sysno, ...)
     PIC_REG_DEF
     LOAD_REGS_6
     asm volatile (SAVE_ASM_PIC
-		  "	ble  0x100(%%sr2, %%r0)	\n"
 		  "	copy %1, %%r20		\n"
+		  "	ble  0x100(%%sr2, %%r0)	\n"
+		  "	nop			\n"
 		  LOAD_ASM_PIC
 		  : "=r" (__res)
 		  : "r" (__sysno) PIC_REG_USE ASM_ARGS_6
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 2cae70f..cc16c1a 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -434,8 +434,9 @@ L(pre_end):					ASM_LINE_SEP	\
 		/* FIXME: HACK save/load r19 around syscall */		\
 		asm volatile(						\
 			SAVE_ASM_PIC					\
-			"	ble  0x100(%%sr2, %%r0)\n"		\
 			"	copy %1, %%r20\n"			\
+			"	ble  0x100(%%sr2, %%r0)\n"		\
+			"	nop\n"					\
 			LOAD_ASM_PIC					\
 			: "=r" (__res)					\
 			: "r" (name) PIC_REG_USE ASM_ARGS_##nr		\

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux