aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mach-generic/probe.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 13:11:44 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-29 08:16:50 -0500
commit7b38725318f4517af6168ccbff99060d67aba1c8 (patch)
tree043e61f93a24a67ef7ca348924bd740361518ae0 /arch/x86/mach-generic/probe.c
parentd53e2f2855f1c7c2725d550c1ae6b26f4d671c50 (diff)
x86: remove subarchitecture support code
Remove remaining bits of the subarchitecture code. Now that all the special platforms are runtime probed and runtime handled, we can remove these facilities. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mach-generic/probe.c')
-rw-r--r--arch/x86/mach-generic/probe.c156
1 files changed, 0 insertions, 156 deletions
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c
deleted file mode 100644
index c03c72221320..000000000000
--- a/arch/x86/mach-generic/probe.c
+++ /dev/null
@@ -1,156 +0,0 @@
1/*
2 * Copyright 2003 Andi Kleen, SuSE Labs.
3 * Subject to the GNU Public License, v.2
4 *
5 * Generic x86 APIC driver probe layer.
6 */
7#include <linux/threads.h>
8#include <linux/cpumask.h>
9#include <linux/string.h>
10#include <linux/kernel.h>
11#include <linux/ctype.h>
12#include <linux/init.h>
13#include <linux/errno.h>
14#include <asm/fixmap.h>
15#include <asm/mpspec.h>
16#include <asm/apicdef.h>
17#include <asm/genapic.h>
18#include <asm/setup.h>
19
20extern struct genapic apic_numaq;
21extern struct genapic apic_summit;
22extern struct genapic apic_bigsmp;
23extern struct genapic apic_es7000;
24extern struct genapic apic_default;
25
26struct genapic *apic = &apic_default;
27
28static struct genapic *apic_probe[] __initdata = {
29#ifdef CONFIG_X86_NUMAQ
30 &apic_numaq,
31#endif
32#ifdef CONFIG_X86_SUMMIT
33 &apic_summit,
34#endif
35#ifdef CONFIG_X86_BIGSMP
36 &apic_bigsmp,
37#endif
38#ifdef CONFIG_X86_ES7000
39 &apic_es7000,
40#endif
41 &apic_default, /* must be last */
42 NULL,
43};
44
45static int cmdline_apic __initdata;
46static int __init parse_apic(char *arg)
47{
48 int i;
49
50 if (!arg)
51 return -EINVAL;
52
53 for (i = 0; apic_probe[i]; i++) {
54 if (!strcmp(apic_probe[i]->name, arg)) {
55 apic = apic_probe[i];
56 cmdline_apic = 1;
57 return 0;
58 }
59 }
60
61 if (x86_quirks->update_genapic)
62 x86_quirks->update_genapic();
63
64 /* Parsed again by __setup for debug/verbose */
65 return 0;
66}
67early_param("apic", parse_apic);
68
69void __init generic_bigsmp_probe(void)
70{
71#ifdef CONFIG_X86_BIGSMP
72 /*
73 * This routine is used to switch to bigsmp mode when
74 * - There is no apic= option specified by the user
75 * - generic_apic_probe() has chosen apic_default as the sub_arch
76 * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support
77 */
78
79 if (!cmdline_apic && apic == &apic_default) {
80 if (apic_bigsmp.probe()) {
81 apic = &apic_bigsmp;
82 if (x86_quirks->update_genapic)
83 x86_quirks->update_genapic();
84 printk(KERN_INFO "Overriding APIC driver with %s\n",
85 apic->name);
86 }
87 }
88#endif
89}
90
91void __init generic_apic_probe(void)
92{
93 if (!cmdline_apic) {
94 int i;
95 for (i = 0; apic_probe[i]; i++) {
96 if (apic_probe[i]->probe()) {
97 apic = apic_probe[i];
98 break;
99 }
100 }
101 /* Not visible without early console */
102 if (!apic_probe[i])
103 panic("Didn't find an APIC driver");
104
105 if (x86_quirks->update_genapic)
106 x86_quirks->update_genapic();
107 }
108 printk(KERN_INFO "Using APIC driver %s\n", apic->name);
109}
110
111/* These functions can switch the APIC even after the initial ->probe() */
112
113int __init
114generic_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
115{
116 int i;
117
118 for (i = 0; apic_probe[i]; ++i) {
119 if (!apic_probe[i]->mps_oem_check)
120 continue;
121 if (!apic_probe[i]->mps_oem_check(mpc, oem, productid))
122 continue;
123
124 if (!cmdline_apic) {
125 apic = apic_probe[i];
126 if (x86_quirks->update_genapic)
127 x86_quirks->update_genapic();
128 printk(KERN_INFO "Switched to APIC driver `%s'.\n",
129 apic->name);
130 }
131 return 1;
132 }
133 return 0;
134}
135
136int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
137{
138 int i;
139
140 for (i = 0; apic_probe[i]; ++i) {
141 if (!apic_probe[i]->acpi_madt_oem_check)
142 continue;
143 if (!apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id))
144 continue;
145
146 if (!cmdline_apic) {
147 apic = apic_probe[i];
148 if (x86_quirks->update_genapic)
149 x86_quirks->update_genapic();
150 printk(KERN_INFO "Switched to APIC driver `%s'.\n",
151 apic->name);
152 }
153 return 1;
154 }
155 return 0;
156}