diff options
author | Arnd Bergmann <arnd@arndb.de> | 2005-12-06 06:52:27 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-09 06:53:01 +0300 |
commit | 3a843d7cd30ab6815610d9d6aa66b56df0ee1228 (patch) | |
tree | b344400a51bf794ec10c6a1fb788e1244969a00f /arch/powerpc/platforms/cell/spufs/switch.c | |
parent | 2a911f0bb73e67826062b7d073dd7367ca449724 (diff) | |
download | linux-3a843d7cd30ab6815610d9d6aa66b56df0ee1228.tar.xz |
[PATCH] spufs: fix mailbox polling
Handling mailbox interrupts was broken in multiple respects,
the combination of which was hiding the bugs most of the time.
- The ibox interrupt mask was open initially even though there
are no waiters on a newly created SPU.
- Acknowledging the mailbox interrupt did not work because
it is level triggered and the mailbox data is never retrieved
from inside the interrupt handler.
- The interrupt handler delivered interrupts with a disabled
mask if another interrupt is triggered for the same class
but a different mask.
- The poll function did not enable the interrupt if it had not
been enabled, so we might run into the poll timeout if none of
the other bugs saved us and no signal was delivered.
We probably still have a similar problem with blocking
read/write on mailbox files, but that will result in extra
wakeup in the worst case, not in incorrect behaviour.
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/switch.c')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/switch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index 51266257b0a5..010a9fe55ef8 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c @@ -2155,8 +2155,8 @@ static void init_priv1(struct spu_state *csa) CLASS0_ENABLE_SPU_ERROR_INTR; csa->priv1.int_mask_class1_RW = CLASS1_ENABLE_SEGMENT_FAULT_INTR | CLASS1_ENABLE_STORAGE_FAULT_INTR; - csa->priv1.int_mask_class2_RW = CLASS2_ENABLE_MAILBOX_INTR | - CLASS2_ENABLE_SPU_STOP_INTR | CLASS2_ENABLE_SPU_HALT_INTR; + csa->priv1.int_mask_class2_RW = CLASS2_ENABLE_SPU_STOP_INTR | + CLASS2_ENABLE_SPU_HALT_INTR; } static void init_priv2(struct spu_state *csa) |