diff options
author | Milton Miller <miltonm@bga.com> | 2008-10-10 03:56:44 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-13 07:24:19 +0200 |
commit | 199f45c45e8d4f58a5f568464be933534460eb82 (patch) | |
tree | 488e5c5e4530313aff840fc5a2074a26f6233172 /arch/powerpc | |
parent | powerpc/xics: Make printk format strings fit on one line (diff) | |
download | linux-199f45c45e8d4f58a5f568464be933534460eb82.tar.xz linux-199f45c45e8d4f58a5f568464be933534460eb82.zip |
powerpc/xics: Reduce and comment xics IPI use of memory barriers
A single full sync (mb()) is requrired to order the mmio to the qirr reg
with the set or clear of the message word. However, test_and_clear_bit
has the effect of smp_mb() and we are not doing any other io from here,
so we don't need a mb per bit processed.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 62b0400577de..e1904774a70f 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c @@ -498,26 +498,23 @@ static irqreturn_t xics_ipi_dispatch(int cpu) { WARN_ON(cpu_is_offline(cpu)); + mb(); /* order mmio clearing qirr */ while (xics_ipi_message[cpu].value) { if (test_and_clear_bit(PPC_MSG_CALL_FUNCTION, &xics_ipi_message[cpu].value)) { - mb(); smp_message_recv(PPC_MSG_CALL_FUNCTION); } if (test_and_clear_bit(PPC_MSG_RESCHEDULE, &xics_ipi_message[cpu].value)) { - mb(); smp_message_recv(PPC_MSG_RESCHEDULE); } if (test_and_clear_bit(PPC_MSG_CALL_FUNC_SINGLE, &xics_ipi_message[cpu].value)) { - mb(); smp_message_recv(PPC_MSG_CALL_FUNC_SINGLE); } #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) if (test_and_clear_bit(PPC_MSG_DEBUGGER_BREAK, &xics_ipi_message[cpu].value)) { - mb(); smp_message_recv(PPC_MSG_DEBUGGER_BREAK); } #endif |