/* The status value returned from spu_run reflects the value of the spu_status register after the SPU has stopped.  */
static long do_spu_run(struct file *filp, __u32 __user *unpc, __u32 __user *ustatus)
/* The status value returned from spu_run reflects the value of the spu_status register after the SPU has stopped.  */
static long do_spu_run(struct file *filp, __u32 __user *unpc, __u32 __user *ustatus)
{
	long ret;
	struct spufs_inode_info *i;
	u32 npc, status;
	ret = -EFAULT;
	if (get_user(npc, unpc))
		goto out;
	ret = -EINVAL;
	if (filp->f_op != &spufs_context_fops)
		goto out;
	i = SPUFS_I(filp->f_path.dentry->d_inode);
	ret = spufs_run_spu(i->i_ctx, &npc, &status);
	if (put_user(npc, unpc))
		ret = -EFAULT;
	if (ustatus && put_user(status, ustatus))
		ret = -EFAULT;
out:
	return ret;
}