summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-11-27 19:18:52 +0100
committerPaul Mackerras <paulus@samba.org>2006-12-04 10:41:07 +0100
commitbd2e5f829e772787ea4d986d72ddf57f50878649 (patch)
tree0752cd5559a9d8cafbbd31cab17e595df1c74de7 /arch/powerpc
parent[POWERPC] Fix compile issue for Efika platform (diff)
downloadlinux-bd2e5f829e772787ea4d986d72ddf57f50878649.tar.xz
linux-bd2e5f829e772787ea4d986d72ddf57f50878649.zip
[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,
== SPU_CREATE_ISOLATE)
goto out_unlock;
+ ret = -ENODEV;
+ if ((flags & SPU_CREATE_ISOLATE) && !isolated_loader)
+ goto out_unlock;
+
ret = spufs_mkdir(inode, dentry, flags, mode & S_IRWXUGO);
if (ret)
goto out_unlock;