aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-12-01 01:39:55 -0500
committerLen Brown <len.brown@intel.com>2005-12-01 01:39:55 -0500
commit16071a073d44ef3ca3f79d0b49371a79464d9ac0 (patch)
tree26fc25620f3e2b67ebb37c4057dfae46bbf02666 /drivers/acpi
parentb7639dafb4e175ddd637425da5ff65f03e08028e (diff)
parentcd8e2b48daee891011a4f21e2c62b210d24dcc9e (diff)
downloadkernel_samsung_smdk4412-16071a073d44ef3ca3f79d0b49371a79464d9ac0.zip
kernel_samsung_smdk4412-16071a073d44ef3ca3f79d0b49371a79464d9ac0.tar.gz
kernel_samsung_smdk4412-16071a073d44ef3ca3f79d0b49371a79464d9ac0.tar.bz2
Pull 5452 into release branch
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_core.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 4217925..0c561c5 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -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);