]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] spufs: return an error in spu_create is isolated create isnt supported
authorJeremy Kerr <jk@ozlabs.org>
Mon, 27 Nov 2006 18:18:52 +0000 (19:18 +0100)
committerPaul Mackerras <paulus@samba.org>
Mon, 4 Dec 2006 09:41:07 +0000 (20:41 +1100)
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>
arch/powerpc/platforms/cell/spufs/inode.c

index a3ca06bd0ca17f27b6be7324e77042b6e1b6605f..c7d010749a181b14688a8f121c5deb5883d03b19 100644 (file)
@@ -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;