53
53
late_initcall(print_ipi_mode);
55
void __init default_setup_apic_routing(void)
57
int version = apic_version[boot_cpu_physical_apicid];
59
if (num_possible_cpus() > 8) {
60
switch (boot_cpu_data.x86_vendor) {
61
case X86_VENDOR_INTEL:
62
if (!APIC_XAPIC(version)) {
66
/* If P4 and above fall through */
72
#ifdef CONFIG_X86_BIGSMP
73
generic_bigsmp_probe();
76
if (apic->setup_apic_routing)
77
apic->setup_apic_routing();
80
55
static int default_x86_32_early_logical_apicid(int cpu)
172
147
.safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
174
149
.x86_32_early_logical_apicid = default_x86_32_early_logical_apicid,
175
.x86_32_numa_cpu_node = default_x86_32_numa_cpu_node,
178
extern struct apic apic_numaq;
179
extern struct apic apic_summit;
180
extern struct apic apic_bigsmp;
181
extern struct apic apic_es7000;
182
extern struct apic apic_es7000_cluster;
152
apic_driver(apic_default);
184
154
struct apic *apic = &apic_default;
185
155
EXPORT_SYMBOL_GPL(apic);
187
static struct apic *apic_probe[] __initdata = {
188
#ifdef CONFIG_X86_NUMAQ
191
#ifdef CONFIG_X86_SUMMIT
194
#ifdef CONFIG_X86_BIGSMP
197
#ifdef CONFIG_X86_ES7000
199
&apic_es7000_cluster,
201
&apic_default, /* must be last */
205
157
static int cmdline_apic __initdata;
206
158
static int __init parse_apic(char *arg)
213
for (i = 0; apic_probe[i]; i++) {
214
if (!strcmp(apic_probe[i]->name, arg)) {
215
apic = apic_probe[i];
165
for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
166
if (!strcmp((*drv)->name, arg)) {
216
168
cmdline_apic = 1;
224
176
early_param("apic", parse_apic);
226
void __init generic_bigsmp_probe(void)
178
void __init default_setup_apic_routing(void)
180
int version = apic_version[boot_cpu_physical_apicid];
182
if (num_possible_cpus() > 8) {
183
switch (boot_cpu_data.x86_vendor) {
184
case X86_VENDOR_INTEL:
185
if (!APIC_XAPIC(version)) {
189
/* If P4 and above fall through */
228
195
#ifdef CONFIG_X86_BIGSMP
230
* This routine is used to switch to bigsmp mode when
197
* This is used to switch to bigsmp mode when
231
198
* - There is no apic= option specified by the user
232
199
* - generic_apic_probe() has chosen apic_default as the sub_arch
233
200
* - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support
236
203
if (!cmdline_apic && apic == &apic_default) {
237
if (apic_bigsmp.probe()) {
204
struct apic *bigsmp = generic_bigsmp_probe();
239
207
printk(KERN_INFO "Overriding APIC driver with %s\n",
213
if (apic->setup_apic_routing)
214
apic->setup_apic_routing();
246
217
void __init generic_apic_probe(void)
248
219
if (!cmdline_apic) {
250
for (i = 0; apic_probe[i]; i++) {
251
if (apic_probe[i]->probe()) {
252
apic = apic_probe[i];
222
for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
223
if ((*drv)->probe()) {
256
228
/* Not visible without early console */
229
if (drv == __apicdrivers_end)
258
230
panic("Didn't find an APIC driver");
260
232
printk(KERN_INFO "Using APIC driver %s\n", apic->name);
266
238
generic_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
270
for (i = 0; apic_probe[i]; ++i) {
271
if (!apic_probe[i]->mps_oem_check)
242
for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
243
if (!((*drv)->mps_oem_check))
273
if (!apic_probe[i]->mps_oem_check(mpc, oem, productid))
245
if (!(*drv)->mps_oem_check(mpc, oem, productid))
276
248
if (!cmdline_apic) {
277
apic = apic_probe[i];
278
250
printk(KERN_INFO "Switched to APIC driver `%s'.\n",
286
258
int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
290
for (i = 0; apic_probe[i]; ++i) {
291
if (!apic_probe[i]->acpi_madt_oem_check)
262
for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
263
if (!(*drv)->acpi_madt_oem_check)
293
if (!apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id))
265
if (!(*drv)->acpi_madt_oem_check(oem_id, oem_table_id))
296
268
if (!cmdline_apic) {
297
apic = apic_probe[i];
298
270
printk(KERN_INFO "Switched to APIC driver `%s'.\n",