]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ACPI] fix 2.6.13 boot hang regression on HT box w/ broken BIOS
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Fri, 21 Oct 2005 23:22:00 +0000 (19:22 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 1 Dec 2005 04:28:50 +0000 (23:28 -0500)
http://bugzilla.kernel.org/show_bug.cgi?id=5452

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/processor_core.c

index 4217925626423db1f39cc76880e95f700fb5d279..0c561c571f29a40f09dce5e96e9af29f79376fe4 100644 (file)
@@ -543,6 +543,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
        return_VALUE(0);
 }
 
+static void *processor_device_array[NR_CPUS];
+
 static int acpi_processor_start(struct acpi_device *device)
 {
        int result = 0;
@@ -561,6 +563,19 @@ static int acpi_processor_start(struct acpi_device *device)
 
        BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0));
 
+       /*
+        * Buggy BIOS check
+        * ACPI id of processors can be reported wrongly by the BIOS.
+        * Don't trust it blindly
+        */
+       if (processor_device_array[pr->id] != NULL &&
+           processor_device_array[pr->id] != (void *)device) {
+               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "BIOS reporting wrong ACPI id"
+                       "for the processor\n"));
+               return_VALUE(-ENODEV);
+       }
+       processor_device_array[pr->id] = (void *)device;
+
        processors[pr->id] = pr;
 
        result = acpi_processor_add_fs(device);