aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utglobal.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2008-10-22 23:19:51 -0400
committerLen Brown <len.brown@intel.com>2008-10-22 23:19:51 -0400
commitbcb631f31839cb7c7dd56ab534b6eb4867e9161b (patch)
treed86336c9cfb22e4af69fbe73c94299a775ecc220 /drivers/acpi/utilities/utglobal.c
parent955ba395616a78780e70dc3f3b0b56ca4db52e5c (diff)
parented37a71eac8ba375d85ab10ed5f5e8bdf1cd72e0 (diff)
Merge branch 'acpica' into test
Diffstat (limited to 'drivers/acpi/utilities/utglobal.c')
-rw-r--r--drivers/acpi/utilities/utglobal.c52
1 files changed, 46 insertions, 6 deletions
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index a6e71b801d2d..670551b95e56 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -281,7 +281,6 @@ struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] = {
281 /* ACPI_BITREG_RT_CLOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, 281 /* ACPI_BITREG_RT_CLOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE,
282 ACPI_BITPOSITION_RT_CLOCK_ENABLE, 282 ACPI_BITPOSITION_RT_CLOCK_ENABLE,
283 ACPI_BITMASK_RT_CLOCK_ENABLE}, 283 ACPI_BITMASK_RT_CLOCK_ENABLE},
284 /* ACPI_BITREG_WAKE_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, 0, 0},
285 /* ACPI_BITREG_PCIEXP_WAKE_DISABLE */ {ACPI_REGISTER_PM1_ENABLE, 284 /* ACPI_BITREG_PCIEXP_WAKE_DISABLE */ {ACPI_REGISTER_PM1_ENABLE,
286 ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE, 285 ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE,
287 ACPI_BITMASK_PCIEXP_WAKE_DISABLE}, 286 ACPI_BITMASK_PCIEXP_WAKE_DISABLE},
@@ -575,6 +574,47 @@ char *acpi_ut_get_descriptor_name(void *object)
575 574
576} 575}
577 576
577/*******************************************************************************
578 *
579 * FUNCTION: acpi_ut_get_reference_name
580 *
581 * PARAMETERS: Object - An ACPI reference object
582 *
583 * RETURN: Pointer to a string
584 *
585 * DESCRIPTION: Decode a reference object sub-type to a string.
586 *
587 ******************************************************************************/
588
589/* Printable names of reference object sub-types */
590
591static const char *acpi_gbl_ref_class_names[] = {
592 /* 00 */ "Local",
593 /* 01 */ "Argument",
594 /* 02 */ "RefOf",
595 /* 03 */ "Index",
596 /* 04 */ "DdbHandle",
597 /* 05 */ "Named Object",
598 /* 06 */ "Debug"
599};
600
601const char *acpi_ut_get_reference_name(union acpi_operand_object *object)
602{
603 if (!object)
604 return "NULL Object";
605
606 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND)
607 return "Not an Operand object";
608
609 if (object->common.type != ACPI_TYPE_LOCAL_REFERENCE)
610 return "Not a Reference object";
611
612 if (object->reference.class > ACPI_REFCLASS_MAX)
613 return "Unknown Reference class";
614
615 return acpi_gbl_ref_class_names[object->reference.class];
616}
617
578#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 618#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
579/* 619/*
580 * Strings and procedures used for debug only 620 * Strings and procedures used for debug only
@@ -677,14 +717,14 @@ u8 acpi_ut_valid_object_type(acpi_object_type type)
677 * 717 *
678 * PARAMETERS: None 718 * PARAMETERS: None
679 * 719 *
680 * RETURN: None 720 * RETURN: Status
681 * 721 *
682 * DESCRIPTION: Init library globals. All globals that require specific 722 * DESCRIPTION: Init library globals. All globals that require specific
683 * initialization should be initialized here! 723 * initialization should be initialized here!
684 * 724 *
685 ******************************************************************************/ 725 ******************************************************************************/
686 726
687void acpi_ut_init_globals(void) 727acpi_status acpi_ut_init_globals(void)
688{ 728{
689 acpi_status status; 729 acpi_status status;
690 u32 i; 730 u32 i;
@@ -695,7 +735,7 @@ void acpi_ut_init_globals(void)
695 735
696 status = acpi_ut_create_caches(); 736 status = acpi_ut_create_caches();
697 if (ACPI_FAILURE(status)) { 737 if (ACPI_FAILURE(status)) {
698 return; 738 return_ACPI_STATUS(status);
699 } 739 }
700 740
701 /* Mutex locked flags */ 741 /* Mutex locked flags */
@@ -772,8 +812,8 @@ void acpi_ut_init_globals(void)
772 acpi_gbl_display_final_mem_stats = FALSE; 812 acpi_gbl_display_final_mem_stats = FALSE;
773#endif 813#endif
774 814
775 return_VOID; 815 return_ACPI_STATUS(AE_OK);
776} 816}
777 817
778ACPI_EXPORT_SYMBOL(acpi_dbg_level) 818ACPI_EXPORT_SYMBOL(acpi_dbg_level)
779 ACPI_EXPORT_SYMBOL(acpi_dbg_layer) 819ACPI_EXPORT_SYMBOL(acpi_dbg_layer)