summaryrefslogtreecommitdiff
path: root/arch/x86/mach-generic/probe.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 03:43:47 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-28 23:20:12 +0100
commit306db03b0d71bf9c94155c0c4771a79fc70b4b27 (patch)
tree060e085368664f142013b65cbc0271a704b7dbc3 /arch/x86/mach-generic/probe.c
parent9a6801da55e4a4492e8f666ac272efe8186682c8 (diff)
x86: clean up apic->acpi_madt_oem_check methods
Impact: refactor code x86 subarchitectures each defined a "acpi_madt_oem_check()" method, which could be an inline function, or an extern, or a static function, and which was also the name of a genapic field. Untangle this namespace spaghetti by setting ->acpi_madt_oem_check() to NULL on those subarchitectures that have no detection quirks, and rename the other ones (summit, es7000) that do. Also change default_acpi_madt_oem_check() to handle NULL entries, and clean its control flow up as well. 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.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c
index 82bf0f520fb6..a21e2b1a7011 100644
--- a/arch/x86/mach-generic/probe.c
+++ b/arch/x86/mach-generic/probe.c
@@ -128,20 +128,24 @@ int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
return 0;
}
-int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
int i;
+
for (i = 0; apic_probe[i]; ++i) {
- if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) {
- if (!cmdline_apic) {
- apic = apic_probe[i];
- if (x86_quirks->update_genapic)
- x86_quirks->update_genapic();
- printk(KERN_INFO "Switched to APIC driver `%s'.\n",
- apic->name);
- }
- return 1;
+ if (!apic_probe[i]->acpi_madt_oem_check)
+ continue;
+ if (!apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id))
+ continue;
+
+ if (!cmdline_apic) {
+ apic = apic_probe[i];
+ if (x86_quirks->update_genapic)
+ x86_quirks->update_genapic();
+ printk(KERN_INFO "Switched to APIC driver `%s'.\n",
+ apic->name);
}
+ return 1;
}
return 0;
}