[PATCH] powerpc/cell: remove BUILD_BUG_ON and add sys_tee to spu_syscall_table
authorArnd Bergmann <arnd.bergmann@de.ibm.com>
Tue, 18 Apr 2006 13:24:16 +0000 (15:24 +0200)
committerPaul Mackerras <paulus@samba.org>
Fri, 21 Apr 2006 12:32:50 +0000 (22:32 +1000)
Every time a new syscall gets added, a BUILD_BUG_ON in
arch/powerpc/platforms/cell/spu_callbacks.c gets triggered.
Since the addition of a new syscall is rather harmless,
the error should just be removed.

While we're here, add sys_tee to the list and add a comment
to systbl.S to remind people that there is another list
on powerpc.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/systbl.S
arch/powerpc/platforms/cell/spu_callbacks.c

index a14c964038403fa6d6271967df95fa5727a41b1f..8d15226905015f63da9ad53677c869c9f18e309f 100644 (file)
@@ -324,3 +324,8 @@ COMPAT_SYS(ppoll)
 SYSCALL(unshare)
 SYSCALL(splice)
 SYSCALL(tee)
+
+/*
+ * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c
+ * as well when appropriate.
+ */
index 6594bec7388243d8581f816dbca1d98b29176b01..deb3afb94484a0372978fca73ca2c4d37ca21dfd 100644 (file)
@@ -317,17 +317,16 @@ void *spu_syscall_table[] = {
        [__NR_ppoll]                    sys_ni_syscall, /* sys_ppoll */
        [__NR_unshare]                  sys_unshare,
        [__NR_splice]                   sys_splice,
+       [__NR_tee]                      sys_tee,
 };
 
 long spu_sys_callback(struct spu_syscall_block *s)
 {
        long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6);
 
-       BUILD_BUG_ON(ARRAY_SIZE(spu_syscall_table) != __NR_syscalls);
-
        syscall = spu_syscall_table[s->nr_ret];
 
-       if (s->nr_ret >= __NR_syscalls) {
+       if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) {
                pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret);
                return -ENOSYS;
        }