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/include/asm/dbell.h | |
parent | b866cc2199d6a6cdcefe4acfe4cfca3ac3c6d38e (diff) | |
download | op-kernel-dev-b87ac0218355a83abb899a0022bb2e5252879fc0.zip op-kernel-dev-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/include/asm/dbell.h')
-rw-r--r-- | arch/powerpc/include/asm/dbell.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/dbell.h b/arch/powerpc/include/asm/dbell.h index a66eb59..350694a 100644 --- a/arch/powerpc/include/asm/dbell.h +++ b/arch/powerpc/include/asm/dbell.h @@ -44,6 +44,17 @@ static inline void _ppc_msgsnd(u32 msg) __asm__ __volatile__ (PPC_MSGSNDP(%0) : : "r" (msg)); } +/* sync before sending message */ +static inline void ppc_msgsnd_sync(void) +{ + __asm__ __volatile__ ("sync" : : : "memory"); +} + +/* sync after taking message interrupt */ +static inline void ppc_msgsync(void) +{ +} + #else /* CONFIG_PPC_BOOK3S */ #define PPC_DBELL_MSGTYPE PPC_DBELL @@ -53,6 +64,17 @@ static inline void _ppc_msgsnd(u32 msg) __asm__ __volatile__ (PPC_MSGSND(%0) : : "r" (msg)); } +/* sync before sending message */ +static inline void ppc_msgsnd_sync(void) +{ + __asm__ __volatile__ ("sync" : : : "memory"); +} + +/* sync after taking message interrupt */ +static inline void ppc_msgsync(void) +{ +} + #endif /* CONFIG_PPC_BOOK3S */ extern void doorbell_global_ipi(int cpu); |