aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/apic.h5
-rw-r--r--arch/x86/include/asm/x2apic.h9
-rw-r--r--arch/x86/kernel/apic/apic_flat_64.c14
-rw-r--r--arch/x86/kernel/apic/apic_numachip.c7
-rw-r--r--arch/x86/kernel/apic/bigsmp_32.c11
-rw-r--r--arch/x86/kernel/apic/x2apic_cluster.c2
-rw-r--r--arch/x86/kernel/apic/x2apic_phys.c2
-rw-r--r--arch/x86/kernel/apic/x2apic_uv_x.c7
8 files changed, 12 insertions, 45 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index eaff4790ed96..fc38195d6405 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -537,6 +537,11 @@ static inline const struct cpumask *default_target_cpus(void)
537#endif 537#endif
538} 538}
539 539
540static inline const struct cpumask *online_target_cpus(void)
541{
542 return cpu_online_mask;
543}
544
540DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); 545DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
541 546
542 547
diff --git a/arch/x86/include/asm/x2apic.h b/arch/x86/include/asm/x2apic.h
index 7a5a832a99b6..f90f0a587c66 100644
--- a/arch/x86/include/asm/x2apic.h
+++ b/arch/x86/include/asm/x2apic.h
@@ -9,15 +9,6 @@
9#include <asm/ipi.h> 9#include <asm/ipi.h>
10#include <linux/cpumask.h> 10#include <linux/cpumask.h>
11 11
12/*
13 * Need to use more than cpu 0, because we need more vectors
14 * when MSI-X are used.
15 */
16static const struct cpumask *x2apic_target_cpus(void)
17{
18 return cpu_online_mask;
19}
20
21static int x2apic_apic_id_valid(int apicid) 12static int x2apic_apic_id_valid(int apicid)
22{ 13{
23 return 1; 14 return 1;
diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
index de279b32ceb1..61ac1afeff07 100644
--- a/arch/x86/kernel/apic/apic_flat_64.c
+++ b/arch/x86/kernel/apic/apic_flat_64.c
@@ -36,11 +36,6 @@ static int flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
36 return 1; 36 return 1;
37} 37}
38 38
39static const struct cpumask *flat_target_cpus(void)
40{
41 return cpu_online_mask;
42}
43
44static void flat_vector_allocation_domain(int cpu, struct cpumask *retmask) 39static void flat_vector_allocation_domain(int cpu, struct cpumask *retmask)
45{ 40{
46 /* Careful. Some cpus do not strictly honor the set of cpus 41 /* Careful. Some cpus do not strictly honor the set of cpus
@@ -186,7 +181,7 @@ static struct apic apic_flat = {
186 .irq_delivery_mode = dest_LowestPrio, 181 .irq_delivery_mode = dest_LowestPrio,
187 .irq_dest_mode = 1, /* logical */ 182 .irq_dest_mode = 1, /* logical */
188 183
189 .target_cpus = flat_target_cpus, 184 .target_cpus = online_target_cpus,
190 .disable_esr = 0, 185 .disable_esr = 0,
191 .dest_logical = APIC_DEST_LOGICAL, 186 .dest_logical = APIC_DEST_LOGICAL,
192 .check_apicid_used = NULL, 187 .check_apicid_used = NULL,
@@ -262,11 +257,6 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
262 return 0; 257 return 0;
263} 258}
264 259
265static const struct cpumask *physflat_target_cpus(void)
266{
267 return cpu_online_mask;
268}
269
270static void physflat_vector_allocation_domain(int cpu, struct cpumask *retmask) 260static void physflat_vector_allocation_domain(int cpu, struct cpumask *retmask)
271{ 261{
272 cpumask_clear(retmask); 262 cpumask_clear(retmask);
@@ -345,7 +335,7 @@ static struct apic apic_physflat = {
345 .irq_delivery_mode = dest_Fixed, 335 .irq_delivery_mode = dest_Fixed,
346 .irq_dest_mode = 0, /* physical */ 336 .irq_dest_mode = 0, /* physical */
347 337
348 .target_cpus = physflat_target_cpus, 338 .target_cpus = online_target_cpus,
349 .disable_esr = 0, 339 .disable_esr = 0,
350 .dest_logical = 0, 340 .dest_logical = 0,
351 .check_apicid_used = NULL, 341 .check_apicid_used = NULL,
diff --git a/arch/x86/kernel/apic/apic_numachip.c b/arch/x86/kernel/apic/apic_numachip.c
index 6ec6d5d297c3..3255a60fcc95 100644
--- a/arch/x86/kernel/apic/apic_numachip.c
+++ b/arch/x86/kernel/apic/apic_numachip.c
@@ -72,11 +72,6 @@ static int numachip_phys_pkg_id(int initial_apic_id, int index_msb)
72 return initial_apic_id >> index_msb; 72 return initial_apic_id >> index_msb;
73} 73}
74 74
75static const struct cpumask *numachip_target_cpus(void)
76{
77 return cpu_online_mask;
78}
79
80static void numachip_vector_allocation_domain(int cpu, struct cpumask *retmask) 75static void numachip_vector_allocation_domain(int cpu, struct cpumask *retmask)
81{ 76{
82 cpumask_clear(retmask); 77 cpumask_clear(retmask);
@@ -253,7 +248,7 @@ static struct apic apic_numachip __refconst = {
253 .irq_delivery_mode = dest_Fixed, 248 .irq_delivery_mode = dest_Fixed,
254 .irq_dest_mode = 0, /* physical */ 249 .irq_dest_mode = 0, /* physical */
255 250
256 .target_cpus = numachip_target_cpus, 251 .target_cpus = online_target_cpus,
257 .disable_esr = 0, 252 .disable_esr = 0,
258 .dest_logical = 0, 253 .dest_logical = 0,
259 .check_apicid_used = NULL, 254 .check_apicid_used = NULL,
diff --git a/arch/x86/kernel/apic/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c
index 31fbdbfbf960..c288e81e00ff 100644
--- a/arch/x86/kernel/apic/bigsmp_32.c
+++ b/arch/x86/kernel/apic/bigsmp_32.c
@@ -26,15 +26,6 @@ static int bigsmp_apic_id_registered(void)
26 return 1; 26 return 1;
27} 27}
28 28
29static const struct cpumask *bigsmp_target_cpus(void)
30{
31#ifdef CONFIG_SMP
32 return cpu_online_mask;
33#else
34 return cpumask_of(0);
35#endif
36}
37
38static unsigned long bigsmp_check_apicid_used(physid_mask_t *map, int apicid) 29static unsigned long bigsmp_check_apicid_used(physid_mask_t *map, int apicid)
39{ 30{
40 return 0; 31 return 0;
@@ -205,7 +196,7 @@ static struct apic apic_bigsmp = {
205 /* phys delivery to target CPU: */ 196 /* phys delivery to target CPU: */
206 .irq_dest_mode = 0, 197 .irq_dest_mode = 0,
207 198
208 .target_cpus = bigsmp_target_cpus, 199 .target_cpus = default_target_cpus,
209 .disable_esr = 1, 200 .disable_esr = 1,
210 .dest_logical = 0, 201 .dest_logical = 0,
211 .check_apicid_used = bigsmp_check_apicid_used, 202 .check_apicid_used = bigsmp_check_apicid_used,
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
index 2919e45d30c3..612622c47dfb 100644
--- a/arch/x86/kernel/apic/x2apic_cluster.c
+++ b/arch/x86/kernel/apic/x2apic_cluster.c
@@ -241,7 +241,7 @@ static struct apic apic_x2apic_cluster = {
241 .irq_delivery_mode = dest_LowestPrio, 241 .irq_delivery_mode = dest_LowestPrio,
242 .irq_dest_mode = 1, /* logical */ 242 .irq_dest_mode = 1, /* logical */
243 243
244 .target_cpus = x2apic_target_cpus, 244 .target_cpus = online_target_cpus,
245 .disable_esr = 0, 245 .disable_esr = 0,
246 .dest_logical = APIC_DEST_LOGICAL, 246 .dest_logical = APIC_DEST_LOGICAL,
247 .check_apicid_used = NULL, 247 .check_apicid_used = NULL,
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
index 93b25706f177..b1a8b39e3c3f 100644
--- a/arch/x86/kernel/apic/x2apic_phys.c
+++ b/arch/x86/kernel/apic/x2apic_phys.c
@@ -140,7 +140,7 @@ static struct apic apic_x2apic_phys = {
140 .irq_delivery_mode = dest_Fixed, 140 .irq_delivery_mode = dest_Fixed,
141 .irq_dest_mode = 0, /* physical */ 141 .irq_dest_mode = 0, /* physical */
142 142
143 .target_cpus = x2apic_target_cpus, 143 .target_cpus = online_target_cpus,
144 .disable_esr = 0, 144 .disable_esr = 0,
145 .dest_logical = 0, 145 .dest_logical = 0,
146 .check_apicid_used = NULL, 146 .check_apicid_used = NULL,
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index c6d03f7a4401..16efb92bfea5 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -185,11 +185,6 @@ EXPORT_SYMBOL_GPL(uv_possible_blades);
185unsigned long sn_rtc_cycles_per_second; 185unsigned long sn_rtc_cycles_per_second;
186EXPORT_SYMBOL(sn_rtc_cycles_per_second); 186EXPORT_SYMBOL(sn_rtc_cycles_per_second);
187 187
188static const struct cpumask *uv_target_cpus(void)
189{
190 return cpu_online_mask;
191}
192
193static void uv_vector_allocation_domain(int cpu, struct cpumask *retmask) 188static void uv_vector_allocation_domain(int cpu, struct cpumask *retmask)
194{ 189{
195 cpumask_clear(retmask); 190 cpumask_clear(retmask);
@@ -362,7 +357,7 @@ static struct apic __refdata apic_x2apic_uv_x = {
362 .irq_delivery_mode = dest_Fixed, 357 .irq_delivery_mode = dest_Fixed,
363 .irq_dest_mode = 0, /* physical */ 358 .irq_dest_mode = 0, /* physical */
364 359
365 .target_cpus = uv_target_cpus, 360 .target_cpus = online_target_cpus,
366 .disable_esr = 0, 361 .disable_esr = 0,
367 .dest_logical = APIC_DEST_LOGICAL, 362 .dest_logical = APIC_DEST_LOGICAL,
368 .check_apicid_used = NULL, 363 .check_apicid_used = NULL,