]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] spufs: set SPU_CONTEXT_SWITCH_PENDING before synchronising SPU irqs
authorLuke Browning <lukebr@linux.vnet.ibm.com>
Fri, 25 Apr 2008 04:00:00 +0000 (14:00 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 5 May 2008 03:33:43 +0000 (13:33 +1000)
commit4fe271940a535cbd3902f46799288291034e9f24
tree1776b417f366894e9fde4d58f456e3fef6697890
parente766779658ded8c5575f403594ba19e19083bfc2
[POWERPC] spufs: set SPU_CONTEXT_SWITCH_PENDING before synchronising SPU irqs

synchronize_irq() provides the serialization for
SPU_CONTEXT_SWITCH_PENDING which is read with a simple load. This
routine guarantees that the relevant interrupt handlers are not running,
so that the next time they do run they will see the update
memory value.

This must be done correctly so that exception handling code does not
restart the mfc in the middle of a context switch while we are trying
to atomically stop it and save state.

Signed-off-by: Luke Browning <lukebr@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
arch/powerpc/platforms/cell/spufs/switch.c