Commit bd2e5f82 authored by Jeremy Kerr's avatar Jeremy Kerr Committed by Paul Mackerras

[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: default avatarJeremy Kerr <jk@ozlabs.org>
Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
parent aa668d6a
...@@ -323,6 +323,10 @@ static int spufs_create_context(struct inode *inode, ...@@ -323,6 +323,10 @@ static int spufs_create_context(struct inode *inode,
== SPU_CREATE_ISOLATE) == SPU_CREATE_ISOLATE)
goto out_unlock; goto out_unlock;
ret = -ENODEV;
if ((flags & SPU_CREATE_ISOLATE) && !isolated_loader)
goto out_unlock;
ret = spufs_mkdir(inode, dentry, flags, mode & S_IRWXUGO); ret = spufs_mkdir(inode, dentry, flags, mode & S_IRWXUGO);
if (ret) if (ret)
goto out_unlock; goto out_unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment