aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-11-27 13:18:52 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-04 04:41:07 -0500
commitbd2e5f829e772787ea4d986d72ddf57f50878649 (patch)
tree0752cd5559a9d8cafbbd31cab17e595df1c74de7 /arch/powerpc
parentaa668d6aac63f5fc02aa63bf25ff36d12510e050 (diff)
[POWERPC] spufs: return an error in spu_create is isolated create isnt supported
This changes the spu_create system call to return an error (-ENODEV) if and isolated spu context is requested on hardware that doesn't support isolated mode. Tested on systemsim with and without isolation support Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index a3ca06bd0ca1..c7d010749a18 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -323,6 +323,10 @@ static int spufs_create_context(struct inode *inode,
323 == SPU_CREATE_ISOLATE) 323 == SPU_CREATE_ISOLATE)
324 goto out_unlock; 324 goto out_unlock;
325 325
326 ret = -ENODEV;
327 if ((flags & SPU_CREATE_ISOLATE) && !isolated_loader)
328 goto out_unlock;
329
326 ret = spufs_mkdir(inode, dentry, flags, mode & S_IRWXUGO); 330 ret = spufs_mkdir(inode, dentry, flags, mode & S_IRWXUGO);
327 if (ret) 331 if (ret)
328 goto out_unlock; 332 goto out_unlock;