diff options
author | Thomas Renninger <trenn@suse.de> | 2006-06-26 23:58:43 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-26 23:58:43 -0400 |
commit | a6fc67202e0224e6c9d1d285cc0b444bce887ed5 (patch) | |
tree | cb2d422f65c0ab0a95f452f6bac80e2bfdd547de /drivers/acpi/processor_core.c | |
parent | eb99adde31b7d85c67a5e1c2fa5e098e1056dd79 (diff) |
ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUG
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/processor_core.c')
-rw-r--r-- | drivers/acpi/processor_core.c | 56 |
1 files changed, 19 insertions, 37 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index decaebb4cbe..2bbdf8a7a30 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -328,9 +328,7 @@ static int acpi_processor_add_fs(struct acpi_device *device) | |||
328 | entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO, | 328 | entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO, |
329 | S_IRUGO, acpi_device_dir(device)); | 329 | S_IRUGO, acpi_device_dir(device)); |
330 | if (!entry) | 330 | if (!entry) |
331 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 331 | return_VALUE(-EIO); |
332 | "Unable to create '%s' fs entry\n", | ||
333 | ACPI_PROCESSOR_FILE_INFO)); | ||
334 | else { | 332 | else { |
335 | entry->proc_fops = &acpi_processor_info_fops; | 333 | entry->proc_fops = &acpi_processor_info_fops; |
336 | entry->data = acpi_driver_data(device); | 334 | entry->data = acpi_driver_data(device); |
@@ -342,9 +340,7 @@ static int acpi_processor_add_fs(struct acpi_device *device) | |||
342 | S_IFREG | S_IRUGO | S_IWUSR, | 340 | S_IFREG | S_IRUGO | S_IWUSR, |
343 | acpi_device_dir(device)); | 341 | acpi_device_dir(device)); |
344 | if (!entry) | 342 | if (!entry) |
345 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 343 | return_VALUE(-EIO); |
346 | "Unable to create '%s' fs entry\n", | ||
347 | ACPI_PROCESSOR_FILE_THROTTLING)); | ||
348 | else { | 344 | else { |
349 | entry->proc_fops = &acpi_processor_throttling_fops; | 345 | entry->proc_fops = &acpi_processor_throttling_fops; |
350 | entry->data = acpi_driver_data(device); | 346 | entry->data = acpi_driver_data(device); |
@@ -356,9 +352,7 @@ static int acpi_processor_add_fs(struct acpi_device *device) | |||
356 | S_IFREG | S_IRUGO | S_IWUSR, | 352 | S_IFREG | S_IRUGO | S_IWUSR, |
357 | acpi_device_dir(device)); | 353 | acpi_device_dir(device)); |
358 | if (!entry) | 354 | if (!entry) |
359 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 355 | return_VALUE( -EIO); |
360 | "Unable to create '%s' fs entry\n", | ||
361 | ACPI_PROCESSOR_FILE_LIMIT)); | ||
362 | else { | 356 | else { |
363 | entry->proc_fops = &acpi_processor_limit_fops; | 357 | entry->proc_fops = &acpi_processor_limit_fops; |
364 | entry->data = acpi_driver_data(device); | 358 | entry->data = acpi_driver_data(device); |
@@ -459,8 +453,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr) | |||
459 | */ | 453 | */ |
460 | status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer); | 454 | status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer); |
461 | if (ACPI_FAILURE(status)) { | 455 | if (ACPI_FAILURE(status)) { |
462 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 456 | ACPI_ERROR((AE_INFO, "Evaluating processor object")); |
463 | "Error evaluating processor object\n")); | ||
464 | return_VALUE(-ENODEV); | 457 | return_VALUE(-ENODEV); |
465 | } | 458 | } |
466 | 459 | ||
@@ -490,9 +483,9 @@ static int acpi_processor_get_info(struct acpi_processor *pr) | |||
490 | if (cpu_index == -1) { | 483 | if (cpu_index == -1) { |
491 | if (ACPI_FAILURE | 484 | if (ACPI_FAILURE |
492 | (acpi_processor_hotadd_init(pr->handle, &pr->id))) { | 485 | (acpi_processor_hotadd_init(pr->handle, &pr->id))) { |
493 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 486 | ACPI_ERROR((AE_INFO, |
494 | "Error getting cpuindex for acpiid 0x%x\n", | 487 | "Getting cpuindex for acpiid 0x%x", |
495 | pr->acpi_id)); | 488 | pr->acpi_id)); |
496 | return_VALUE(-ENODEV); | 489 | return_VALUE(-ENODEV); |
497 | } | 490 | } |
498 | } | 491 | } |
@@ -503,8 +496,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr) | |||
503 | if (!object.processor.pblk_address) | 496 | if (!object.processor.pblk_address) |
504 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n")); | 497 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n")); |
505 | else if (object.processor.pblk_length != 6) | 498 | else if (object.processor.pblk_length != 6) |
506 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid PBLK length [%d]\n", | 499 | ACPI_ERROR((AE_INFO, "Invalid PBLK length [%d]", |
507 | object.processor.pblk_length)); | 500 | object.processor.pblk_length)); |
508 | else { | 501 | else { |
509 | pr->throttling.address = object.processor.pblk_address; | 502 | pr->throttling.address = object.processor.pblk_address; |
510 | pr->throttling.duty_offset = acpi_fadt.duty_offset; | 503 | pr->throttling.duty_offset = acpi_fadt.duty_offset; |
@@ -572,10 +565,6 @@ static int acpi_processor_start(struct acpi_device *device) | |||
572 | 565 | ||
573 | status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, | 566 | status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, |
574 | acpi_processor_notify, pr); | 567 | acpi_processor_notify, pr); |
575 | if (ACPI_FAILURE(status)) { | ||
576 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | ||
577 | "Error installing device notify handler\n")); | ||
578 | } | ||
579 | 568 | ||
580 | /* _PDC call should be done before doing anything else (if reqd.). */ | 569 | /* _PDC call should be done before doing anything else (if reqd.). */ |
581 | arch_acpi_processor_init_pdc(pr); | 570 | arch_acpi_processor_init_pdc(pr); |
@@ -675,10 +664,6 @@ static int acpi_processor_remove(struct acpi_device *device, int type) | |||
675 | 664 | ||
676 | status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, | 665 | status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, |
677 | acpi_processor_notify); | 666 | acpi_processor_notify); |
678 | if (ACPI_FAILURE(status)) { | ||
679 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | ||
680 | "Error removing notify handler\n")); | ||
681 | } | ||
682 | 667 | ||
683 | acpi_processor_remove_fs(device); | 668 | acpi_processor_remove_fs(device); |
684 | 669 | ||
@@ -705,8 +690,7 @@ static int is_processor_present(acpi_handle handle) | |||
705 | 690 | ||
706 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); | 691 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); |
707 | if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) { | 692 | if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) { |
708 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 693 | ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present")); |
709 | "Processor Device is not present\n")); | ||
710 | return_VALUE(0); | 694 | return_VALUE(0); |
711 | } | 695 | } |
712 | return_VALUE(1); | 696 | return_VALUE(1); |
@@ -767,15 +751,14 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
767 | if (acpi_bus_get_device(handle, &device)) { | 751 | if (acpi_bus_get_device(handle, &device)) { |
768 | result = acpi_processor_device_add(handle, &device); | 752 | result = acpi_processor_device_add(handle, &device); |
769 | if (result) | 753 | if (result) |
770 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 754 | ACPI_ERROR((AE_INFO, |
771 | "Unable to add the device\n")); | 755 | "Unable to add the device")); |
772 | break; | 756 | break; |
773 | } | 757 | } |
774 | 758 | ||
775 | pr = acpi_driver_data(device); | 759 | pr = acpi_driver_data(device); |
776 | if (!pr) { | 760 | if (!pr) { |
777 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 761 | ACPI_ERROR((AE_INFO, "Driver data is NULL")); |
778 | "Driver data is NULL\n")); | ||
779 | break; | 762 | break; |
780 | } | 763 | } |
781 | 764 | ||
@@ -788,9 +771,8 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
788 | if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { | 771 | if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { |
789 | kobject_uevent(&device->kobj, KOBJ_ONLINE); | 772 | kobject_uevent(&device->kobj, KOBJ_ONLINE); |
790 | } else { | 773 | } else { |
791 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 774 | ACPI_ERROR((AE_INFO, "Device [%s] failed to start", |
792 | "Device [%s] failed to start\n", | 775 | acpi_device_bid(device))); |
793 | acpi_device_bid(device))); | ||
794 | } | 776 | } |
795 | break; | 777 | break; |
796 | case ACPI_NOTIFY_EJECT_REQUEST: | 778 | case ACPI_NOTIFY_EJECT_REQUEST: |
@@ -798,14 +780,14 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
798 | "received ACPI_NOTIFY_EJECT_REQUEST\n")); | 780 | "received ACPI_NOTIFY_EJECT_REQUEST\n")); |
799 | 781 | ||
800 | if (acpi_bus_get_device(handle, &device)) { | 782 | if (acpi_bus_get_device(handle, &device)) { |
801 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 783 | ACPI_ERROR((AE_INFO, |
802 | "Device don't exist, dropping EJECT\n")); | 784 | "Device don't exist, dropping EJECT")); |
803 | break; | 785 | break; |
804 | } | 786 | } |
805 | pr = acpi_driver_data(device); | 787 | pr = acpi_driver_data(device); |
806 | if (!pr) { | 788 | if (!pr) { |
807 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 789 | ACPI_ERROR((AE_INFO, |
808 | "Driver data is NULL, dropping EJECT\n")); | 790 | "Driver data is NULL, dropping EJECT")); |
809 | return_VOID; | 791 | return_VOID; |
810 | } | 792 | } |
811 | 793 | ||