aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utglobal.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/utilities/utglobal.c')
-rw-r--r--drivers/acpi/utilities/utglobal.c49
1 files changed, 46 insertions, 3 deletions
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index 630c9a2c5b7b..a6e71b801d2d 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2007, R. Byron Moore 8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -602,6 +602,48 @@ char *acpi_ut_get_mutex_name(u32 mutex_id)
602 602
603 return (acpi_gbl_mutex_names[mutex_id]); 603 return (acpi_gbl_mutex_names[mutex_id]);
604} 604}
605
606/*******************************************************************************
607 *
608 * FUNCTION: acpi_ut_get_notify_name
609 *
610 * PARAMETERS: notify_value - Value from the Notify() request
611 *
612 * RETURN: String corresponding to the Notify Value.
613 *
614 * DESCRIPTION: Translate a Notify Value to a notify namestring.
615 *
616 ******************************************************************************/
617
618/* Names for Notify() values, used for debug output */
619
620static const char *acpi_gbl_notify_value_names[] = {
621 "Bus Check",
622 "Device Check",
623 "Device Wake",
624 "Eject Request",
625 "Device Check Light",
626 "Frequency Mismatch",
627 "Bus Mode Mismatch",
628 "Power Fault",
629 "Capabilities Check",
630 "Device PLD Check",
631 "Reserved",
632 "System Locality Update"
633};
634
635const char *acpi_ut_get_notify_name(u32 notify_value)
636{
637
638 if (notify_value <= ACPI_NOTIFY_MAX) {
639 return (acpi_gbl_notify_value_names[notify_value]);
640 } else if (notify_value <= ACPI_MAX_SYS_NOTIFY) {
641 return ("Reserved");
642 } else { /* Greater or equal to 0x80 */
643
644 return ("**Device Specific**");
645 }
646}
605#endif 647#endif
606 648
607/******************************************************************************* 649/*******************************************************************************
@@ -675,12 +717,13 @@ void acpi_ut_init_globals(void)
675 acpi_gbl_gpe_fadt_blocks[0] = NULL; 717 acpi_gbl_gpe_fadt_blocks[0] = NULL;
676 acpi_gbl_gpe_fadt_blocks[1] = NULL; 718 acpi_gbl_gpe_fadt_blocks[1] = NULL;
677 719
678 /* Global notify handlers */ 720 /* Global handlers */
679 721
680 acpi_gbl_system_notify.handler = NULL; 722 acpi_gbl_system_notify.handler = NULL;
681 acpi_gbl_device_notify.handler = NULL; 723 acpi_gbl_device_notify.handler = NULL;
682 acpi_gbl_exception_handler = NULL; 724 acpi_gbl_exception_handler = NULL;
683 acpi_gbl_init_handler = NULL; 725 acpi_gbl_init_handler = NULL;
726 acpi_gbl_table_handler = NULL;
684 727
685 /* Global Lock support */ 728 /* Global Lock support */
686 729
@@ -722,7 +765,7 @@ void acpi_ut_init_globals(void)
722 acpi_gbl_root_node_struct.flags = ANOBJ_END_OF_PEER_LIST; 765 acpi_gbl_root_node_struct.flags = ANOBJ_END_OF_PEER_LIST;
723 766
724#ifdef ACPI_DEBUG_OUTPUT 767#ifdef ACPI_DEBUG_OUTPUT
725 acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX; 768 acpi_gbl_lowest_stack_pointer = ACPI_CAST_PTR(acpi_size, ACPI_SIZE_MAX);
726#endif 769#endif
727 770
728#ifdef ACPI_DBG_TRACK_ALLOCATIONS 771#ifdef ACPI_DBG_TRACK_ALLOCATIONS