diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-07-22 21:47:21 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-07-25 17:12:00 +0300 |
commit | bdda3b93e66085abf0b2c16bcdf471176e3c816a (patch) | |
tree | fa98ba2517a6d7b99fbcc77b4b15b6e9b5e369ea /arch/x86/kernel/apic/ipi.c | |
parent | bd82dba2fa6ae91061e5d31399d61fe65028f714 (diff) | |
download | linux-bdda3b93e66085abf0b2c16bcdf471176e3c816a.tar.xz |
x86/apic: Move no_ipi_broadcast() out of 32bit
For the upcoming shorthand support for all APIC incarnations the command
line option needs to be available for 64 bit as well.
While at it, rename the control variable, make it static and mark it
__ro_after_init.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190722105220.278327940@linutronix.de
Diffstat (limited to 'arch/x86/kernel/apic/ipi.c')
-rw-r--r-- | arch/x86/kernel/apic/ipi.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c index 7236fefde396..ca3bcdb7c4a8 100644 --- a/arch/x86/kernel/apic/ipi.c +++ b/arch/x86/kernel/apic/ipi.c @@ -5,6 +5,31 @@ #include "local.h" +#ifdef CONFIG_SMP +#ifdef CONFIG_HOTPLUG_CPU +#define DEFAULT_SEND_IPI (1) +#else +#define DEFAULT_SEND_IPI (0) +#endif + +static int apic_ipi_shorthand_off __ro_after_init = DEFAULT_SEND_IPI; + +static __init int apic_ipi_shorthand(char *str) +{ + get_option(&str, &apic_ipi_shorthand_off); + return 1; +} +__setup("no_ipi_broadcast=", apic_ipi_shorthand); + +static int __init print_ipi_mode(void) +{ + pr_info("IPI shorthand broadcast: %s\n", + apic_ipi_shorthand_off ? "disabled" : "enabled"); + return 0; +} +late_initcall(print_ipi_mode); +#endif + static inline int __prepare_ICR2(unsigned int mask) { return SET_APIC_DEST_FIELD(mask); @@ -203,7 +228,7 @@ void default_send_IPI_allbutself(int vector) if (num_online_cpus() < 2) return; - if (no_broadcast || vector == NMI_VECTOR) { + if (apic_ipi_shorthand_off || vector == NMI_VECTOR) { apic->send_IPI_mask_allbutself(cpu_online_mask, vector); } else { __default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector); @@ -212,7 +237,7 @@ void default_send_IPI_allbutself(int vector) void default_send_IPI_all(int vector) { - if (no_broadcast || vector == NMI_VECTOR) { + if (apic_ipi_shorthand_off || vector == NMI_VECTOR) { apic->send_IPI_mask(cpu_online_mask, vector); } else { __default_send_IPI_shortcut(APIC_DEST_ALLINC, vector); |