From 61b36fc1f7d511132b1dd1422c29c7a8f26d77db Mon Sep 17 00:00:00 2001 From: Andre Detsch Date: Tue, 19 Feb 2008 10:06:15 -0300 Subject: [POWERPC] cell: fix spurious false return from spu_trap_data_{map,seg} 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 Signed-off-by: Jeremy Kerr --- arch/powerpc/platforms/cell/spufs/switch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/powerpc/platforms/cell/spufs') diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index 6063c88c26d..6f5886c7b1f 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) * 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(); } @@ -1739,9 +1740,8 @@ static inline void reset_switch_active(struct spu_state *csa, struct spu *spu) { /* 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) -- cgit v1.2.3