Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96242
b: refs/heads/master
c: 093c16b
h: refs/heads/master
v: v3
  • Loading branch information
Luke Browning authored and Jeremy Kerr committed May 5, 2008
1 parent 50f9589 commit b94ad49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d29694f0681e188cf75477f20904041744e78ef7
refs/heads/master: 093c16bf9b107433643cbf0843ca7808df90823b
10 changes: 8 additions & 2 deletions trunk/arch/powerpc/platforms/cell/spufs/switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ static inline void disable_interrupts(struct spu_state *csa, struct spu *spu)
spu_int_mask_set(spu, 2, 0ul);
eieio();
spin_unlock_irq(&spu->register_lock);

/*
* This flag needs to be set before calling synchronize_irq so
* that the update will be visible to the relevant handlers
* via a simple load.
*/
set_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags);
synchronize_irq(spu->irqs[0]);
synchronize_irq(spu->irqs[1]);
synchronize_irq(spu->irqs[2]);
Expand Down Expand Up @@ -166,9 +173,8 @@ static inline void set_switch_pending(struct spu_state *csa, struct spu *spu)
/* Save, Step 7:
* Restore, Step 5:
* Set a software context switch pending flag.
* Done above in Step 3 - disable_interrupts().
*/
set_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags);
mb();
}

static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu)
Expand Down

0 comments on commit b94ad49

Please sign in to comment.