aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-04-27 18:33:41 -0400
committerLen Brown <len.brown@intel.com>2009-05-27 21:14:03 -0400
commit6cc73b4806c07b4207780f6d85c456b4c5b29d71 (patch)
tree1272026397edf3fdf44d0d2ed03da831dba6b1bf /drivers/acpi
parentb9417f84e17b93a6976a8a88b38bf9567975cb38 (diff)
ACPI: processor: check for synthetic _HID, default to "Device" declaration
This patch inverts the logic that distinguishes "Processor" statements from "Device" statements, so we now check explicitly for "Processor" and default to "Device". This removes the only real use of ACPI_PROCESSOR_HID, so we can then remove the #define. It also has the theoretical advantage that if a new processor _HID were ever added, we wouldn't have to change the code here. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_core.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 45ad3288c5ff..cf627d64cde9 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -596,7 +596,21 @@ static int acpi_processor_get_info(struct acpi_device *device)
596 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 596 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
597 "No bus mastering arbitration control\n")); 597 "No bus mastering arbitration control\n"));
598 598
599 if (!strcmp(acpi_device_hid(device), ACPI_PROCESSOR_HID)) { 599 if (!strcmp(acpi_device_hid(device), ACPI_PROCESSOR_OBJECT_HID)) {
600 /* Declared with "Processor" statement; match ProcessorID */
601 status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
602 if (ACPI_FAILURE(status)) {
603 printk(KERN_ERR PREFIX "Evaluating processor object\n");
604 return -ENODEV;
605 }
606
607 /*
608 * TBD: Synch processor ID (via LAPIC/LSAPIC structures) on SMP.
609 * >>> 'acpi_get_processor_id(acpi_id, &id)' in
610 * arch/xxx/acpi.c
611 */
612 pr->acpi_id = object.processor.proc_id;
613 } else {
600 /* 614 /*
601 * Declared with "Device" statement; match _UID. 615 * Declared with "Device" statement; match _UID.
602 * Note that we don't handle string _UIDs yet. 616 * Note that we don't handle string _UIDs yet.
@@ -611,20 +625,6 @@ static int acpi_processor_get_info(struct acpi_device *device)
611 } 625 }
612 device_declaration = 1; 626 device_declaration = 1;
613 pr->acpi_id = value; 627 pr->acpi_id = value;
614 } else {
615 /* Declared with "Processor" statement; match ProcessorID */
616 status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
617 if (ACPI_FAILURE(status)) {
618 printk(KERN_ERR PREFIX "Evaluating processor object\n");
619 return -ENODEV;
620 }
621
622 /*
623 * TBD: Synch processor ID (via LAPIC/LSAPIC structures) on SMP.
624 * >>> 'acpi_get_processor_id(acpi_id, &id)' in
625 * arch/xxx/acpi.c
626 */
627 pr->acpi_id = object.processor.proc_id;
628 } 628 }
629 cpu_index = get_cpu_id(pr->handle, device_declaration, pr->acpi_id); 629 cpu_index = get_cpu_id(pr->handle, device_declaration, pr->acpi_id);
630 630