diff options
| -rw-r--r-- | arch/powerpc/platforms/cell/spu_base.c | 12 | ||||
| -rw-r--r-- | arch/powerpc/platforms/cell/spufs/switch.c | 6 | ||||
| -rw-r--r-- | include/asm-powerpc/spu.h | 3 |
3 files changed, 4 insertions, 17 deletions
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index e45cfa84911f..87eb07f94c5f 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
| @@ -160,13 +160,6 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea) | |||
| 160 | 160 | ||
| 161 | pr_debug("%s\n", __FUNCTION__); | 161 | pr_debug("%s\n", __FUNCTION__); |
| 162 | 162 | ||
| 163 | if (test_bit(SPU_CONTEXT_SWITCH_ACTIVE, &spu->flags)) { | ||
| 164 | /* SLBs are pre-loaded for context switch, so | ||
| 165 | * we should never get here! | ||
| 166 | */ | ||
| 167 | printk("%s: invalid access during switch!\n", __func__); | ||
| 168 | return 1; | ||
| 169 | } | ||
| 170 | slb.esid = (ea & ESID_MASK) | SLB_ESID_V; | 163 | slb.esid = (ea & ESID_MASK) | SLB_ESID_V; |
| 171 | 164 | ||
| 172 | switch(REGION_ID(ea)) { | 165 | switch(REGION_ID(ea)) { |
| @@ -226,11 +219,6 @@ static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr) | |||
| 226 | return 0; | 219 | return 0; |
| 227 | } | 220 | } |
| 228 | 221 | ||
| 229 | if (test_bit(SPU_CONTEXT_SWITCH_ACTIVE, &spu->flags)) { | ||
| 230 | printk("%s: invalid access during switch!\n", __func__); | ||
| 231 | return 1; | ||
| 232 | } | ||
| 233 | |||
| 234 | spu->class_0_pending = 0; | 222 | spu->class_0_pending = 0; |
| 235 | spu->dar = ea; | 223 | spu->dar = ea; |
| 236 | spu->dsisr = dsisr; | 224 | spu->dsisr = dsisr; |
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index 6063c88c26d2..6f5886c7b1f9 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c | |||
| @@ -720,8 +720,9 @@ static inline void set_switch_active(struct spu_state *csa, struct spu *spu) | |||
| 720 | * Restore, Step 23. | 720 | * Restore, Step 23. |
| 721 | * Change the software context switch pending flag | 721 | * Change the software context switch pending flag |
| 722 | * to context switch active. | 722 | * to context switch active. |
| 723 | * | ||
| 724 | * This implementation does not uses a switch active flag. | ||
| 723 | */ | 725 | */ |
| 724 | set_bit(SPU_CONTEXT_SWITCH_ACTIVE, &spu->flags); | ||
| 725 | clear_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags); | 726 | clear_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags); |
| 726 | mb(); | 727 | mb(); |
| 727 | } | 728 | } |
| @@ -1739,9 +1740,8 @@ static inline void reset_switch_active(struct spu_state *csa, struct spu *spu) | |||
| 1739 | { | 1740 | { |
| 1740 | /* Restore, Step 74: | 1741 | /* Restore, Step 74: |
| 1741 | * Reset the "context switch active" flag. | 1742 | * Reset the "context switch active" flag. |
| 1743 | * Not performed by this implementation. | ||
| 1742 | */ | 1744 | */ |
| 1743 | clear_bit(SPU_CONTEXT_SWITCH_ACTIVE, &spu->flags); | ||
| 1744 | mb(); | ||
| 1745 | } | 1745 | } |
| 1746 | 1746 | ||
| 1747 | static inline void reenable_interrupts(struct spu_state *csa, struct spu *spu) | 1747 | static inline void reenable_interrupts(struct spu_state *csa, struct spu *spu) |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index f07c99ba5d13..e3c845b0f764 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
| @@ -98,9 +98,8 @@ | |||
| 98 | #define MFC_PRIV_ATTN_EVENT 0x00000800 | 98 | #define MFC_PRIV_ATTN_EVENT 0x00000800 |
| 99 | #define MFC_MULTI_SRC_EVENT 0x00001000 | 99 | #define MFC_MULTI_SRC_EVENT 0x00001000 |
| 100 | 100 | ||
| 101 | /* Flags indicating progress during context switch. */ | 101 | /* Flag indicating progress during context switch. */ |
| 102 | #define SPU_CONTEXT_SWITCH_PENDING 0UL | 102 | #define SPU_CONTEXT_SWITCH_PENDING 0UL |
| 103 | #define SPU_CONTEXT_SWITCH_ACTIVE 1UL | ||
| 104 | 103 | ||
| 105 | struct spu_context; | 104 | struct spu_context; |
| 106 | struct spu_runqueue; | 105 | struct spu_runqueue; |
