summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/spufs/backing_ops.c
diff options
context:
space:
mode:
authorKazunori Asayama <asayama@sm.sony.co.jp>2007-06-29 10:58:09 +1000
committerPaul Mackerras <paulus@samba.org>2007-07-03 15:24:47 +1000
commit8d038e0433e3164e460c2daeca1ec6947a08f81a (patch)
tree577aa1a6aedfe1a16a01352ab25b07bfcac94514 /arch/powerpc/platforms/cell/spufs/backing_ops.c
parent933b0e35247ef0dbd1a078a0ba3705ddbbda129f (diff)
[POWERPC] spufs: Save dma_tagstatus_R in CSA
The function backing_ops->read_mfc_tagstatus() doesn't return a correct value because the dma_tagstatus_R register isn't saved in CSA. This fixes the problem. Signed-off-by: Kazunori Asayama <asayama@sm.sony.co.jp> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/backing_ops.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/backing_ops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c b/arch/powerpc/platforms/cell/spufs/backing_ops.c
index d32db9ffc6eb..07a0e815abf5 100644
--- a/arch/powerpc/platforms/cell/spufs/backing_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c
@@ -320,6 +320,12 @@ static int spu_backing_set_mfc_query(struct spu_context * ctx, u32 mask,
/* FIXME: what are the side-effects of this? */
prob->dma_querymask_RW = mask;
prob->dma_querytype_RW = mode;
+ /* In the current implementation, the SPU context is always
+ * acquired in runnable state when new bits are added to the
+ * mask (tagwait), so it's sufficient just to mask
+ * dma_tagstatus_R with the 'mask' parameter here.
+ */
+ ctx->csa.prob.dma_tagstatus_R &= mask;
out:
spin_unlock(&ctx->csa.register_lock);