|
@@ -206,14 +206,14 @@ static struct apic *apic_probe[] __initdata = {
|
|
|
static int cmdline_apic __initdata;
|
|
|
static int __init parse_apic(char *arg)
|
|
|
{
|
|
|
- int i;
|
|
|
+ struct apic **drv;
|
|
|
|
|
|
if (!arg)
|
|
|
return -EINVAL;
|
|
|
|
|
|
- for (i = 0; apic_probe[i]; i++) {
|
|
|
- if (!strcmp(apic_probe[i]->name, arg)) {
|
|
|
- apic = apic_probe[i];
|
|
|
+ for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
|
|
|
+ if (!strcmp((*drv)->name, arg)) {
|
|
|
+ apic = *drv;
|
|
|
cmdline_apic = 1;
|
|
|
return 0;
|
|
|
}
|
|
@@ -247,15 +247,16 @@ void __init generic_bigsmp_probe(void)
|
|
|
void __init generic_apic_probe(void)
|
|
|
{
|
|
|
if (!cmdline_apic) {
|
|
|
- int i;
|
|
|
- for (i = 0; apic_probe[i]; i++) {
|
|
|
- if (apic_probe[i]->probe()) {
|
|
|
- apic = apic_probe[i];
|
|
|
+ struct apic **drv;
|
|
|
+
|
|
|
+ for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
|
|
|
+ if ((*drv)->probe()) {
|
|
|
+ apic = *drv;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
/* Not visible without early console */
|
|
|
- if (!apic_probe[i])
|
|
|
+ if (drv == __apicdrivers_end)
|
|
|
panic("Didn't find an APIC driver");
|
|
|
}
|
|
|
printk(KERN_INFO "Using APIC driver %s\n", apic->name);
|
|
@@ -266,16 +267,16 @@ void __init generic_apic_probe(void)
|
|
|
int __init
|
|
|
generic_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
|
|
|
{
|
|
|
- int i;
|
|
|
+ struct apic **drv;
|
|
|
|
|
|
- for (i = 0; apic_probe[i]; ++i) {
|
|
|
- if (!apic_probe[i]->mps_oem_check)
|
|
|
+ for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
|
|
|
+ if (!((*drv)->mps_oem_check))
|
|
|
continue;
|
|
|
- if (!apic_probe[i]->mps_oem_check(mpc, oem, productid))
|
|
|
+ if (!(*drv)->mps_oem_check(mpc, oem, productid))
|
|
|
continue;
|
|
|
|
|
|
if (!cmdline_apic) {
|
|
|
- apic = apic_probe[i];
|
|
|
+ apic = *drv;
|
|
|
printk(KERN_INFO "Switched to APIC driver `%s'.\n",
|
|
|
apic->name);
|
|
|
}
|
|
@@ -286,16 +287,16 @@ generic_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
|
|
|
|
|
|
int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
|
|
|
{
|
|
|
- int i;
|
|
|
+ struct apic **drv;
|
|
|
|
|
|
- for (i = 0; apic_probe[i]; ++i) {
|
|
|
- if (!apic_probe[i]->acpi_madt_oem_check)
|
|
|
+ for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
|
|
|
+ if (!(*drv)->acpi_madt_oem_check)
|
|
|
continue;
|
|
|
- if (!apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id))
|
|
|
+ if (!(*drv)->acpi_madt_oem_check(oem_id, oem_table_id))
|
|
|
continue;
|
|
|
|
|
|
if (!cmdline_apic) {
|
|
|
- apic = apic_probe[i];
|
|
|
+ apic = *drv;
|
|
|
printk(KERN_INFO "Switched to APIC driver `%s'.\n",
|
|
|
apic->name);
|
|
|
}
|