x86: consolidate the ->mps_oem_check() code
authorIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 12:44:32 +0000 (13:44 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 22:20:28 +0000 (23:20 +0100)
- spread out the mps_oem_check() namespace on a per APIC driver basis

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/es7000/mpparse.h
arch/x86/include/asm/mach-default/mach_mpparse.h
arch/x86/include/asm/mach-generic/mach_mpparse.h
arch/x86/include/asm/summit/mpparse.h
arch/x86/kernel/mpparse.c
arch/x86/mach-generic/bigsmp.c
arch/x86/mach-generic/default.c
arch/x86/mach-generic/es7000.c
arch/x86/mach-generic/numaq.c
arch/x86/mach-generic/probe.c
arch/x86/mach-generic/summit.c

index 30692c4ae859616068c51b2ca232331e0b02ab35..662eb1e574deff8ed9dc7a0d7602d36a17f1adab 100644 (file)
@@ -8,13 +8,7 @@ extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
 extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr);
 extern void setup_unisys(void);
 
-#ifndef CONFIG_X86_GENERICARCH
-extern int default_acpi_madt_oem_check(char *oem_id, char *oem_table_id);
-extern int mps_oem_check(struct mpc_table *mpc, char *oem, char *productid);
-#endif
-
 #ifdef CONFIG_ACPI
-
 static inline int es7000_check_dsdt(void)
 {
        struct acpi_table_header header;
index 8fa01770ba6249f65b2e39c1692f5f1591ada345..af0da140df95428dded74762499c37089e6d928e 100644 (file)
@@ -2,7 +2,7 @@
 #define _ASM_X86_MACH_DEFAULT_MACH_MPPARSE_H
 
 static inline int
-mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
+generic_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
 {
        return 0;
 }
index f497d96c76bb264b9ea770ca3196ecefe876dcd2..22bfb56f8fbdec341212d48f3a2200cf9bd80032 100644 (file)
@@ -1,8 +1,7 @@
 #ifndef _ASM_X86_MACH_GENERIC_MACH_MPPARSE_H
 #define _ASM_X86_MACH_GENERIC_MACH_MPPARSE_H
 
-
-extern int mps_oem_check(struct mpc_table *, char *, char *);
+extern int generic_mps_oem_check(struct mpc_table *, char *, char *);
 
 extern int default_acpi_madt_oem_check(char *, char *);
 
index 555ed8238e94116c506c2ca3179ba19a75bd2611..4bbcce39acb8ddae83ae5e999fa5792247e45235 100644 (file)
@@ -11,8 +11,8 @@ extern void setup_summit(void);
 #define setup_summit() {}
 #endif
 
-static inline int mps_oem_check(struct mpc_table *mpc, char *oem,
-               char *productid)
+static inline int
+summit_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
 {
        if (!strncmp(oem, "IBM ENSW", 8) &&
                        (!strncmp(productid, "VIGIL SMP", 9)
index f6fb1928439d8d9cef23993cdf022daf3ba273cf..b12fa5ce6f58c046084a4a6742d893d5c3d05128 100644 (file)
@@ -292,7 +292,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
                return 0;
 
 #ifdef CONFIG_X86_32
-       mps_oem_check(mpc, oem, str);
+       generic_mps_oem_check(mpc, oem, str);
 #endif
        /* save the local APIC address, it might be non-default */
        if (!acpi_lapic)
index d04b38954df3f361534189745e60ca4218518117..6bf6aafeb2c69a22d509ee5ac475cb2ab194d039 100644 (file)
@@ -88,7 +88,7 @@ struct genapic apic_bigsmp = {
        .check_phys_apicid_present      = bigsmp_check_phys_apicid_present,
        .enable_apic_mode               = NULL,
        .phys_pkg_id                    = bigsmp_phys_pkg_id,
-       .mps_oem_check                  = mps_oem_check,
+       .mps_oem_check                  = NULL,
 
        .get_apic_id                    = get_apic_id,
        .set_apic_id                    = NULL,
index 5c9266f756e0c2ba05e82114afab5cc3bc419146..e5f85cd75b43a8c6533128980dfb7dc09e68bdcb 100644 (file)
@@ -69,7 +69,7 @@ struct genapic apic_default = {
        .check_phys_apicid_present      = default_check_phys_apicid_present,
        .enable_apic_mode               = NULL,
        .phys_pkg_id                    = default_phys_pkg_id,
-       .mps_oem_check                  = mps_oem_check,
+       .mps_oem_check                  = NULL,
 
        .get_apic_id                    = get_apic_id,
        .set_apic_id                    = NULL,
index 52787e34c9cc11a31326481dfee596bc0203d162..f861163cd39638063cf9017e616532beb64775df 100644 (file)
@@ -36,11 +36,12 @@ static int probe_es7000(void)
 }
 
 static __init int
-mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
+es7000_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
 {
        if (mpc->oemptr) {
                struct mpc_oemtable *oem_table =
                        (struct mpc_oemtable *)mpc->oemptr;
+
                if (!strncmp(oem, "UNISYS", 6))
                        return parse_unisys_oem((char *)oem_table);
        }
@@ -123,7 +124,7 @@ struct genapic apic_es7000 = {
        .check_phys_apicid_present      = es7000_check_phys_apicid_present,
        .enable_apic_mode               = es7000_enable_apic_mode,
        .phys_pkg_id                    = es7000_phys_pkg_id,
-       .mps_oem_check                  = mps_oem_check,
+       .mps_oem_check                  = es7000_mps_oem_check,
 
        .get_apic_id                    = get_apic_id,
        .set_apic_id                    = NULL,
index 6a1134e6d72d8c361b004a98264f7cd6d34ffd40..517882c9c15ab63c76be5ae4276036a618cebdb9 100644 (file)
@@ -19,7 +19,7 @@
 #include <asm/numaq/wakecpu.h>
 #include <asm/numaq.h>
 
-static int mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
+static int __numaq_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
 {
        numaq_mps_oem_check(mpc, oem, productid);
        return found_numaq;
@@ -88,7 +88,7 @@ struct genapic apic_numaq = {
        .check_phys_apicid_present      = numaq_check_phys_apicid_present,
        .enable_apic_mode               = NULL,
        .phys_pkg_id                    = numaq_phys_pkg_id,
-       .mps_oem_check                  = mps_oem_check,
+       .mps_oem_check                  = __numaq_mps_oem_check,
 
        .get_apic_id                    = get_apic_id,
        .set_apic_id                    = NULL,
index 799a70f4d90e8ff5dc2ac26985ae4bd96eaa7136..ab68c6e5c48aa4ddd12cc6770c621749a4a4489a 100644 (file)
@@ -110,7 +110,8 @@ void __init generic_apic_probe(void)
 
 /* These functions can switch the APIC even after the initial ->probe() */
 
-int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
+int __init
+generic_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
 {
        int i;
 
index 2d6843a61d97223e7105bdc889ca0c33a9e4dca2..719e944ff308fc993ae12749e32be1596d728f98 100644 (file)
@@ -68,7 +68,7 @@ struct genapic apic_summit = {
        .check_phys_apicid_present      = summit_check_phys_apicid_present,
        .enable_apic_mode               = NULL,
        .phys_pkg_id                    = summit_phys_pkg_id,
-       .mps_oem_check                  = mps_oem_check,
+       .mps_oem_check                  = summit_mps_oem_check,
 
        .get_apic_id                    = get_apic_id,
        .set_apic_id                    = NULL,