Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5adf282 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman
Browse files

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: default avatarNicholas Piggin <npiggin@gmail.com>
[mpe: Change log detail]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent b87ac021
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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 */