At present, the __spufs_trap_data_map and __spu_trap_data_seq functions
exit if spu->flags has the SPU_CONTEXT_SWITCH_ACTIVE set. This was
resulting in suprious returns from these functions, as they may be
legitimately called when we have this bit set.
We only use it in these two sanity checks, so this change removes the
flag completely. This fixes hangs in the page-fault path of SPE apps.
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
pr_debug("%s\n", __FUNCTION__);
pr_debug("%s\n", __FUNCTION__);
- if (test_bit(SPU_CONTEXT_SWITCH_ACTIVE, &spu->flags)) {
- /* SLBs are pre-loaded for context switch, so
- * we should never get here!
- */
- printk("%s: invalid access during switch!\n", __func__);
- return 1;
- }
slb.esid = (ea & ESID_MASK) | SLB_ESID_V;
switch(REGION_ID(ea)) {
slb.esid = (ea & ESID_MASK) | SLB_ESID_V;
switch(REGION_ID(ea)) {
- if (test_bit(SPU_CONTEXT_SWITCH_ACTIVE, &spu->flags)) {
- printk("%s: invalid access during switch!\n", __func__);
- return 1;
- }
-
spu->class_0_pending = 0;
spu->dar = ea;
spu->dsisr = dsisr;
spu->class_0_pending = 0;
spu->dar = ea;
spu->dsisr = dsisr;
* Restore, Step 23.
* Change the software context switch pending flag
* to context switch active.
* Restore, Step 23.
* Change the software context switch pending flag
* to context switch active.
+ *
+ * This implementation does not uses a switch active flag.
- set_bit(SPU_CONTEXT_SWITCH_ACTIVE, &spu->flags);
clear_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags);
mb();
}
clear_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags);
mb();
}
{
/* Restore, Step 74:
* Reset the "context switch active" flag.
{
/* Restore, Step 74:
* Reset the "context switch active" flag.
+ * Not performed by this implementation.
- clear_bit(SPU_CONTEXT_SWITCH_ACTIVE, &spu->flags);
- mb();
}
static inline void reenable_interrupts(struct spu_state *csa, struct spu *spu)
}
static inline void reenable_interrupts(struct spu_state *csa, struct spu *spu)
#define MFC_PRIV_ATTN_EVENT 0x00000800
#define MFC_MULTI_SRC_EVENT 0x00001000
#define MFC_PRIV_ATTN_EVENT 0x00000800
#define MFC_MULTI_SRC_EVENT 0x00001000
-/* Flags indicating progress during context switch. */
+/* Flag indicating progress during context switch. */
#define SPU_CONTEXT_SWITCH_PENDING 0UL
#define SPU_CONTEXT_SWITCH_PENDING 0UL
-#define SPU_CONTEXT_SWITCH_ACTIVE 1UL
struct spu_context;
struct spu_runqueue;
struct spu_context;
struct spu_runqueue;