From: IBM <lcm@us.ibm.com>
Subject: Use apic=bigsmp on specific xseries machines
References: bnc#440497
Patch-Mainline: not yet

Signed-off-by: Thomas Renninger <trenn@suse.de>


 arch/x86/kernel/apic/bigsmp_32.c |   30 +++++++++++++++++++++++++++---
 arch/x86/kernel/apic/probe_32.c  |    4 ++--
 2 files changed, 29 insertions(+), 5 deletions(-)

--- a/arch/x86/kernel/apic/bigsmp_32.c
+++ b/arch/x86/kernel/apic/bigsmp_32.c
@@ -156,7 +156,7 @@ static void bigsmp_send_IPI_all(int vect
 
 static int dmi_bigsmp; /* can be set by dmi scanners */
 
-static int hp_ht_bigsmp(const struct dmi_system_id *d)
+static int force_bigsmp_apic(const struct dmi_system_id *d)
 {
 	printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
 	dmi_bigsmp = 1;
@@ -166,17 +166,41 @@ static int hp_ht_bigsmp(const struct dmi
 
 
 static const struct dmi_system_id bigsmp_dmi_table[] = {
-	{ hp_ht_bigsmp, "HP ProLiant DL760 G2",
+	{ force_bigsmp_apic, "HP ProLiant DL760 G2",
 		{	DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
 			DMI_MATCH(DMI_BIOS_VERSION, "P44-"),
 		}
 	},
 
-	{ hp_ht_bigsmp, "HP ProLiant DL740",
+	{ force_bigsmp_apic, "HP ProLiant DL740",
 		{	DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
 			DMI_MATCH(DMI_BIOS_VERSION, "P47-"),
 		}
 	},
+
+	{ force_bigsmp_apic, "IBM x260 / x366 / x460",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
+			DMI_MATCH(DMI_BIOS_VERSION, "-[ZT"),
+		}
+	},
+
+	{ force_bigsmp_apic, "IBM x3800 / x3850 / x3950",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
+			DMI_MATCH(DMI_BIOS_VERSION, "-[ZU"),
+		}
+	},
+
+	{ force_bigsmp_apic, "IBM x3800 / x3850 / x3950",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
+			DMI_MATCH(DMI_BIOS_VERSION, "-[ZS"),
+		}
+	},
+
+	{ force_bigsmp_apic, "IBM x3850 M2 / x3950 M2",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
+			DMI_MATCH(DMI_BIOS_VERSION, "-[A3"),
+		}
+	},
 	{ } /* NULL entry stops DMI scanning */
 };
 
--- a/arch/x86/kernel/apic/probe_32.c
+++ b/arch/x86/kernel/apic/probe_32.c
@@ -267,7 +267,7 @@ generic_mps_oem_check(struct mpc_table *
 		if (!apic_probe[i]->mps_oem_check(mpc, oem, productid))
 			continue;
 
-		if (!cmdline_apic) {
+		if (!cmdline_apic && apic == &apic_default) {
 			apic = apic_probe[i];
 			printk(KERN_INFO "Switched to APIC driver `%s'.\n",
 			       apic->name);
@@ -287,7 +287,7 @@ int __init default_acpi_madt_oem_check(c
 		if (!apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id))
 			continue;
 
-		if (!cmdline_apic) {
+		if (!cmdline_apic && apic == &apic_default) {
 			apic = apic_probe[i];
 			printk(KERN_INFO "Switched to APIC driver `%s'.\n",
 			       apic->name);
