mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
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>
This commit is contained in:
parent
cb8cc442dc
commit
5f836405ef
2 changed files with 14 additions and 11 deletions
|
@ -55,8 +55,7 @@ struct genapic {
|
||||||
* is switched to this. Essentially they are additional
|
* is switched to this. Essentially they are additional
|
||||||
* probe functions:
|
* probe functions:
|
||||||
*/
|
*/
|
||||||
int (*mps_oem_check)(struct mpc_table *mpc, char *oem,
|
int (*mps_oem_check)(struct mpc_table *mpc, char *oem, char *productid);
|
||||||
char *productid);
|
|
||||||
|
|
||||||
unsigned int (*get_apic_id)(unsigned long x);
|
unsigned int (*get_apic_id)(unsigned long x);
|
||||||
unsigned long (*set_apic_id)(unsigned int id);
|
unsigned long (*set_apic_id)(unsigned int id);
|
||||||
|
|
|
@ -113,17 +113,21 @@ void __init generic_apic_probe(void)
|
||||||
int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
|
int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; apic_probe[i]; ++i) {
|
for (i = 0; apic_probe[i]; ++i) {
|
||||||
if (apic_probe[i]->mps_oem_check(mpc, oem, productid)) {
|
if (!apic_probe[i]->mps_oem_check)
|
||||||
if (!cmdline_apic) {
|
continue;
|
||||||
apic = apic_probe[i];
|
if (!apic_probe[i]->mps_oem_check(mpc, oem, productid))
|
||||||
if (x86_quirks->update_genapic)
|
continue;
|
||||||
x86_quirks->update_genapic();
|
|
||||||
printk(KERN_INFO "Switched to APIC driver `%s'.\n",
|
if (!cmdline_apic) {
|
||||||
apic->name);
|
apic = apic_probe[i];
|
||||||
}
|
if (x86_quirks->update_genapic)
|
||||||
return 1;
|
x86_quirks->update_genapic();
|
||||||
|
printk(KERN_INFO "Switched to APIC driver `%s'.\n",
|
||||||
|
apic->name);
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue