Skip to contentSkip to conversation

Automatically enable bigsmp on big HP machines

PATCH In review Andi Kleen 2 participants 5 messages Aug 5, 2004

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Automatically enable bigsmp on big HP machines

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.

Also it removes an unnecessary panic in the same area.

-Andi

arch/i386/kernel/dmi_scan.c renamed from arch/i386/kernel/dmi_scan.c-HP +21 -0
diff -u linux-2.6.7/arch/i386/kernel/dmi_scan.c-HP linux-2.6.7/arch/i386/kernel/dmi_scan.c
@@ -272,6 +272,16 @@
 }  
 #endif
 
+static __init int hp_ht_bigsmp(struct dmi_blacklist *d) 
+{ 
+#ifdef CONFIG_X86_GENERICARCH
+ 	extern int dmi_bigsmp;
+ 	printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
+ 	dmi_bigsmp = 1;
+#endif
+ 	return 0;
+} 
+
 /*
  *	Process the DMI blacklists
  */
@@ -460,6 +455,17 @@
 #endif	// CONFIG_ACPI_BOOT
 
 #ifdef	CONFIG_ACPI_PCI
+
+	{ hp_ht_bigsmp, "HP ProLiant DL760 G2", {
+			MATCH(DMI_BIOS_VENDOR, "HP"),
+			MATCH(DMI_BIOS_VERSION, "P44-"),
+			NO_MATCH, NO_MATCH }},
+
+	{ hp_ht_bigsmp, "HP ProLiant DL740", {
+			MATCH(DMI_BIOS_VENDOR, "HP"),
+			MATCH(DMI_BIOS_VERSION, "P47-"),
+			NO_MATCH, NO_MATCH }},
+
 	/*
 	 *	Boxes that need ACPI PCI IRQ routing disabled
 	 */
arch/i386/kernel/io_apic.c renamed from arch/i386/kernel/io_apic.c-HP +1 -1
diff -u linux-2.6.7/arch/i386/kernel/io_apic.c-HP linux-2.6.7/arch/i386/kernel/io_apic.c
@@ -1714,7 +1714,7 @@
 		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");
 	}
#1 lore raw
Quoted 2 lines · Andi Kleen

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 ?

author
#2 lore raw
Quoted 6 lines · On Thu, 05 Aug 2004 15:03:59 +0200 Arjan van de Ven <[email protected]> wrote:
Quoted 2 lines · Andi Kleen

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.

-Andi

Quoted 1 line
#3 lore raw
Quoted 11 lines · Andi Kleen
Quoted 6 lines · On Thu, 05 Aug 2004 15:03:59 +0200 Arjan van de Ven <[email protected]> wrote:
Quoted 2 lines · Andi Kleen

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:

arch/i386/kernel/io_apic.c +1 -1
diff -purN linux-2.6.7/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c
@@ -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");
 	}
arch/i386/mach-generic/bigsmp.c +27 -1
diff -purN linux-2.6.7/arch/i386/mach-generic/bigsmp.c linux/arch/i386/mach-generic/bigsmp.c
@@ -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; 
 } 
 
author
#4 lore raw
Quoted 8 lines · On Thu, 5 Aug 2004 16:14:00 +0200 Arjan van de Ven <[email protected]> wrote:
Quoted 7 lines · Andi Kleen
Quoted 4 lines · On Thu, 05 Aug 2004 15:03:59 +0200 Arjan van de Ven <[email protected]> wrote:
Quoted 2 lines · Andi Kleen

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.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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:

Looks good, thanks. Andrew, please merge Arjan's patch instead of mine.

-Andi