diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-11-23 12:11:05 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-11-23 12:11:05 +0100 |
commit | 39fcc013ef252b0bf2eecd63433da6ef232910e5 (patch) | |
tree | 89b0bf7b9979e26472bb019847152d5526663831 /xen/arch/x86/genapic | |
parent | 9d401b35f071a91e7281fcdd4a5ceba0dc125ba4 (diff) | |
download | xen-39fcc013ef252b0bf2eecd63433da6ef232910e5.tar.gz xen-39fcc013ef252b0bf2eecd63433da6ef232910e5.tar.bz2 xen-39fcc013ef252b0bf2eecd63433da6ef232910e5.zip |
Intel systems with more than 8 CPUs require that the APIC is configured
in clustered mode with the apic=bigsmp kernel parameter. This patch does
the APIC mode selection automatically without needing to manually specify
the kernel paremeter.
(KAF note: I see the patch is also present in Linux 2.6.14.2)
Signed-off-by: Nitin Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'xen/arch/x86/genapic')
-rw-r--r-- | xen/arch/x86/genapic/bigsmp.c | 5 | ||||
-rw-r--r-- | xen/arch/x86/genapic/probe.c | 21 |
2 files changed, 24 insertions, 2 deletions
diff --git a/xen/arch/x86/genapic/bigsmp.c b/xen/arch/x86/genapic/bigsmp.c index 93c00b9208..61b594a409 100644 --- a/xen/arch/x86/genapic/bigsmp.c +++ b/xen/arch/x86/genapic/bigsmp.c @@ -45,7 +45,10 @@ static struct dmi_system_id __initdata bigsmp_dmi_table[] = { static __init int probe_bigsmp(void) { - dmi_check_system(bigsmp_dmi_table); + if (def_to_bigsmp) + dmi_bigsmp = 1; + else + dmi_check_system(bigsmp_dmi_table); return dmi_bigsmp; } diff --git a/xen/arch/x86/genapic/probe.c b/xen/arch/x86/genapic/probe.c index a3a94fe753..cddde7a459 100644 --- a/xen/arch/x86/genapic/probe.c +++ b/xen/arch/x86/genapic/probe.c @@ -29,6 +29,25 @@ struct genapic *apic_probe[] __initdata = { NULL, }; +static int cmdline_apic; + +void __init generic_bigsmp_probe(void) +{ + /* + * This routine is used to switch to bigsmp mode when + * - There is no apic= option specified by the user + * - generic_apic_probe() has choosen apic_default as the sub_arch + * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support + */ + + if (!cmdline_apic && genapic == &apic_default) + if (apic_bigsmp.probe()) { + genapic = &apic_bigsmp; + printk(KERN_INFO "Overriding APIC driver with %s\n", + genapic->name); + } +} + static void __init genapic_apic_force(char *str) { int i; @@ -41,7 +60,7 @@ custom_param("apic", genapic_apic_force); void __init generic_apic_probe(void) { int i; - int changed = (genapic != NULL); + int changed = cmdline_apic = (genapic != NULL); for (i = 0; !changed && apic_probe[i]; i++) { if (apic_probe[i]->probe()) { |