aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/spufs/inode.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2006-10-04 17:26:14 +0200
committerPaul Mackerras <paulus@samba.org>2006-10-05 09:21:01 +1000
commit9add11daeee2f6d69f6b86237f197824332a4a3b (patch)
tree526daebd5cac297c288503fe4dafecd02c0f492e /arch/powerpc/platforms/cell/spufs/inode.c
parent28347bce8a837258e737873a55d31f2f424a6ea6 (diff)
[POWERPC] spufs: implement error event delivery to user space
This tries to fix spufs so we have an interface closer to what is specified in the man page for events returned in the third argument of spu_run. Fortunately, libspe has never been using the returned contents of that register, as they were the same as the return code of spu_run (duh!). Unlike the specification that we never implemented correctly, we now require a SPU_CREATE_EVENTS_ENABLED flag passed to spu_create, in order to get the new behavior. When this flag is not passed, spu_run will simply ignore the third argument now. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/inode.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 3950ddccb2c8..8cc615ff3637 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -224,7 +224,8 @@ struct file_operations spufs_context_fops = {
};
static int
-spufs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
+ int mode)
{
int ret;
struct inode *inode;
@@ -244,6 +245,8 @@ spufs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
if (!ctx)
goto out_iput;
+ ctx->flags = flags;
+
inode->i_op = &spufs_dir_inode_operations;
inode->i_fop = &simple_dir_operations;
ret = spufs_fill_dir(dentry, spufs_dir_contents, mode, ctx);
@@ -304,7 +307,7 @@ long spufs_create_thread(struct nameidata *nd,
goto out;
/* all flags are reserved */
- if (flags)
+ if (flags & (~SPU_CREATE_FLAG_ALL))
goto out;
dentry = lookup_create(nd, 1);
@@ -317,7 +320,7 @@ long spufs_create_thread(struct nameidata *nd,
goto out_dput;
mode &= ~current->fs->umask;
- ret = spufs_mkdir(nd->dentry->d_inode, dentry, mode & S_IRWXUGO);
+ ret = spufs_mkdir(nd->dentry->d_inode, dentry, flags, mode & S_IRWXUGO);
if (ret)
goto out_dput;