aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spu_syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/cell/spu_syscalls.c')
-rw-r--r--arch/powerpc/platforms/cell/spu_syscalls.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c
index 261b507a901a..dd2c6688c8aa 100644
--- a/arch/powerpc/platforms/cell/spu_syscalls.c
+++ b/arch/powerpc/platforms/cell/spu_syscalls.c
@@ -34,14 +34,27 @@ struct spufs_calls spufs_calls = {
34 * this file is not used and the syscalls directly enter the fs code */ 34 * this file is not used and the syscalls directly enter the fs code */
35 35
36asmlinkage long sys_spu_create(const char __user *name, 36asmlinkage long sys_spu_create(const char __user *name,
37 unsigned int flags, mode_t mode) 37 unsigned int flags, mode_t mode, int neighbor_fd)
38{ 38{
39 long ret; 39 long ret;
40 struct module *owner = spufs_calls.owner; 40 struct module *owner = spufs_calls.owner;
41 struct file *neighbor;
42 int fput_needed;
41 43
42 ret = -ENOSYS; 44 ret = -ENOSYS;
43 if (owner && try_module_get(owner)) { 45 if (owner && try_module_get(owner)) {
44 ret = spufs_calls.create_thread(name, flags, mode); 46 if (flags & SPU_CREATE_AFFINITY_SPU) {
47 neighbor = fget_light(neighbor_fd, &fput_needed);
48 if (neighbor) {
49 ret = spufs_calls.create_thread(name, flags,
50 mode, neighbor);
51 fput_light(neighbor, fput_needed);
52 }
53 }
54 else {
55 ret = spufs_calls.create_thread(name, flags,
56 mode, NULL);
57 }
45 module_put(owner); 58 module_put(owner);
46 } 59 }
47 return ret; 60 return ret;