aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/ps3/spu.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2007-09-07 04:28:27 -0400
committerPaul Mackerras <paulus@samba.org>2007-09-10 14:30:36 -0400
commitef8034d01a080e81488e9cf74052acf1e2a37bd0 (patch)
tree1a8d7045c2e1d81d6a198c8470dc7d0e0425e9b3 /arch/powerpc/platforms/ps3/spu.c
parentb7f90a406ff72d6698b619210c205e3375dd099a (diff)
[POWERPC] cell/PS3: Always set master run control bit in mfc_sr1_set
At present, running any SPE program on the ps3 will trigger a BUG_ON when spufs_run_spu tries to clear the master run control bit, as lv1 does not make the master run control available to Linux. This change makes SPE apps work again by disabling changes to the master run control on PS3. Although we don't have the facility to disable a SPE with supervisor-level privileges, it's better than hitting the BUG_ON unconditionally. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Acked-by: Masato Noguchi <Masato.Noguchi@jp.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/ps3/spu.c')
-rw-r--r--arch/powerpc/platforms/ps3/spu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index ac2a4b8a4c14..d1630a074acf 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -505,6 +505,8 @@ static void mfc_sr1_set(struct spu *spu, u64 sr1)
505 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK 505 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK
506 | MFC_STATE1_PROBLEM_STATE_MASK); 506 | MFC_STATE1_PROBLEM_STATE_MASK);
507 507
508 sr1 |= MFC_STATE1_MASTER_RUN_CONTROL_MASK;
509
508 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed)); 510 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed));
509 511
510 spu_pdata(spu)->cache.sr1 = sr1; 512 spu_pdata(spu)->cache.sr1 = sr1;