Re: [PATCH] x86: kill sys32_pause

Previous thread: [git pull] drm debug message downgrade. by Dave Airlie on Sunday, August 31, 2008 - 4:00 pm. (1 message)

Next thread: Re: md (regression): reboot/shutdown hangs by Neil Brown on Sunday, August 31, 2008 - 7:17 pm. (3 messages)
From: Christoph Hellwig
Date: Sunday, August 31, 2008 - 6:39 pm

It's just a duplicate of the native sys_pause.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/arch/x86/ia32/sys_ia32.c
===================================================================
--- linux-2.6.orig/arch/x86/ia32/sys_ia32.c	2008-08-22 12:48:34.000000000 -0300
+++ linux-2.6/arch/x86/ia32/sys_ia32.c	2008-08-22 12:48:40.000000000 -0300
@@ -556,15 +556,6 @@ asmlinkage long sys32_rt_sigqueueinfo(in
 	return ret;
 }
 
-/* These are here just in case some old ia32 binary calls it. */
-asmlinkage long sys32_pause(void)
-{
-	current->state = TASK_INTERRUPTIBLE;
-	schedule();
-	return -ERESTARTNOHAND;
-}
-
-
 #ifdef CONFIG_SYSCTL_SYSCALL
 struct sysctl_ia32 {
 	unsigned int	name;
Index: linux-2.6/arch/ia64/ia32/ia32_entry.S
===================================================================
--- linux-2.6.orig/arch/ia64/ia32/ia32_entry.S	2008-08-22 12:49:25.000000000 -0300
+++ linux-2.6/arch/ia64/ia32/ia32_entry.S	2008-08-22 12:49:29.000000000 -0300
@@ -202,7 +202,7 @@ ia32_syscall_table:
 	data8 sys32_ptrace
 	data8 sys32_alarm
 	data8 sys_ni_syscall
-	data8 sys32_pause
+	data8 sys_pause
 	data8 compat_sys_utime	  /* 30 */
 	data8 sys_ni_syscall	  /* old stty syscall holder */
 	data8 sys_ni_syscall	  /* old gtty syscall holder */
Index: linux-2.6/arch/ia64/ia32/sys_ia32.c
===================================================================
--- linux-2.6.orig/arch/ia64/ia32/sys_ia32.c	2008-08-22 12:49:33.000000000 -0300
+++ linux-2.6/arch/ia64/ia32/sys_ia32.c	2008-08-22 12:49:37.000000000 -0300
@@ -1795,14 +1795,6 @@ out:
 }
 
 asmlinkage int
-sys32_pause (void)
-{
-	current->state = TASK_INTERRUPTIBLE;
-	schedule();
-	return -ERESTARTNOHAND;
-}
-
-asmlinkage int
 sys32_msync (unsigned int start, unsigned int len, int flags)
 {
 	unsigned int addr;
--

From: Tarkan Erimer
Date: Thursday, August 7, 2008 - 10:49 pm

Hi,

When I tried to connect my Sonyericsson K800i in "USB Mass Storage" 
mode, it didn't recognize it as a USB Mass Storage and also freezes the 
"lsusb". These strange behavior exist on both Linux-2.6.27-rc1 and rc2. 
At the logs:

Aug  7 12:05:17 tarkane kernel: usb 5-2: Product: Sony Ericsson K800
Aug  7 12:05:17 tarkane kernel: usb 5-2: Manufacturer: Sony Ericsson
Aug  7 12:05:17 tarkane kernel: usb 5-2: SerialNumber: 3534270171822450
Aug  7 12:05:20 tarkane kernel: cdc_acm 5-2:3.1: ttyACM0: USB ACM device
Aug  7 12:05:20 tarkane kernel: cdc_acm 5-2:3.3: ttyACM1: USB ACM device
Aug  7 12:05:20 tarkane kernel: usbcore: registered new interface driver 
cdc_acm
Aug  7 12:05:20 tarkane kernel: cdc_acm: v0.26:USB Abstract Control 
Model driver for USB modemsand ISDN adapters
Aug  7 12:05:20 tarkane kernel: usb0: register 'cdc_ether' at 
usb-0000:00:1d.3-2, CDC Ethernet Device, 02:80:37:06:03:00
Aug  7 12:05:20 tarkane kernel: usbcore: registered new interface driver 
cdc_ether
Aug  7 12:05:25 tarkane kernel: usb 5-2: USB disconnect, address 2


It seems; at least, it detects my K800i as a phone/modem device; but not 
as a USB Mass Storage. It's perfectly fine under  <=Linux-2.6.26.x 
kernels. Any help I can do to debug it more ?


Tarkan


--

From: Christoph Hellwig
Date: Sunday, August 31, 2008 - 6:42 pm

---end quoted text---
--

From: Christoph Hellwig
Date: Monday, September 1, 2008 - 9:14 am

It's an unused duplicate of the generic sys_pause.

(now without the b0rked ia64 bits, sorry)


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/arch/x86/ia32/sys_ia32.c
===================================================================
--- linux-2.6.orig/arch/x86/ia32/sys_ia32.c	2008-08-22 12:48:34.000000000 -0300
+++ linux-2.6/arch/x86/ia32/sys_ia32.c	2008-08-22 12:48:40.000000000 -0300
@@ -556,15 +556,6 @@ asmlinkage long sys32_rt_sigqueueinfo(in
 	return ret;
 }
 
-/* These are here just in case some old ia32 binary calls it. */
-asmlinkage long sys32_pause(void)
-{
-	current->state = TASK_INTERRUPTIBLE;
-	schedule();
-	return -ERESTARTNOHAND;
-}
-
-
 #ifdef CONFIG_SYSCTL_SYSCALL
 struct sysctl_ia32 {
 	unsigned int	name;
--

From: Ingo Molnar
Date: Saturday, September 6, 2008 - 9:45 am

applied to tip/x86/cleanups - thanks Christoph. I'm curious, how did you 
find it, some automation - or old-fashioned code reading?

	Ingo
--

Previous thread: [git pull] drm debug message downgrade. by Dave Airlie on Sunday, August 31, 2008 - 4:00 pm. (1 message)

Next thread: Re: md (regression): reboot/shutdown hangs by Neil Brown on Sunday, August 31, 2008 - 7:17 pm. (3 messages)