From: Jeremy Kerr Date: Mon, 27 Nov 2006 18:18:52 +0000 (+0100) Subject: [POWERPC] spufs: return an error in spu_create is isolated create isnt supported X-Git-Tag: v2.6.20-rc1~34^2~40^2~8^2~43 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd2e5f829e772787ea4d986d72ddf57f50878649;p=linux-2.6 [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 Signed-off-by: Arnd Bergmann --- diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index a3ca06bd0c..c7d010749a 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;