x86/apic/x2apic: Implement IPI shorthands support
All callers of apic->send_IPI_all() and apic->send_IPI_allbutself() contain the decision logic for shorthand invocation already and invoke send_IPI_mask() if the prereqisites are not satisfied. Implement shorthand support for x2apic. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20190722105221.134696837@linutronix.de
This commit is contained in:
@@ -75,12 +75,12 @@ static void
|
||||
|
||||
static void x2apic_send_IPI_allbutself(int vector)
|
||||
{
|
||||
__x2apic_send_IPI_mask(cpu_online_mask, vector, APIC_DEST_ALLBUT);
|
||||
__x2apic_send_IPI_shorthand(vector, APIC_DEST_ALLBUT);
|
||||
}
|
||||
|
||||
static void x2apic_send_IPI_all(int vector)
|
||||
{
|
||||
__x2apic_send_IPI_mask(cpu_online_mask, vector, APIC_DEST_ALLINC);
|
||||
__x2apic_send_IPI_shorthand(vector, APIC_DEST_ALLINC);
|
||||
}
|
||||
|
||||
static void init_x2apic_ldr(void)
|
||||
@@ -112,6 +112,14 @@ void __x2apic_send_IPI_dest(unsigned int apicid, int vector, unsigned int dest)
|
||||
native_x2apic_icr_write(cfg, apicid);
|
||||
}
|
||||
|
||||
void __x2apic_send_IPI_shorthand(int vector, u32 which)
|
||||
{
|
||||
unsigned long cfg = __prepare_ICR(which, vector, 0);
|
||||
|
||||
x2apic_wrmsr_fence();
|
||||
native_x2apic_icr_write(cfg, 0);
|
||||
}
|
||||
|
||||
unsigned int x2apic_get_apic_id(unsigned long id)
|
||||
{
|
||||
return id;
|
||||
|
Reference in New Issue
Block a user