diff options
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/switch.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index 6f5886c7b1f9..e9dc7a55d1b9 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/hardirq.h> | ||
37 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
38 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
39 | #include <linux/mm.h> | 40 | #include <linux/mm.h> |
@@ -117,6 +118,8 @@ static inline void disable_interrupts(struct spu_state *csa, struct spu *spu) | |||
117 | * Write INT_MASK_class1 with value of 0. | 118 | * Write INT_MASK_class1 with value of 0. |
118 | * Save INT_Mask_class2 in CSA. | 119 | * Save INT_Mask_class2 in CSA. |
119 | * Write INT_MASK_class2 with value of 0. | 120 | * Write INT_MASK_class2 with value of 0. |
121 | * Synchronize all three interrupts to be sure | ||
122 | * we no longer execute a handler on another CPU. | ||
120 | */ | 123 | */ |
121 | spin_lock_irq(&spu->register_lock); | 124 | spin_lock_irq(&spu->register_lock); |
122 | if (csa) { | 125 | if (csa) { |
@@ -129,6 +132,9 @@ static inline void disable_interrupts(struct spu_state *csa, struct spu *spu) | |||
129 | spu_int_mask_set(spu, 2, 0ul); | 132 | spu_int_mask_set(spu, 2, 0ul); |
130 | eieio(); | 133 | eieio(); |
131 | spin_unlock_irq(&spu->register_lock); | 134 | spin_unlock_irq(&spu->register_lock); |
135 | synchronize_irq(spu->irqs[0]); | ||
136 | synchronize_irq(spu->irqs[1]); | ||
137 | synchronize_irq(spu->irqs[2]); | ||
132 | } | 138 | } |
133 | 139 | ||
134 | static inline void set_watchdog_timer(struct spu_state *csa, struct spu *spu) | 140 | static inline void set_watchdog_timer(struct spu_state *csa, struct spu *spu) |