From b94ad49c4fa7f03aa19e78aae3f7a8c5ac9269a6 Mon Sep 17 00:00:00 2001 From: Luke Browning Date: Fri, 25 Apr 2008 14:00:00 +1000 Subject: [PATCH] --- yaml --- r: 96242 b: refs/heads/master c: 093c16bf9b107433643cbf0843ca7808df90823b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/cell/spufs/switch.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index f77b7c3adf1f..5bfb1ad6808c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d29694f0681e188cf75477f20904041744e78ef7 +refs/heads/master: 093c16bf9b107433643cbf0843ca7808df90823b diff --git a/trunk/arch/powerpc/platforms/cell/spufs/switch.c b/trunk/arch/powerpc/platforms/cell/spufs/switch.c index 53361d0c070f..9748808b0f19 100644 --- a/trunk/arch/powerpc/platforms/cell/spufs/switch.c +++ b/trunk/arch/powerpc/platforms/cell/spufs/switch.c @@ -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]); @@ -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)