aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 07:47:42 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:27 -0500
commit5f836405ef632ba82f4a5261ff2be4198e53b51b (patch)
tree2bae6d0a06330da3232b2eb34240c795b307bba2
parentcb8cc442dc7e07cb5438b357843ab4095ad73933 (diff)
x86, smp: clean up mps_oem_check()
Impact: cleanup - allow NULL ->mps_oem_check() entries - clean up the code flow Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/include/asm/genapic.h3
-rw-r--r--arch/x86/mach-generic/probe.c22
2 files changed, 14 insertions, 11 deletions
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 14b19de8cd09..8bb1c73c55b7 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -55,8 +55,7 @@ struct genapic {
55 * is switched to this. Essentially they are additional 55 * is switched to this. Essentially they are additional
56 * probe functions: 56 * probe functions:
57 */ 57 */
58 int (*mps_oem_check)(struct mpc_table *mpc, char *oem, 58 int (*mps_oem_check)(struct mpc_table *mpc, char *oem, char *productid);
59 char *productid);
60 59
61 unsigned int (*get_apic_id)(unsigned long x); 60 unsigned int (*get_apic_id)(unsigned long x);
62 unsigned long (*set_apic_id)(unsigned int id); 61 unsigned long (*set_apic_id)(unsigned int id);
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c
index a21e2b1a7011..799a70f4d90e 100644
--- a/arch/x86/mach-generic/probe.c
+++ b/arch/x86/mach-generic/probe.c
@@ -113,17 +113,21 @@ void __init generic_apic_probe(void)
113int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) 113int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
114{ 114{
115 int i; 115 int i;
116
116 for (i = 0; apic_probe[i]; ++i) { 117 for (i = 0; apic_probe[i]; ++i) {
117 if (apic_probe[i]->mps_oem_check(mpc, oem, productid)) { 118 if (!apic_probe[i]->mps_oem_check)
118 if (!cmdline_apic) { 119 continue;
119 apic = apic_probe[i]; 120 if (!apic_probe[i]->mps_oem_check(mpc, oem, productid))
120 if (x86_quirks->update_genapic) 121 continue;
121 x86_quirks->update_genapic(); 122
122 printk(KERN_INFO "Switched to APIC driver `%s'.\n", 123 if (!cmdline_apic) {
123 apic->name); 124 apic = apic_probe[i];
124 } 125 if (x86_quirks->update_genapic)
125 return 1; 126 x86_quirks->update_genapic();
127 printk(KERN_INFO "Switched to APIC driver `%s'.\n",
128 apic->name);
126 } 129 }
130 return 1;
127 } 131 }
128 return 0; 132 return 0;
129} 133}