Skip to contentSkip to conversation

inotify: ppc32 syscalls.

PATCH In review Robert Love 3 participants 6 messages Jul 27, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 inotify: ppc32 syscalls.

Hey, Paulus,

Add inotify system call stubs to PPC32.

 arch/ppc/kernel/misc.S   |    3 +++
 include/asm-ppc/unistd.h |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
arch/ppc/kernel/misc.S +3 -0
diff -urN linux-2.6.13-rc3-git8/arch/ppc/kernel/misc.S linux/arch/ppc/kernel/misc.S
@@ -1451,3 +1451,6 @@
 	.long sys_waitid
 	.long sys_ioprio_set
 	.long sys_ioprio_get
+	.long sys_inotify_init		/* 275 */
+	.long sys_inotify_add_watch
+	.long sys_inotify_rm_watch
include/asm-ppc/unistd.h +4 -1
diff -urN linux-2.6.13-rc3-git8/include/asm-ppc/unistd.h linux/include/asm-ppc/unistd.h
@@ -279,8 +279,11 @@
 #define __NR_waitid		272
 #define __NR_ioprio_set		273
 #define __NR_ioprio_get		274
+#define __NR_inotify_init	275
+#define __NR_inotify_add_watch	276
+#define __NR_inotify_rm_watch	277
 
-#define __NR_syscalls		275
+#define __NR_syscalls		278
 
 #define __NR(n)	#n
 
#1 lore raw
Quoted 5 lines · Robert Love

Hey, Paulus,

Add inotify system call stubs to PPC32.

ppc64 likes to keep its 32-bit-syscall table in sync with ppc32 so it'd be best to do ppc64 while we're at it (both sys_call_table and sys_call_table32)

Quoted 31 lines
 arch/ppc/kernel/misc.S   |    3 +++
 include/asm-ppc/unistd.h |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff -urN linux-2.6.13-rc3-git8/arch/ppc/kernel/misc.S linux/arch/ppc/kernel/misc.S

arch/ppc/kernel/misc.S +3 -0
@@ -1451,3 +1451,6 @@
 	.long sys_waitid
 	.long sys_ioprio_set
 	.long sys_ioprio_get
+	.long sys_inotify_init		/* 275 */
+	.long sys_inotify_add_watch
+	.long sys_inotify_rm_watch

diff -urN linux-2.6.13-rc3-git8/include/asm-ppc/unistd.h linux/include/asm-ppc/unistd.h

include/asm-ppc/unistd.h +4 -1
@@ -279,8 +279,11 @@
 #define __NR_waitid		272
 #define __NR_ioprio_set		273
 #define __NR_ioprio_get		274
+#define __NR_inotify_init	275
+#define __NR_inotify_add_watch	276
+#define __NR_inotify_rm_watch	277
 
-#define __NR_syscalls		275
+#define __NR_syscalls		278
 
 #define __NR(n)	#n
 
#2 lore raw

PATCH 1/1 inotify: ppc64 syscalls.

Quoted 3 lines · Andrew Morton

ppc64 likes to keep its 32-bit-syscall table in sync with ppc32 so it'd be best to do ppc64 while we're at it (both sys_call_table and sys_call_table32)

Sure thing.

Attached find inotify system call support for PPC64.

[ I don't think we need sys32 compatibility versions--and if we do, I failed in life. ]

Robert Love

 arch/ppc64/kernel/misc.S   |    6 ++++++
 include/asm-ppc64/unistd.h |    5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
arch/ppc64/kernel/misc.S +6 -0
diff -urN linux-2.6.13-rc3-git8/arch/ppc64/kernel/misc.S linux/arch/ppc64/kernel/misc.S
@@ -1129,6 +1129,9 @@
 	.llong .compat_sys_waitid
 	.llong .sys32_ioprio_set
 	.llong .sys32_ioprio_get
+	.llong .sys_inotify_init	/* 275 */
+	.llong .sys_inotify_add_watch
+	.llong .sys_inotify_rm_watch
 
 	.balign 8
 _GLOBAL(sys_call_table)
@@ -1407,3 +1410,6 @@
 	.llong .sys_waitid
 	.llong .sys_ioprio_set
 	.llong .sys_ioprio_get
+	.llong .sys_inotify_init	/* 275 */
+	.llong .sys_inotify_add_watch
+	.llong .sys_inotify_rm_watch
include/asm-ppc64/unistd.h +4 -1
diff -urN linux-2.6.13-rc3-git8/include/asm-ppc64/unistd.h linux/include/asm-ppc64/unistd.h
@@ -285,8 +285,11 @@
 #define __NR_waitid		272
 #define __NR_ioprio_set		273
 #define __NR_ioprio_get		274
+#define __NR_inotify_init	275
+#define __NR_inotify_add_watch	276
+#define __NR_inotify_rm_watch	277
 
-#define __NR_syscalls		275
+#define __NR_syscalls		278
 #ifdef __KERNEL__
 #define NR_syscalls	__NR_syscalls
 #endif
#3 lore raw

Re: [patch] inotify: ppc64 syscalls.

From: Robert Love <[email protected]>
Date: Wed, 27 Jul 2005 13:31:36 -0400

Quoted 2 lines

[ I don't think we need sys32 compatibility versions--and if we do, I failed in life. ]

add_watch and rm_watch both do, because system call arguments are zero-extended by default for compat tasks, thus the "fd" arg needs sign extension.

You'll notice that sys_ppc32.c has a ton of shims which purely exist to sign extend "int" system call arguments. Sparc64 does something similarly, but in assembler so that we don't eat the overhead of a full stack frame just to sign extend arguments.

#4 lore raw

Re: [patch] inotify: ppc64 syscalls.

Quoted 4 lines · David S. Miller

You'll notice that sys_ppc32.c has a ton of shims which purely exist to sign extend "int" system call arguments. Sparc64 does something similarly, but in assembler so that we don't eat the overhead of a full stack frame just to sign extend arguments.

Yah, but it looked like they did the sign extend thing for every int but file descriptors, and fd's are the only int's we have.

Robert Love

#5 lore raw

Re: [patch] inotify: ppc64 syscalls.

From: Robert Love <[email protected]>
Date: Wed, 27 Jul 2005 16:31:02 -0400

Quoted 9 lines · David S. Miller
Quoted 5 lines

You'll notice that sys_ppc32.c has a ton of shims which purely exist to sign extend "int" system call arguments. Sparc64 does something similarly, but in assembler so that we don't eat the overhead of a full stack frame just to sign extend arguments.

Yah, but it looked like they did the sign extend thing for every int but file descriptors, and fd's are the only int's we have.

Ok, works for me :-)