summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-04-13 20:16:23 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2017-04-13 23:34:34 +1000
commita5adf282461fb6048973ca3aec590495bdbc33f1 (patch)
tree6669b7ef6c5613c8cb70f02c478885f234594a65
parentb87ac0218355a83abb899a0022bb2e5252879fc0 (diff)
downloadop-kernel-dev-a5adf282461fb6048973ca3aec590495bdbc33f1.zip
op-kernel-dev-a5adf282461fb6048973ca3aec590495bdbc33f1.tar.gz
powerpc/64s: Avoid a branch for ppc_msgsnd
IPIs are a pretty hot path and we already have the ability to do asm feature patching, so use it. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Change log detail] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/include/asm/dbell.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/dbell.h b/arch/powerpc/include/asm/dbell.h
index 350694a..0409446 100644
--- a/arch/powerpc/include/asm/dbell.h
+++ b/arch/powerpc/include/asm/dbell.h
@@ -38,10 +38,8 @@ enum ppc_dbell {
static inline void _ppc_msgsnd(u32 msg)
{
- if (cpu_has_feature(CPU_FTR_HVMODE))
- __asm__ __volatile__ (PPC_MSGSND(%0) : : "r" (msg));
- else
- __asm__ __volatile__ (PPC_MSGSNDP(%0) : : "r" (msg));
+ __asm__ __volatile__ (ASM_FTR_IFSET(PPC_MSGSND(%1), PPC_MSGSNDP(%1), %0)
+ : : "i" (CPU_FTR_HVMODE), "r" (msg));
}
/* sync before sending message */
OpenPOWER on IntegriCloud