diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2011-05-20 20:51:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-05-22 05:48:04 -0400 |
commit | 1a8880a14270814dae0d226a2ad065d30587e60a (patch) | |
tree | db42759ef2828202fd6933541d937885c2b6169e /arch | |
parent | 69c252ffce77f4e38347d536ee4eab4aa162dc67 (diff) |
x86, apic: Make apic drivers static
Apic probe now looks at the apic drivers listed in the
.apicdrivers section. Remove apic_probe[] and make each apic
driver static.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: steiner@sgi.com
Cc: gorcunov@openvz.org
Cc: yinghai@kernel.org
Link: http://lkml.kernel.org/r/20110521005526.341718626@sbsiddha-MOBL3.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/apic.h | 7 | ||||
-rw-r--r-- | arch/x86/kernel/apic/apic_flat_64.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/apic/bigsmp_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/es7000_32.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/apic/numaq_32.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/apic/probe_32.c | 26 | ||||
-rw-r--r-- | arch/x86/kernel/apic/probe_64.c | 21 | ||||
-rw-r--r-- | arch/x86/kernel/apic/summit_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/x2apic_cluster.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/x2apic_phys.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 4 |
11 files changed, 22 insertions, 64 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index f37703dc69fe..4a0b7c7e2cce 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -478,15 +478,10 @@ static inline unsigned default_get_apic_id(unsigned long x) | |||
478 | #define DEFAULT_TRAMPOLINE_PHYS_HIGH 0x469 | 478 | #define DEFAULT_TRAMPOLINE_PHYS_HIGH 0x469 |
479 | 479 | ||
480 | #ifdef CONFIG_X86_64 | 480 | #ifdef CONFIG_X86_64 |
481 | extern struct apic apic_flat; | ||
482 | extern struct apic apic_physflat; | ||
483 | extern struct apic apic_x2apic_cluster; | ||
484 | extern struct apic apic_x2apic_phys; | ||
485 | extern int default_acpi_madt_oem_check(char *, char *); | 481 | extern int default_acpi_madt_oem_check(char *, char *); |
486 | 482 | ||
487 | extern void apic_send_IPI_self(int vector); | 483 | extern void apic_send_IPI_self(int vector); |
488 | 484 | ||
489 | extern struct apic apic_x2apic_uv_x; | ||
490 | DECLARE_PER_CPU(int, x2apic_extra_bits); | 485 | DECLARE_PER_CPU(int, x2apic_extra_bits); |
491 | 486 | ||
492 | extern int default_cpu_present_to_apicid(int mps_cpu); | 487 | extern int default_cpu_present_to_apicid(int mps_cpu); |
@@ -536,8 +531,6 @@ extern struct apic apic_noop; | |||
536 | 531 | ||
537 | #ifdef CONFIG_X86_32 | 532 | #ifdef CONFIG_X86_32 |
538 | 533 | ||
539 | extern struct apic apic_default; | ||
540 | |||
541 | static inline int noop_x86_32_early_logical_apicid(int cpu) | 534 | static inline int noop_x86_32_early_logical_apicid(int cpu) |
542 | { | 535 | { |
543 | return BAD_APICID; | 536 | return BAD_APICID; |
diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c index 6ce0f7f08c57..9570ee55e402 100644 --- a/arch/x86/kernel/apic/apic_flat_64.c +++ b/arch/x86/kernel/apic/apic_flat_64.c | |||
@@ -24,6 +24,12 @@ | |||
24 | #include <acpi/acpi_bus.h> | 24 | #include <acpi/acpi_bus.h> |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | static struct apic apic_physflat; | ||
28 | static struct apic apic_flat; | ||
29 | |||
30 | struct apic __read_mostly *apic = &apic_flat; | ||
31 | EXPORT_SYMBOL_GPL(apic); | ||
32 | |||
27 | static int flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 33 | static int flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
28 | { | 34 | { |
29 | return 1; | 35 | return 1; |
@@ -164,7 +170,7 @@ static int flat_phys_pkg_id(int initial_apic_id, int index_msb) | |||
164 | return initial_apic_id >> index_msb; | 170 | return initial_apic_id >> index_msb; |
165 | } | 171 | } |
166 | 172 | ||
167 | struct apic apic_flat = { | 173 | static struct apic apic_flat = { |
168 | .name = "flat", | 174 | .name = "flat", |
169 | .probe = NULL, | 175 | .probe = NULL, |
170 | .acpi_madt_oem_check = flat_acpi_madt_oem_check, | 176 | .acpi_madt_oem_check = flat_acpi_madt_oem_check, |
@@ -320,7 +326,7 @@ static int physflat_probe(void) | |||
320 | return 0; | 326 | return 0; |
321 | } | 327 | } |
322 | 328 | ||
323 | struct apic apic_physflat = { | 329 | static struct apic apic_physflat = { |
324 | 330 | ||
325 | .name = "physical flat", | 331 | .name = "physical flat", |
326 | .probe = physflat_probe, | 332 | .probe = physflat_probe, |
diff --git a/arch/x86/kernel/apic/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c index 479a06c233d0..efd737e827f4 100644 --- a/arch/x86/kernel/apic/bigsmp_32.c +++ b/arch/x86/kernel/apic/bigsmp_32.c | |||
@@ -193,7 +193,7 @@ static int probe_bigsmp(void) | |||
193 | return dmi_bigsmp; | 193 | return dmi_bigsmp; |
194 | } | 194 | } |
195 | 195 | ||
196 | struct apic apic_bigsmp = { | 196 | static struct apic apic_bigsmp = { |
197 | 197 | ||
198 | .name = "bigsmp", | 198 | .name = "bigsmp", |
199 | .probe = probe_bigsmp, | 199 | .probe = probe_bigsmp, |
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c index 80de0d78cbca..9536b3fe43f8 100644 --- a/arch/x86/kernel/apic/es7000_32.c +++ b/arch/x86/kernel/apic/es7000_32.c | |||
@@ -620,7 +620,7 @@ static int es7000_mps_oem_check_cluster(struct mpc_table *mpc, char *oem, | |||
620 | } | 620 | } |
621 | 621 | ||
622 | /* We've been warned by a false positive warning.Use __refdata to keep calm. */ | 622 | /* We've been warned by a false positive warning.Use __refdata to keep calm. */ |
623 | struct apic __refdata apic_es7000_cluster = { | 623 | static struct apic __refdata apic_es7000_cluster = { |
624 | 624 | ||
625 | .name = "es7000", | 625 | .name = "es7000", |
626 | .probe = probe_es7000, | 626 | .probe = probe_es7000, |
@@ -685,7 +685,7 @@ struct apic __refdata apic_es7000_cluster = { | |||
685 | .x86_32_early_logical_apicid = es7000_early_logical_apicid, | 685 | .x86_32_early_logical_apicid = es7000_early_logical_apicid, |
686 | }; | 686 | }; |
687 | 687 | ||
688 | struct apic __refdata apic_es7000 = { | 688 | static struct apic __refdata apic_es7000 = { |
689 | 689 | ||
690 | .name = "es7000", | 690 | .name = "es7000", |
691 | .probe = probe_es7000, | 691 | .probe = probe_es7000, |
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c index 4caab0d13d99..c4a61ca1349a 100644 --- a/arch/x86/kernel/apic/numaq_32.c +++ b/arch/x86/kernel/apic/numaq_32.c | |||
@@ -472,8 +472,8 @@ static void numaq_setup_portio_remap(void) | |||
472 | (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); | 472 | (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); |
473 | } | 473 | } |
474 | 474 | ||
475 | /* Use __refdata to keep false positive warning calm. */ | 475 | /* Use __refdata to keep false positive warning calm. */ |
476 | struct apic __refdata apic_numaq = { | 476 | static struct apic __refdata apic_numaq = { |
477 | 477 | ||
478 | .name = "NUMAQ", | 478 | .name = "NUMAQ", |
479 | .probe = probe_numaq, | 479 | .probe = probe_numaq, |
diff --git a/arch/x86/kernel/apic/probe_32.c b/arch/x86/kernel/apic/probe_32.c index c81756d8d4ec..b5254ad044ab 100644 --- a/arch/x86/kernel/apic/probe_32.c +++ b/arch/x86/kernel/apic/probe_32.c | |||
@@ -87,7 +87,7 @@ static int probe_default(void) | |||
87 | return 1; | 87 | return 1; |
88 | } | 88 | } |
89 | 89 | ||
90 | struct apic apic_default = { | 90 | static struct apic apic_default = { |
91 | 91 | ||
92 | .name = "default", | 92 | .name = "default", |
93 | .probe = probe_default, | 93 | .probe = probe_default, |
@@ -151,33 +151,9 @@ struct apic apic_default = { | |||
151 | 151 | ||
152 | apic_driver(apic_default); | 152 | apic_driver(apic_default); |
153 | 153 | ||
154 | extern struct apic apic_numaq; | ||
155 | extern struct apic apic_summit; | ||
156 | extern struct apic apic_bigsmp; | ||
157 | extern struct apic apic_es7000; | ||
158 | extern struct apic apic_es7000_cluster; | ||
159 | |||
160 | struct apic *apic = &apic_default; | 154 | struct apic *apic = &apic_default; |
161 | EXPORT_SYMBOL_GPL(apic); | 155 | EXPORT_SYMBOL_GPL(apic); |
162 | 156 | ||
163 | static struct apic *apic_probe[] __initdata = { | ||
164 | #ifdef CONFIG_X86_NUMAQ | ||
165 | &apic_numaq, | ||
166 | #endif | ||
167 | #ifdef CONFIG_X86_SUMMIT | ||
168 | &apic_summit, | ||
169 | #endif | ||
170 | #ifdef CONFIG_X86_BIGSMP | ||
171 | &apic_bigsmp, | ||
172 | #endif | ||
173 | #ifdef CONFIG_X86_ES7000 | ||
174 | &apic_es7000, | ||
175 | &apic_es7000_cluster, | ||
176 | #endif | ||
177 | &apic_default, /* must be last */ | ||
178 | NULL, | ||
179 | }; | ||
180 | |||
181 | static int cmdline_apic __initdata; | 157 | static int cmdline_apic __initdata; |
182 | static int __init parse_apic(char *arg) | 158 | static int __init parse_apic(char *arg) |
183 | { | 159 | { |
diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c index e2c361d0fb96..3fe986698929 100644 --- a/arch/x86/kernel/apic/probe_64.c +++ b/arch/x86/kernel/apic/probe_64.c | |||
@@ -23,27 +23,6 @@ | |||
23 | #include <asm/ipi.h> | 23 | #include <asm/ipi.h> |
24 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
25 | 25 | ||
26 | extern struct apic apic_flat; | ||
27 | extern struct apic apic_physflat; | ||
28 | extern struct apic apic_x2xpic_uv_x; | ||
29 | extern struct apic apic_x2apic_phys; | ||
30 | extern struct apic apic_x2apic_cluster; | ||
31 | |||
32 | struct apic __read_mostly *apic = &apic_flat; | ||
33 | EXPORT_SYMBOL_GPL(apic); | ||
34 | |||
35 | static struct apic *apic_probe[] __initdata = { | ||
36 | #ifdef CONFIG_X86_UV | ||
37 | &apic_x2apic_uv_x, | ||
38 | #endif | ||
39 | #ifdef CONFIG_X86_X2APIC | ||
40 | &apic_x2apic_phys, | ||
41 | &apic_x2apic_cluster, | ||
42 | #endif | ||
43 | &apic_physflat, | ||
44 | NULL, | ||
45 | }; | ||
46 | |||
47 | static int apicid_phys_pkg_id(int initial_apic_id, int index_msb) | 26 | static int apicid_phys_pkg_id(int initial_apic_id, int index_msb) |
48 | { | 27 | { |
49 | return hard_smp_processor_id() >> index_msb; | 28 | return hard_smp_processor_id() >> index_msb; |
diff --git a/arch/x86/kernel/apic/summit_32.c b/arch/x86/kernel/apic/summit_32.c index 447ec0fa9aa1..19114423c58c 100644 --- a/arch/x86/kernel/apic/summit_32.c +++ b/arch/x86/kernel/apic/summit_32.c | |||
@@ -491,7 +491,7 @@ void setup_summit(void) | |||
491 | } | 491 | } |
492 | #endif | 492 | #endif |
493 | 493 | ||
494 | struct apic apic_summit = { | 494 | static struct apic apic_summit = { |
495 | 495 | ||
496 | .name = "summit", | 496 | .name = "summit", |
497 | .probe = probe_summit, | 497 | .probe = probe_summit, |
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c index 7595c5775a54..500795875827 100644 --- a/arch/x86/kernel/apic/x2apic_cluster.c +++ b/arch/x86/kernel/apic/x2apic_cluster.c | |||
@@ -208,7 +208,7 @@ static int x2apic_cluster_probe(void) | |||
208 | return 0; | 208 | return 0; |
209 | } | 209 | } |
210 | 210 | ||
211 | struct apic apic_x2apic_cluster = { | 211 | static struct apic apic_x2apic_cluster = { |
212 | 212 | ||
213 | .name = "cluster x2apic", | 213 | .name = "cluster x2apic", |
214 | .probe = x2apic_cluster_probe, | 214 | .probe = x2apic_cluster_probe, |
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c index f7ba21cb3e25..f5373dfde21e 100644 --- a/arch/x86/kernel/apic/x2apic_phys.c +++ b/arch/x86/kernel/apic/x2apic_phys.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | int x2apic_phys; | 12 | int x2apic_phys; |
13 | 13 | ||
14 | static struct apic apic_x2apic_phys; | ||
15 | |||
14 | static int set_x2apic_phys_mode(char *arg) | 16 | static int set_x2apic_phys_mode(char *arg) |
15 | { | 17 | { |
16 | x2apic_phys = 1; | 18 | x2apic_phys = 1; |
@@ -112,7 +114,7 @@ static int x2apic_phys_probe(void) | |||
112 | return apic == &apic_x2apic_phys; | 114 | return apic == &apic_x2apic_phys; |
113 | } | 115 | } |
114 | 116 | ||
115 | struct apic apic_x2apic_phys = { | 117 | static struct apic apic_x2apic_phys = { |
116 | 118 | ||
117 | .name = "physical x2apic", | 119 | .name = "physical x2apic", |
118 | .probe = x2apic_phys_probe, | 120 | .probe = x2apic_phys_probe, |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index b6c629838f00..f450b683dfcf 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -58,6 +58,8 @@ unsigned int uv_apicid_hibits; | |||
58 | EXPORT_SYMBOL_GPL(uv_apicid_hibits); | 58 | EXPORT_SYMBOL_GPL(uv_apicid_hibits); |
59 | static DEFINE_SPINLOCK(uv_nmi_lock); | 59 | static DEFINE_SPINLOCK(uv_nmi_lock); |
60 | 60 | ||
61 | static struct apic apic_x2apic_uv_x; | ||
62 | |||
61 | static unsigned long __init uv_early_read_mmr(unsigned long addr) | 63 | static unsigned long __init uv_early_read_mmr(unsigned long addr) |
62 | { | 64 | { |
63 | unsigned long val, *mmr; | 65 | unsigned long val, *mmr; |
@@ -331,7 +333,7 @@ static int uv_probe(void) | |||
331 | return apic == &apic_x2apic_uv_x; | 333 | return apic == &apic_x2apic_uv_x; |
332 | } | 334 | } |
333 | 335 | ||
334 | struct apic __refdata apic_x2apic_uv_x = { | 336 | static struct apic __refdata apic_x2apic_uv_x = { |
335 | 337 | ||
336 | .name = "UV large system", | 338 | .name = "UV large system", |
337 | .probe = uv_probe, | 339 | .probe = uv_probe, |