aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/smp.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-04-13 20:16:22 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2017-04-13 23:34:33 +1000
commitb87ac0218355a83abb899a0022bb2e5252879fc0 (patch)
tree2163874a33e22901d42faeceba3b99e1d25eab05 /arch/powerpc/kernel/smp.c
parentb866cc2199d6a6cdcefe4acfe4cfca3ac3c6d38e (diff)
downloadlinux-b87ac0218355a83abb899a0022bb2e5252879fc0.tar.gz
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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 17de938d41c5df..2eca1e491e2b80 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);