Commit 3994ff90 authored by Thomas Gleixner's avatar Thomas Gleixner

x86/apic: Remove dest argument from __default_send_IPI_shortcut()

The SDM states:

  "The destination shorthand field of the ICR allows the delivery mode to be
   by-passed in favor of broadcasting the IPI to all the processors on the
   system bus and/or back to itself (see Section 10.6.1, Interrupt Command
   Register (ICR)). Three destination shorthands are supported: self, all
   excluding self, and all including self. The destination mode is ignored
   when a destination shorthand is used."

So there is no point to supply the destination mode to the shorthand
delivery function.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190722105220.094613426@linutronix.de
parent 60dcaad5
...@@ -90,8 +90,7 @@ static void flat_send_IPI_allbutself(int vector) ...@@ -90,8 +90,7 @@ static void flat_send_IPI_allbutself(int vector)
_flat_send_IPI_mask(mask, vector); _flat_send_IPI_mask(mask, vector);
} }
} else if (num_online_cpus() > 1) { } else if (num_online_cpus() > 1) {
__default_send_IPI_shortcut(APIC_DEST_ALLBUT, __default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
vector, apic->dest_logical);
} }
} }
...@@ -100,8 +99,7 @@ static void flat_send_IPI_all(int vector) ...@@ -100,8 +99,7 @@ static void flat_send_IPI_all(int vector)
if (vector == NMI_VECTOR) { if (vector == NMI_VECTOR) {
flat_send_IPI_mask(cpu_online_mask, vector); flat_send_IPI_mask(cpu_online_mask, vector);
} else { } else {
__default_send_IPI_shortcut(APIC_DEST_ALLINC, __default_send_IPI_shortcut(APIC_DEST_ALLINC, vector);
vector, apic->dest_logical);
} }
} }
......
...@@ -16,7 +16,7 @@ static inline void __xapic_wait_icr_idle(void) ...@@ -16,7 +16,7 @@ static inline void __xapic_wait_icr_idle(void)
cpu_relax(); cpu_relax();
} }
void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest) void __default_send_IPI_shortcut(unsigned int shortcut, int vector)
{ {
/* /*
* Subtle. In the case of the 'never do double writes' workaround * Subtle. In the case of the 'never do double writes' workaround
...@@ -33,9 +33,10 @@ void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int ...@@ -33,9 +33,10 @@ void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int
__xapic_wait_icr_idle(); __xapic_wait_icr_idle();
/* /*
* No need to touch the target chip field * No need to touch the target chip field. Also the destination
* mode is ignored when a shorthand is used.
*/ */
cfg = __prepare_ICR(shortcut, vector, dest); cfg = __prepare_ICR(shortcut, vector, 0);
/* /*
* Send the IPI. The write to APIC_ICR fires this off. * Send the IPI. The write to APIC_ICR fires this off.
...@@ -202,8 +203,7 @@ void default_send_IPI_allbutself(int vector) ...@@ -202,8 +203,7 @@ void default_send_IPI_allbutself(int vector)
if (no_broadcast || vector == NMI_VECTOR) { if (no_broadcast || vector == NMI_VECTOR) {
apic->send_IPI_mask_allbutself(cpu_online_mask, vector); apic->send_IPI_mask_allbutself(cpu_online_mask, vector);
} else { } else {
__default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector, __default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
apic->dest_logical);
} }
} }
...@@ -212,14 +212,13 @@ void default_send_IPI_all(int vector) ...@@ -212,14 +212,13 @@ void default_send_IPI_all(int vector)
if (no_broadcast || vector == NMI_VECTOR) { if (no_broadcast || vector == NMI_VECTOR) {
apic->send_IPI_mask(cpu_online_mask, vector); apic->send_IPI_mask(cpu_online_mask, vector);
} else { } else {
__default_send_IPI_shortcut(APIC_DEST_ALLINC, vector, __default_send_IPI_shortcut(APIC_DEST_ALLINC, vector);
apic->dest_logical);
} }
} }
void default_send_IPI_self(int vector) void default_send_IPI_self(int vector)
{ {
__default_send_IPI_shortcut(APIC_DEST_SELF, vector, apic->dest_logical); __default_send_IPI_shortcut(APIC_DEST_SELF, vector);
} }
/* must come after the send_IPI functions above for inlining */ /* must come after the send_IPI functions above for inlining */
......
...@@ -38,7 +38,7 @@ static inline unsigned int __prepare_ICR(unsigned int shortcut, int vector, ...@@ -38,7 +38,7 @@ static inline unsigned int __prepare_ICR(unsigned int shortcut, int vector,
return icr; return icr;
} }
void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest); void __default_send_IPI_shortcut(unsigned int shortcut, int vector);
/* /*
* This is used to send an IPI with no shorthand notation (the destination is * This is used to send an IPI with no shorthand notation (the destination is
......
...@@ -40,7 +40,7 @@ void __init default_setup_apic_routing(void) ...@@ -40,7 +40,7 @@ void __init default_setup_apic_routing(void)
void apic_send_IPI_self(int vector) void apic_send_IPI_self(int vector)
{ {
__default_send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL); __default_send_IPI_shortcut(APIC_DEST_SELF, vector);
} }
int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id) int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment