Skip to content

Commit 1f0ad66

Browse files
committed
x86/apic: Remove the shorthand decision logic
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. Remove the now redundant decision logic in the 32bit implementation. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 832df3d commit 1f0ad66

File tree

1 file changed

+3
-24
lines changed
  • arch/x86/kernel/apic

1 file changed

+3
-24
lines changed

arch/x86/kernel/apic/ipi.c

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@
88
DEFINE_STATIC_KEY_FALSE(apic_use_ipi_shorthand);
99

1010
#ifdef CONFIG_SMP
11-
#ifdef CONFIG_HOTPLUG_CPU
12-
#define DEFAULT_SEND_IPI (1)
13-
#else
14-
#define DEFAULT_SEND_IPI (0)
15-
#endif
16-
17-
static int apic_ipi_shorthand_off __ro_after_init = DEFAULT_SEND_IPI;
11+
static int apic_ipi_shorthand_off __ro_after_init;
1812

1913
static __init int apic_ipi_shorthand(char *str)
2014
{
@@ -293,27 +287,12 @@ void default_send_IPI_mask_logical(const struct cpumask *cpumask, int vector)
293287

294288
void default_send_IPI_allbutself(int vector)
295289
{
296-
/*
297-
* if there are no other CPUs in the system then we get an APIC send
298-
* error if we try to broadcast, thus avoid sending IPIs in this case.
299-
*/
300-
if (num_online_cpus() < 2)
301-
return;
302-
303-
if (apic_ipi_shorthand_off || vector == NMI_VECTOR) {
304-
apic->send_IPI_mask_allbutself(cpu_online_mask, vector);
305-
} else {
306-
__default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
307-
}
290+
__default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
308291
}
309292

310293
void default_send_IPI_all(int vector)
311294
{
312-
if (apic_ipi_shorthand_off || vector == NMI_VECTOR) {
313-
apic->send_IPI_mask(cpu_online_mask, vector);
314-
} else {
315-
__default_send_IPI_shortcut(APIC_DEST_ALLINC, vector);
316-
}
295+
__default_send_IPI_shortcut(APIC_DEST_ALLINC, vector);
317296
}
318297

319298
void default_send_IPI_self(int vector)

0 commit comments

Comments
 (0)