aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utdecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/utdecode.c')
-rw-r--r--drivers/acpi/acpica/utdecode.c74
1 files changed, 63 insertions, 11 deletions
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
index fbfa9eca011f..90ec37c473c6 100644
--- a/drivers/acpi/acpica/utdecode.c
+++ b/drivers/acpi/acpica/utdecode.c
@@ -462,7 +462,7 @@ char *acpi_ut_get_mutex_name(u32 mutex_id)
462 462
463/* Names for Notify() values, used for debug output */ 463/* Names for Notify() values, used for debug output */
464 464
465static const char *acpi_gbl_notify_value_names[ACPI_NOTIFY_MAX + 1] = { 465static const char *acpi_gbl_generic_notify[ACPI_NOTIFY_MAX + 1] = {
466 /* 00 */ "Bus Check", 466 /* 00 */ "Bus Check",
467 /* 01 */ "Device Check", 467 /* 01 */ "Device Check",
468 /* 02 */ "Device Wake", 468 /* 02 */ "Device Wake",
@@ -473,23 +473,75 @@ static const char *acpi_gbl_notify_value_names[ACPI_NOTIFY_MAX + 1] = {
473 /* 07 */ "Power Fault", 473 /* 07 */ "Power Fault",
474 /* 08 */ "Capabilities Check", 474 /* 08 */ "Capabilities Check",
475 /* 09 */ "Device PLD Check", 475 /* 09 */ "Device PLD Check",
476 /* 10 */ "Reserved", 476 /* 0A */ "Reserved",
477 /* 11 */ "System Locality Update", 477 /* 0B */ "System Locality Update",
478 /* 12 */ "Shutdown Request" 478 /* 0C */ "Shutdown Request"
479}; 479};
480 480
481const char *acpi_ut_get_notify_name(u32 notify_value) 481static const char *acpi_gbl_device_notify[4] = {
482 /* 80 */ "Status Change",
483 /* 81 */ "Information Change",
484 /* 82 */ "Device-Specific Change",
485 /* 83 */ "Device-Specific Change"
486};
487
488static const char *acpi_gbl_processor_notify[4] = {
489 /* 80 */ "Performance Capability Change",
490 /* 81 */ "C-State Change",
491 /* 82 */ "Throttling Capability Change",
492 /* 83 */ "Device-Specific Change"
493};
494
495static const char *acpi_gbl_thermal_notify[4] = {
496 /* 80 */ "Thermal Status Change",
497 /* 81 */ "Thermal Trip Point Change",
498 /* 82 */ "Thermal Device List Change",
499 /* 83 */ "Thermal Relationship Change"
500};
501
502const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type)
482{ 503{
483 504
505 /* 00 - 0C are common to all object types */
506
484 if (notify_value <= ACPI_NOTIFY_MAX) { 507 if (notify_value <= ACPI_NOTIFY_MAX) {
485 return (acpi_gbl_notify_value_names[notify_value]); 508 return (acpi_gbl_generic_notify[notify_value]);
486 } else if (notify_value <= ACPI_MAX_SYS_NOTIFY) { 509 }
510
511 /* 0D - 7F are reserved */
512
513 if (notify_value <= ACPI_MAX_SYS_NOTIFY) {
487 return ("Reserved"); 514 return ("Reserved");
488 } else if (notify_value <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY) {
489 return ("Device Specific");
490 } else {
491 return ("Hardware Specific");
492 } 515 }
516
517 /* 80 - 83 are per-object-type */
518
519 if (notify_value <= 0x83) {
520 switch (type) {
521 case ACPI_TYPE_ANY:
522 case ACPI_TYPE_DEVICE:
523 return (acpi_gbl_device_notify[notify_value - 0x80]);
524
525 case ACPI_TYPE_PROCESSOR:
526 return (acpi_gbl_processor_notify[notify_value - 0x80]);
527
528 case ACPI_TYPE_THERMAL:
529 return (acpi_gbl_thermal_notify[notify_value - 0x80]);
530
531 default:
532 return ("Target object type does not support notifies");
533 }
534 }
535
536 /* 84 - BF are device-specific */
537
538 if (notify_value <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY) {
539 return ("Device-Specific");
540 }
541
542 /* C0 and above are hardware-specific */
543
544 return ("Hardware-Specific");
493} 545}
494#endif 546#endif
495 547