Skip to content

Commit

Permalink
[POWERPC] cell/PS3: Always set master run control bit in mfc_sr1_set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Kerr authored and Paul Mackerras committed Sep 10, 2007
1 parent b7f90a4 commit ef8034d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/platforms/ps3/spu.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ static void mfc_sr1_set(struct spu *spu, u64 sr1)
static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK
| MFC_STATE1_PROBLEM_STATE_MASK);

sr1 |= MFC_STATE1_MASTER_RUN_CONTROL_MASK;

BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed));

spu_pdata(spu)->cache.sr1 = sr1;
Expand Down

0 comments on commit ef8034d

Please sign in to comment.