Blob Blame History Raw
From: Thomas Renninger <trenn@suse.de>
Subject: Do not try to set up acpi processor stuff on cores exceeding maxcpus=
References: bnc#601520
Patch-Mainline: Not yet

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

Automatically created from "patches.fixes/acpi_processor_check_maxcpus.patch" by xen-port-patches.py

--- head-2010-11-22.orig/drivers/acpi/processor_driver.c	2010-11-22 13:21:13.000000000 +0100
+++ head-2010-11-22/drivers/acpi/processor_driver.c	2010-11-23 15:05:26.000000000 +0100
@@ -382,6 +382,11 @@ static int acpi_processor_get_info(struc
 			return -ENODEV;
 		}
 	}
+#if defined(CONFIG_SMP) && defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
+	if (pr->id >= setup_max_cpus && pr->id > 0)
+		pr->id = -1;
+#endif
+
 	/*
 	 * On some boxes several processors use the same processor bus id.
 	 * But they are located in different scope. For example:
@@ -529,8 +534,11 @@ static int __cpuinit acpi_processor_add(
 	}
 
 #ifdef CONFIG_SMP
-	if (pr->id >= setup_max_cpus && pr->id != 0)
-		return 0;
+	if (pr->id >= setup_max_cpus && pr->id != 0) {
+		if (!processor_cntl_external())
+			return 0;
+		WARN_ON(pr->id != -1);
+	}
 #endif
 
 	BUG_ON(!processor_cntl_external() &&