diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/nsinit.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbxfload.c | 26 | ||||
-rw-r--r-- | drivers/acpi/acpica/utxfinit.c | 43 |
3 files changed, 32 insertions, 39 deletions
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c index f029a3da67eb..d4aa8b696ee9 100644 --- a/drivers/acpi/acpica/nsinit.c +++ b/drivers/acpi/acpica/nsinit.c | |||
@@ -84,6 +84,8 @@ acpi_status acpi_ns_initialize_objects(void) | |||
84 | 84 | ||
85 | ACPI_FUNCTION_TRACE(ns_initialize_objects); | 85 | ACPI_FUNCTION_TRACE(ns_initialize_objects); |
86 | 86 | ||
87 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | ||
88 | "[Init] Completing Initialization of ACPI Objects\n")); | ||
87 | ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, | 89 | ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, |
88 | "**** Starting initialization of namespace objects ****\n")); | 90 | "**** Starting initialization of namespace objects ****\n")); |
89 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 91 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c index 9496b84476a4..3151968c10d1 100644 --- a/drivers/acpi/acpica/tbxfload.c +++ b/drivers/acpi/acpica/tbxfload.c | |||
@@ -81,13 +81,11 @@ acpi_status __init acpi_load_tables(void) | |||
81 | * between acpi_initialize_subsystem() and acpi_load_tables() to use | 81 | * between acpi_initialize_subsystem() and acpi_load_tables() to use |
82 | * their customized default region handlers. | 82 | * their customized default region handlers. |
83 | */ | 83 | */ |
84 | if (acpi_gbl_group_module_level_code) { | 84 | status = acpi_ev_install_region_handlers(); |
85 | status = acpi_ev_install_region_handlers(); | 85 | if (ACPI_FAILURE(status) && status != AE_ALREADY_EXISTS) { |
86 | if (ACPI_FAILURE(status) && status != AE_ALREADY_EXISTS) { | 86 | ACPI_EXCEPTION((AE_INFO, status, |
87 | ACPI_EXCEPTION((AE_INFO, status, | 87 | "During Region initialization")); |
88 | "During Region initialization")); | 88 | return_ACPI_STATUS(status); |
89 | return_ACPI_STATUS(status); | ||
90 | } | ||
91 | } | 89 | } |
92 | 90 | ||
93 | /* Load the namespace from the tables */ | 91 | /* Load the namespace from the tables */ |
@@ -105,6 +103,20 @@ acpi_status __init acpi_load_tables(void) | |||
105 | "While loading namespace from ACPI tables")); | 103 | "While loading namespace from ACPI tables")); |
106 | } | 104 | } |
107 | 105 | ||
106 | if (!acpi_gbl_group_module_level_code) { | ||
107 | /* | ||
108 | * Initialize the objects that remain uninitialized. This | ||
109 | * runs the executable AML that may be part of the | ||
110 | * declaration of these objects: | ||
111 | * operation_regions, buffer_fields, Buffers, and Packages. | ||
112 | */ | ||
113 | status = acpi_ns_initialize_objects(); | ||
114 | if (ACPI_FAILURE(status)) { | ||
115 | return_ACPI_STATUS(status); | ||
116 | } | ||
117 | } | ||
118 | |||
119 | acpi_gbl_namespace_initialized = TRUE; | ||
108 | return_ACPI_STATUS(status); | 120 | return_ACPI_STATUS(status); |
109 | } | 121 | } |
110 | 122 | ||
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c index d70649d3ac60..75b5f27da267 100644 --- a/drivers/acpi/acpica/utxfinit.c +++ b/drivers/acpi/acpica/utxfinit.c | |||
@@ -154,23 +154,6 @@ acpi_status __init acpi_enable_subsystem(u32 flags) | |||
154 | */ | 154 | */ |
155 | acpi_gbl_early_initialization = FALSE; | 155 | acpi_gbl_early_initialization = FALSE; |
156 | 156 | ||
157 | /* | ||
158 | * Install the default operation region handlers. These are the | ||
159 | * handlers that are defined by the ACPI specification to be | ||
160 | * "always accessible" -- namely, system_memory, system_IO, and | ||
161 | * PCI_Config. This also means that no _REG methods need to be | ||
162 | * run for these address spaces. We need to have these handlers | ||
163 | * installed before any AML code can be executed, especially any | ||
164 | * module-level code (11/2015). | ||
165 | */ | ||
166 | if (!acpi_gbl_group_module_level_code) { | ||
167 | status = acpi_ev_install_region_handlers(); | ||
168 | if (ACPI_FAILURE(status)) { | ||
169 | ACPI_EXCEPTION((AE_INFO, status, | ||
170 | "During Region initialization")); | ||
171 | return_ACPI_STATUS(status); | ||
172 | } | ||
173 | } | ||
174 | #if (!ACPI_REDUCED_HARDWARE) | 157 | #if (!ACPI_REDUCED_HARDWARE) |
175 | 158 | ||
176 | /* Enable ACPI mode */ | 159 | /* Enable ACPI mode */ |
@@ -284,25 +267,21 @@ acpi_status __init acpi_initialize_objects(u32 flags) | |||
284 | */ | 267 | */ |
285 | if (acpi_gbl_group_module_level_code) { | 268 | if (acpi_gbl_group_module_level_code) { |
286 | acpi_ns_exec_module_code_list(); | 269 | acpi_ns_exec_module_code_list(); |
287 | } | ||
288 | 270 | ||
289 | /* | 271 | /* |
290 | * Initialize the objects that remain uninitialized. This runs the | 272 | * Initialize the objects that remain uninitialized. This |
291 | * executable AML that may be part of the declaration of these objects: | 273 | * runs the executable AML that may be part of the |
292 | * operation_regions, buffer_fields, Buffers, and Packages. | 274 | * declaration of these objects: |
293 | */ | 275 | * operation_regions, buffer_fields, Buffers, and Packages. |
294 | if (!(flags & ACPI_NO_OBJECT_INIT)) { | 276 | */ |
295 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 277 | if (!(flags & ACPI_NO_OBJECT_INIT)) { |
296 | "[Init] Completing Initialization of ACPI Objects\n")); | 278 | status = acpi_ns_initialize_objects(); |
297 | 279 | if (ACPI_FAILURE(status)) { | |
298 | status = acpi_ns_initialize_objects(); | 280 | return_ACPI_STATUS(status); |
299 | if (ACPI_FAILURE(status)) { | 281 | } |
300 | return_ACPI_STATUS(status); | ||
301 | } | 282 | } |
302 | } | 283 | } |
303 | 284 | ||
304 | acpi_gbl_namespace_initialized = TRUE; | ||
305 | |||
306 | /* | 285 | /* |
307 | * Initialize all device/region objects in the namespace. This runs | 286 | * Initialize all device/region objects in the namespace. This runs |
308 | * the device _STA and _INI methods and region _REG methods. | 287 | * the device _STA and _INI methods and region _REG methods. |