diff options
author | Masato Noguchi <Masato.Noguchi@jp.sony.com> | 2007-07-20 15:39:39 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-07-20 15:41:57 -0400 |
commit | a103f347a5ae2735b9bf0a725a36c34be3f24c88 (patch) | |
tree | 2b0cfb0a9ce237534b45e67acd3b3e8b9140c874 /arch | |
parent | d40a01d4f4f205d0645beb371edc153d9ec8fb9f (diff) |
[CELL] spufs: limit saving MFC_CNTL bits
At save step 8, the mfc control register in the CSA should be written
_only_ with Sc and Sm bits (at least MFC_CNTL[Dh] should be set to 0)
Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/switch.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index d4dea1874847..c970b14bf7db 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c | |||
@@ -180,7 +180,7 @@ static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu) | |||
180 | case MFC_CNTL_SUSPEND_COMPLETE: | 180 | case MFC_CNTL_SUSPEND_COMPLETE: |
181 | if (csa) { | 181 | if (csa) { |
182 | csa->priv2.mfc_control_RW = | 182 | csa->priv2.mfc_control_RW = |
183 | in_be64(&priv2->mfc_control_RW) | | 183 | MFC_CNTL_SUSPEND_MASK | |
184 | MFC_CNTL_SUSPEND_DMA_QUEUE; | 184 | MFC_CNTL_SUSPEND_DMA_QUEUE; |
185 | } | 185 | } |
186 | break; | 186 | break; |
@@ -190,9 +190,7 @@ static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu) | |||
190 | MFC_CNTL_SUSPEND_DMA_STATUS_MASK) == | 190 | MFC_CNTL_SUSPEND_DMA_STATUS_MASK) == |
191 | MFC_CNTL_SUSPEND_COMPLETE); | 191 | MFC_CNTL_SUSPEND_COMPLETE); |
192 | if (csa) { | 192 | if (csa) { |
193 | csa->priv2.mfc_control_RW = | 193 | csa->priv2.mfc_control_RW = 0; |
194 | in_be64(&priv2->mfc_control_RW) & | ||
195 | ~MFC_CNTL_SUSPEND_DMA_QUEUE; | ||
196 | } | 194 | } |
197 | break; | 195 | break; |
198 | } | 196 | } |
@@ -251,11 +249,8 @@ static inline void save_mfc_decr(struct spu_state *csa, struct spu *spu) | |||
251 | * Read MFC_CNTL[Ds]. Update saved copy of | 249 | * Read MFC_CNTL[Ds]. Update saved copy of |
252 | * CSA.MFC_CNTL[Ds]. | 250 | * CSA.MFC_CNTL[Ds]. |
253 | */ | 251 | */ |
254 | if (in_be64(&priv2->mfc_control_RW) & MFC_CNTL_DECREMENTER_RUNNING) { | 252 | csa->priv2.mfc_control_RW |= |
255 | csa->priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING; | 253 | in_be64(&priv2->mfc_control_RW) & MFC_CNTL_DECREMENTER_RUNNING; |
256 | } else { | ||
257 | csa->priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING; | ||
258 | } | ||
259 | } | 254 | } |
260 | 255 | ||
261 | static inline void halt_mfc_decr(struct spu_state *csa, struct spu *spu) | 256 | static inline void halt_mfc_decr(struct spu_state *csa, struct spu *spu) |