diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-04-13 20:16:22 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-13 23:34:33 +1000 |
commit | b87ac0218355a83abb899a0022bb2e5252879fc0 (patch) | |
tree | 2163874a33e22901d42faeceba3b99e1d25eab05 /arch/powerpc/kernel/smp.c | |
parent | b866cc2199d6a6cdcefe4acfe4cfca3ac3c6d38e (diff) | |
download | linux-b87ac0218355a83abb899a0022bb2e5252879fc0.tar.bz2 |
powerpc: Introduce msgsnd/doorbell barrier primitives
POWER9 changes requirements and adds new instructions for
synchronization.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r-- | arch/powerpc/kernel/smp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 17de938d41c5..2eca1e491e2b 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -246,11 +246,17 @@ void smp_muxed_ipi_message_pass(int cpu, int msg) irqreturn_t smp_ipi_demux(void) { + mb(); /* order any irq clear */ + + return smp_ipi_demux_relaxed(); +} + +/* sync-free variant. Callers should ensure synchronization */ +irqreturn_t smp_ipi_demux_relaxed(void) +{ struct cpu_messages *info; unsigned long all; - mb(); /* order any irq clear */ - info = this_cpu_ptr(&ipi_message); do { all = xchg(&info->messages, 0); |