瀏覽代碼

[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>
Jeremy Kerr 19 年之前
父節點
當前提交
bd2e5f829e
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      arch/powerpc/platforms/cell/spufs/inode.c

+ 4 - 0
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;