diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/kernel/genapic_flat.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c index c66ca7b1d31a..21c7066e236a 100644 --- a/arch/x86_64/kernel/genapic_flat.c +++ b/arch/x86_64/kernel/genapic_flat.c | |||
@@ -78,22 +78,29 @@ static void flat_send_IPI_mask(cpumask_t cpumask, int vector) | |||
78 | 78 | ||
79 | static void flat_send_IPI_allbutself(int vector) | 79 | static void flat_send_IPI_allbutself(int vector) |
80 | { | 80 | { |
81 | #ifndef CONFIG_HOTPLUG_CPU | 81 | #ifdef CONFIG_HOTPLUG_CPU |
82 | if (((num_online_cpus()) - 1) >= 1) | 82 | int hotplug = 1; |
83 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); | ||
84 | #else | 83 | #else |
85 | cpumask_t allbutme = cpu_online_map; | 84 | int hotplug = 0; |
85 | #endif | ||
86 | if (hotplug || vector == NMI_VECTOR) { | ||
87 | cpumask_t allbutme = cpu_online_map; | ||
86 | 88 | ||
87 | cpu_clear(smp_processor_id(), allbutme); | 89 | cpu_clear(smp_processor_id(), allbutme); |
88 | 90 | ||
89 | if (!cpus_empty(allbutme)) | 91 | if (!cpus_empty(allbutme)) |
90 | flat_send_IPI_mask(allbutme, vector); | 92 | flat_send_IPI_mask(allbutme, vector); |
91 | #endif | 93 | } else if (num_online_cpus() > 1) { |
94 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); | ||
95 | } | ||
92 | } | 96 | } |
93 | 97 | ||
94 | static void flat_send_IPI_all(int vector) | 98 | static void flat_send_IPI_all(int vector) |
95 | { | 99 | { |
96 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL); | 100 | if (vector == NMI_VECTOR) |
101 | flat_send_IPI_mask(cpu_online_map, vector); | ||
102 | else | ||
103 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL); | ||
97 | } | 104 | } |
98 | 105 | ||
99 | static int flat_apic_id_registered(void) | 106 | static int flat_apic_id_registered(void) |