x86/apic: Provide and use helper for send_IPI_allbutself()
To support IPI shorthands wrap invocations of apic->send_IPI_allbutself() in a helper function, so the static key controlling the shorthand mode is only in one place. Fixup all callers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20190722105220.492691679@linutronix.de
This commit is contained in:
@@ -50,6 +50,18 @@ void apic_smt_update(void)
|
||||
static_branch_enable(&apic_use_ipi_shorthand);
|
||||
}
|
||||
}
|
||||
|
||||
void apic_send_IPI_allbutself(unsigned int vector)
|
||||
{
|
||||
if (num_online_cpus() < 2)
|
||||
return;
|
||||
|
||||
if (static_branch_likely(&apic_use_ipi_shorthand))
|
||||
apic->send_IPI_allbutself(vector);
|
||||
else
|
||||
apic->send_IPI_mask_allbutself(cpu_online_mask, vector);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
static inline int __prepare_ICR2(unsigned int mask)
|
||||
|
Reference in New Issue
Block a user