[POWERPC] spufs: synchronize IRQ when disabling
authorArnd Bergmann <arnd@arndb.de>
Fri, 29 Feb 2008 04:16:48 +0000 (15:16 +1100)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 29 Feb 2008 04:16:48 +0000 (15:16 +1100)
commitfae9ca791507876c3ccaa8ab686b2ce42dc7a560
treea64e844ad1074a52be048ac5d82c5e53047f0abd
parent71791bee90dd29b292c7e55c1c00857578c912bd
[POWERPC] spufs: synchronize IRQ when disabling

There is a small race between the context save procedure
and the SPU interrupt handling, where we expect all interrupt
processing to have finished after disabling them, while
an interrupt is still being processed on another CPU.

The obvious fix is to call synchronize_irq() after disabling
the interrupts at the start of the context save procedure
to make sure we never access the SPU any more during an
ongoing save or even after that.

Thanks to Benjamin Herrenschmidt for pointing this out.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
arch/powerpc/platforms/cell/spufs/switch.c