aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpica/exconfig.c2
-rw-r--r--drivers/acpi/acpica/nsload.c7
-rw-r--r--drivers/acpi/ec.c15
-rw-r--r--include/acpi/acpixf.h2
4 files changed, 15 insertions, 11 deletions
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index 21932d640a41..a1d177d58254 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -108,9 +108,7 @@ acpi_ex_add_table(u32 table_index,
108 108
109 /* Add the table to the namespace */ 109 /* Add the table to the namespace */
110 110
111 acpi_ex_exit_interpreter();
112 status = acpi_ns_load_table(table_index, parent_node); 111 status = acpi_ns_load_table(table_index, parent_node);
113 acpi_ex_enter_interpreter();
114 if (ACPI_FAILURE(status)) { 112 if (ACPI_FAILURE(status)) {
115 acpi_ut_remove_reference(obj_desc); 113 acpi_ut_remove_reference(obj_desc);
116 *ddb_handle = NULL; 114 *ddb_handle = NULL;
diff --git a/drivers/acpi/acpica/nsload.c b/drivers/acpi/acpica/nsload.c
index 297f6aacd7d4..b5e2b0ada0ab 100644
--- a/drivers/acpi/acpica/nsload.c
+++ b/drivers/acpi/acpica/nsload.c
@@ -46,7 +46,6 @@
46#include "acnamesp.h" 46#include "acnamesp.h"
47#include "acdispat.h" 47#include "acdispat.h"
48#include "actables.h" 48#include "actables.h"
49#include "acinterp.h"
50 49
51#define _COMPONENT ACPI_NAMESPACE 50#define _COMPONENT ACPI_NAMESPACE
52ACPI_MODULE_NAME("nsload") 51ACPI_MODULE_NAME("nsload")
@@ -79,8 +78,6 @@ acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node)
79 78
80 ACPI_FUNCTION_TRACE(ns_load_table); 79 ACPI_FUNCTION_TRACE(ns_load_table);
81 80
82 acpi_ex_enter_interpreter();
83
84 /* 81 /*
85 * Parse the table and load the namespace with all named 82 * Parse the table and load the namespace with all named
86 * objects found within. Control methods are NOT parsed 83 * objects found within. Control methods are NOT parsed
@@ -92,7 +89,7 @@ acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node)
92 */ 89 */
93 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); 90 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
94 if (ACPI_FAILURE(status)) { 91 if (ACPI_FAILURE(status)) {
95 goto unlock_interp; 92 return_ACPI_STATUS(status);
96 } 93 }
97 94
98 /* If table already loaded into namespace, just return */ 95 /* If table already loaded into namespace, just return */
@@ -133,8 +130,6 @@ acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node)
133 130
134unlock: 131unlock:
135 (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); 132 (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
136unlock_interp:
137 (void)acpi_ex_exit_interpreter();
138 133
139 if (ACPI_FAILURE(status)) { 134 if (ACPI_FAILURE(status)) {
140 return_ACPI_STATUS(status); 135 return_ACPI_STATUS(status);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 73c76d646064..290d6f5be44b 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1331,8 +1331,6 @@ static int ec_install_handlers(struct acpi_ec *ec)
1331 1331
1332static void ec_remove_handlers(struct acpi_ec *ec) 1332static void ec_remove_handlers(struct acpi_ec *ec)
1333{ 1333{
1334 acpi_ec_stop(ec, false);
1335
1336 if (test_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags)) { 1334 if (test_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags)) {
1337 if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle, 1335 if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
1338 ACPI_ADR_SPACE_EC, &acpi_ec_space_handler))) 1336 ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
@@ -1340,6 +1338,19 @@ static void ec_remove_handlers(struct acpi_ec *ec)
1340 clear_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags); 1338 clear_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
1341 } 1339 }
1342 1340
1341 /*
1342 * Stops handling the EC transactions after removing the operation
1343 * region handler. This is required because _REG(DISCONNECT)
1344 * invoked during the removal can result in new EC transactions.
1345 *
1346 * Flushes the EC requests and thus disables the GPE before
1347 * removing the GPE handler. This is required by the current ACPICA
1348 * GPE core. ACPICA GPE core will automatically disable a GPE when
1349 * it is indicated but there is no way to handle it. So the drivers
1350 * must disable the GPEs prior to removing the GPE handlers.
1351 */
1352 acpi_ec_stop(ec, false);
1353
1343 if (test_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags)) { 1354 if (test_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags)) {
1344 if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe, 1355 if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
1345 &acpi_ec_gpe_handler))) 1356 &acpi_ec_gpe_handler)))
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 4e4c21491c41..1ff3a76c265d 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -192,7 +192,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
192/* 192/*
193 * Optionally support group module level code. 193 * Optionally support group module level code.
194 */ 194 */
195ACPI_INIT_GLOBAL(u8, acpi_gbl_group_module_level_code, FALSE); 195ACPI_INIT_GLOBAL(u8, acpi_gbl_group_module_level_code, TRUE);
196 196
197/* 197/*
198 * Optionally use 32-bit FADT addresses if and when there is a conflict 198 * Optionally use 32-bit FADT addresses if and when there is a conflict