Messages in this thread Patch in this message | | | Date | Thu, 5 Aug 2004 16:14:00 +0200 | From | Arjan van de Ven <> | Subject | Re: [PATCH] Automatically enable bigsmp on big HP machines |
| |
On Thu, Aug 05, 2004 at 03:34:43PM +0200, Andi Kleen wrote: > On Thu, 05 Aug 2004 15:03:59 +0200 > Arjan van de Ven <arjanv@redhat.com> wrote: > > > On Thu, 2004-08-05 at 14:38, Andi Kleen wrote: > > > This enables apic=bigsmp automatically on some big HP machines that need it. > > > This makes them boot without kernel parameters on a generic arch kernel. > > > > is it possible for this to use the new dmi infrastructure, eg not add it > > to dmi_scan.c but to the place where it's used ? > > Certainly. Feel free to post a patch for that.
like this:
diff -purN linux-2.6.7/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c --- linux-2.6.7/arch/i386/kernel/io_apic.c 2004-08-05 15:44:59.833222984 +0200 +++ linux/arch/i386/kernel/io_apic.c 2004-08-05 15:59:03.350832972 +0200 @@ -1714,7 +1714,7 @@ static void __init setup_ioapic_ids_from reg_00.raw = io_apic_read(apic, 0); spin_unlock_irqrestore(&ioapic_lock, flags); if (reg_00.bits.ID != mp_ioapics[apic].mpc_apicid) - panic("could not set ID!\n"); + printk("could not set ID!\n"); else printk(" ok.\n"); } diff -purN linux-2.6.7/arch/i386/mach-generic/bigsmp.c linux/arch/i386/mach-generic/bigsmp.c --- linux-2.6.7/arch/i386/mach-generic/bigsmp.c 2004-06-16 07:19:02.000000000 +0200 +++ linux/arch/i386/mach-generic/bigsmp.c 2004-08-05 15:58:37.960789061 +0200 @@ -13,6 +13,7 @@ #include <linux/kernel.h> #include <linux/smp.h> #include <linux/init.h> +#include <linux/dmi.h> #include <asm/mach-bigsmp/mach_apic.h> #include <asm/mach-bigsmp/mach_apicdef.h> #include <asm/mach-bigsmp/mach_ipi.h> @@ -18,10 +18,35 @@ #include <asm/mach-bigsmp/mach_ipi.h> #include <asm/mach-default/mach_mpparse.h> -int dmi_bigsmp; /* can be set by dmi scanners */ +static int dmi_bigsmp; /* can be set by dmi scanners */ + +static __init int hp_ht_bigsmp(struct dmi_system_id *d) +{ +#ifdef CONFIG_X86_GENERICARCH + printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident); + dmi_bigsmp = 1; +#endif + return 0; +} + + +static struct dmi_system_id __initdata bigsmp_dmi_table[] = { + { hp_ht_bigsmp, "HP ProLiant DL760 G2", { + DMI_MATCH(DMI_BIOS_VENDOR, "HP"), + DMI_MATCH(DMI_BIOS_VERSION, "P44-"), + }}, + + { hp_ht_bigsmp, "HP ProLiant DL740", { + DMI_MATCH(DMI_BIOS_VENDOR, "HP"), + DMI_MATCH(DMI_BIOS_VERSION, "P47-"), + }}, + { } +}; + static __init int probe_bigsmp(void) { + dmi_check_system(bigsmp_dmi_table); return dmi_bigsmp; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |