]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] spufs: fix mailbox polling
authorArnd Bergmann <arnd@arndb.de>
Tue, 6 Dec 2005 03:52:27 +0000 (22:52 -0500)
committerPaul Mackerras <paulus@samba.org>
Mon, 9 Jan 2006 03:53:01 +0000 (14:53 +1100)
commitc46e1407f60a8f0c3681031f27c16840d8f45355
treeb344400a51bf794ec10c6a1fb788e1244969a00f
parent7ec723b8708946d2f355beabd50af3501c83e19a
[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>
arch/powerpc/platforms/cell/spu_base.c
arch/powerpc/platforms/cell/spufs/backing_ops.c
arch/powerpc/platforms/cell/spufs/file.c
arch/powerpc/platforms/cell/spufs/hw_ops.c
arch/powerpc/platforms/cell/spufs/spufs.h
arch/powerpc/platforms/cell/spufs/switch.c