diff options
-rw-r--r-- | arch/powerpc/kernel/systbl.S | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_callbacks.c | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S index a14c96403840..8d1522690501 100644 --- a/arch/powerpc/kernel/systbl.S +++ b/arch/powerpc/kernel/systbl.S | |||
@@ -324,3 +324,8 @@ COMPAT_SYS(ppoll) | |||
324 | SYSCALL(unshare) | 324 | SYSCALL(unshare) |
325 | SYSCALL(splice) | 325 | SYSCALL(splice) |
326 | SYSCALL(tee) | 326 | SYSCALL(tee) |
327 | |||
328 | /* | ||
329 | * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c | ||
330 | * as well when appropriate. | ||
331 | */ | ||
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c index 6594bec73882..deb3afb94484 100644 --- a/arch/powerpc/platforms/cell/spu_callbacks.c +++ b/arch/powerpc/platforms/cell/spu_callbacks.c | |||
@@ -317,17 +317,16 @@ void *spu_syscall_table[] = { | |||
317 | [__NR_ppoll] sys_ni_syscall, /* sys_ppoll */ | 317 | [__NR_ppoll] sys_ni_syscall, /* sys_ppoll */ |
318 | [__NR_unshare] sys_unshare, | 318 | [__NR_unshare] sys_unshare, |
319 | [__NR_splice] sys_splice, | 319 | [__NR_splice] sys_splice, |
320 | [__NR_tee] sys_tee, | ||
320 | }; | 321 | }; |
321 | 322 | ||
322 | long spu_sys_callback(struct spu_syscall_block *s) | 323 | long spu_sys_callback(struct spu_syscall_block *s) |
323 | { | 324 | { |
324 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); | 325 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); |
325 | 326 | ||
326 | BUILD_BUG_ON(ARRAY_SIZE(spu_syscall_table) != __NR_syscalls); | ||
327 | |||
328 | syscall = spu_syscall_table[s->nr_ret]; | 327 | syscall = spu_syscall_table[s->nr_ret]; |
329 | 328 | ||
330 | if (s->nr_ret >= __NR_syscalls) { | 329 | if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { |
331 | pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret); | 330 | pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret); |
332 | return -ENOSYS; | 331 | return -ENOSYS; |
333 | } | 332 | } |