diff options
Diffstat (limited to 'drivers/acpi/utilities/utglobal.c')
-rw-r--r-- | drivers/acpi/utilities/utglobal.c | 72 |
1 files changed, 2 insertions, 70 deletions
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index 8653dda4f813..0e4161c81076 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c | |||
@@ -738,73 +738,6 @@ acpi_ut_valid_object_type ( | |||
738 | 738 | ||
739 | /******************************************************************************* | 739 | /******************************************************************************* |
740 | * | 740 | * |
741 | * FUNCTION: acpi_ut_allocate_owner_id | ||
742 | * | ||
743 | * PARAMETERS: id_type - Type of ID (method or table) | ||
744 | * | ||
745 | * DESCRIPTION: Allocate a table or method owner id | ||
746 | * | ||
747 | * NOTE: this algorithm has a wraparound problem at 64_k method invocations, and | ||
748 | * should be revisited (TBD) | ||
749 | * | ||
750 | ******************************************************************************/ | ||
751 | |||
752 | acpi_owner_id | ||
753 | acpi_ut_allocate_owner_id ( | ||
754 | u32 id_type) | ||
755 | { | ||
756 | acpi_owner_id owner_id = 0xFFFF; | ||
757 | |||
758 | |||
759 | ACPI_FUNCTION_TRACE ("ut_allocate_owner_id"); | ||
760 | |||
761 | |||
762 | if (ACPI_FAILURE (acpi_ut_acquire_mutex (ACPI_MTX_CACHES))) | ||
763 | { | ||
764 | return (0); | ||
765 | } | ||
766 | |||
767 | switch (id_type) | ||
768 | { | ||
769 | case ACPI_OWNER_TYPE_TABLE: | ||
770 | |||
771 | owner_id = acpi_gbl_next_table_owner_id; | ||
772 | acpi_gbl_next_table_owner_id++; | ||
773 | |||
774 | /* Check for wraparound */ | ||
775 | |||
776 | if (acpi_gbl_next_table_owner_id == ACPI_FIRST_METHOD_ID) | ||
777 | { | ||
778 | acpi_gbl_next_table_owner_id = ACPI_FIRST_TABLE_ID; | ||
779 | ACPI_REPORT_WARNING (("Table owner ID wraparound\n")); | ||
780 | } | ||
781 | break; | ||
782 | |||
783 | |||
784 | case ACPI_OWNER_TYPE_METHOD: | ||
785 | |||
786 | owner_id = acpi_gbl_next_method_owner_id; | ||
787 | acpi_gbl_next_method_owner_id++; | ||
788 | |||
789 | if (acpi_gbl_next_method_owner_id == ACPI_FIRST_TABLE_ID) | ||
790 | { | ||
791 | /* Check for wraparound */ | ||
792 | |||
793 | acpi_gbl_next_method_owner_id = ACPI_FIRST_METHOD_ID; | ||
794 | } | ||
795 | break; | ||
796 | |||
797 | default: | ||
798 | break; | ||
799 | } | ||
800 | |||
801 | (void) acpi_ut_release_mutex (ACPI_MTX_CACHES); | ||
802 | return_VALUE (owner_id); | ||
803 | } | ||
804 | |||
805 | |||
806 | /******************************************************************************* | ||
807 | * | ||
808 | * FUNCTION: acpi_ut_init_globals | 741 | * FUNCTION: acpi_ut_init_globals |
809 | * | 742 | * |
810 | * PARAMETERS: None | 743 | * PARAMETERS: None |
@@ -848,7 +781,7 @@ acpi_ut_init_globals ( | |||
848 | for (i = 0; i < NUM_MUTEX; i++) | 781 | for (i = 0; i < NUM_MUTEX; i++) |
849 | { | 782 | { |
850 | acpi_gbl_mutex_info[i].mutex = NULL; | 783 | acpi_gbl_mutex_info[i].mutex = NULL; |
851 | acpi_gbl_mutex_info[i].owner_id = ACPI_MUTEX_NOT_ACQUIRED; | 784 | acpi_gbl_mutex_info[i].thread_id = ACPI_MUTEX_NOT_ACQUIRED; |
852 | acpi_gbl_mutex_info[i].use_count = 0; | 785 | acpi_gbl_mutex_info[i].use_count = 0; |
853 | } | 786 | } |
854 | 787 | ||
@@ -889,8 +822,7 @@ acpi_ut_init_globals ( | |||
889 | acpi_gbl_ns_lookup_count = 0; | 822 | acpi_gbl_ns_lookup_count = 0; |
890 | acpi_gbl_ps_find_count = 0; | 823 | acpi_gbl_ps_find_count = 0; |
891 | acpi_gbl_acpi_hardware_present = TRUE; | 824 | acpi_gbl_acpi_hardware_present = TRUE; |
892 | acpi_gbl_next_table_owner_id = ACPI_FIRST_TABLE_ID; | 825 | acpi_gbl_owner_id_mask = 0; |
893 | acpi_gbl_next_method_owner_id = ACPI_FIRST_METHOD_ID; | ||
894 | acpi_gbl_debugger_configuration = DEBUGGER_THREADING; | 826 | acpi_gbl_debugger_configuration = DEBUGGER_THREADING; |
895 | acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT; | 827 | acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT; |
896 | 828 | ||