aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/namespace
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2007-02-02 11:48:20 -0500
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:24 -0500
commit1ba753acb372c2955a4843302e92e49ce82e2fea (patch)
tree13dbe3af585f835c7d9cdf41fae505a7df4e8620 /drivers/acpi/namespace
parent95befdb398e0112ede80529f6770644ecfa5a82e (diff)
ACPICA: Re-implement interpreters' "serialized mode"
Enhanced the implementation of the interpreters' serialized mode (boot with "acpi_serialize" to set acpi_glb_all_methods_serialized flag.) When this mode is specified, instead of creating a serialization semaphore per control method, the interpreter lock is simply no longer released before a blocking operation during control method execution. This effectively makes the AML Interpreter single-threaded. The overhead of a semaphore per-method is eliminated. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/namespace')
-rw-r--r--drivers/acpi/namespace/nseval.c11
-rw-r--r--drivers/acpi/namespace/nsinit.c7
-rw-r--r--drivers/acpi/namespace/nsxfeval.c11
3 files changed, 8 insertions, 21 deletions
diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c
index 4b0a4a8c984..71566161ac8 100644
--- a/drivers/acpi/namespace/nseval.c
+++ b/drivers/acpi/namespace/nseval.c
@@ -154,11 +154,7 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info)
154 * Execute the method via the interpreter. The interpreter is locked 154 * Execute the method via the interpreter. The interpreter is locked
155 * here before calling into the AML parser 155 * here before calling into the AML parser
156 */ 156 */
157 status = acpi_ex_enter_interpreter(); 157 acpi_ex_enter_interpreter();
158 if (ACPI_FAILURE(status)) {
159 return_ACPI_STATUS(status);
160 }
161
162 status = acpi_ps_execute_method(info); 158 status = acpi_ps_execute_method(info);
163 acpi_ex_exit_interpreter(); 159 acpi_ex_exit_interpreter();
164 } else { 160 } else {
@@ -182,10 +178,7 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info)
182 * resolution, we must lock it because we could access an opregion. 178 * resolution, we must lock it because we could access an opregion.
183 * The opregion access code assumes that the interpreter is locked. 179 * The opregion access code assumes that the interpreter is locked.
184 */ 180 */
185 status = acpi_ex_enter_interpreter(); 181 acpi_ex_enter_interpreter();
186 if (ACPI_FAILURE(status)) {
187 return_ACPI_STATUS(status);
188 }
189 182
190 /* Function has a strange interface */ 183 /* Function has a strange interface */
191 184
diff --git a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c
index aec8488c001..0d3a42bf2f1 100644
--- a/drivers/acpi/namespace/nsinit.c
+++ b/drivers/acpi/namespace/nsinit.c
@@ -213,7 +213,7 @@ acpi_ns_init_one_object(acpi_handle obj_handle,
213 u32 level, void *context, void **return_value) 213 u32 level, void *context, void **return_value)
214{ 214{
215 acpi_object_type type; 215 acpi_object_type type;
216 acpi_status status; 216 acpi_status status = AE_OK;
217 struct acpi_init_walk_info *info = 217 struct acpi_init_walk_info *info =
218 (struct acpi_init_walk_info *)context; 218 (struct acpi_init_walk_info *)context;
219 struct acpi_namespace_node *node = 219 struct acpi_namespace_node *node =
@@ -267,10 +267,7 @@ acpi_ns_init_one_object(acpi_handle obj_handle,
267 /* 267 /*
268 * Must lock the interpreter before executing AML code 268 * Must lock the interpreter before executing AML code
269 */ 269 */
270 status = acpi_ex_enter_interpreter(); 270 acpi_ex_enter_interpreter();
271 if (ACPI_FAILURE(status)) {
272 return (status);
273 }
274 271
275 /* 272 /*
276 * Each of these types can contain executable AML code within the 273 * Each of these types can contain executable AML code within the
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
index dca6799ac67..6a0a46eda9a 100644
--- a/drivers/acpi/namespace/nsxfeval.c
+++ b/drivers/acpi/namespace/nsxfeval.c
@@ -170,7 +170,6 @@ acpi_evaluate_object(acpi_handle handle,
170 struct acpi_buffer *return_buffer) 170 struct acpi_buffer *return_buffer)
171{ 171{
172 acpi_status status; 172 acpi_status status;
173 acpi_status status2;
174 struct acpi_evaluate_info *info; 173 struct acpi_evaluate_info *info;
175 acpi_size buffer_space_needed; 174 acpi_size buffer_space_needed;
176 u32 i; 175 u32 i;
@@ -329,14 +328,12 @@ acpi_evaluate_object(acpi_handle handle,
329 * Delete the internal return object. NOTE: Interpreter must be 328 * Delete the internal return object. NOTE: Interpreter must be
330 * locked to avoid race condition. 329 * locked to avoid race condition.
331 */ 330 */
332 status2 = acpi_ex_enter_interpreter(); 331 acpi_ex_enter_interpreter();
333 if (ACPI_SUCCESS(status2)) {
334 332
335 /* Remove one reference on the return object (should delete it) */ 333 /* Remove one reference on the return object (should delete it) */
336 334
337 acpi_ut_remove_reference(info->return_object); 335 acpi_ut_remove_reference(info->return_object);
338 acpi_ex_exit_interpreter(); 336 acpi_ex_exit_interpreter();
339 }
340 } 337 }
341 338
342 cleanup: 339 cleanup: