aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exmutex.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-01-27 16:43:00 -0500
committerLen Brown <len.brown@intel.com>2006-01-31 03:25:09 -0500
commitb8e4d89357fc434618a59c1047cac72641191805 (patch)
treeac97fcc6fdc277c682365900663872c96f2420bd /drivers/acpi/executer/exmutex.c
parent292dd876ee765c478b27c93cc51e93a558ed58bf (diff)
[ACPI] ACPICA 20060127
Implemented support in the Resource Manager to allow unresolved namestring references within resource package objects for the _PRT method. This support is in addition to the previously implemented unresolved reference support within the AML parser. If the interpreter slack mode is enabled (true on Linux unless acpi=strict), these unresolved references will be passed through to the caller as a NULL package entry. http://bugzilla.kernel.org/show_bug.cgi?id=5741 Implemented and deployed new macros and functions for error and warning messages across the subsystem. These macros are simpler and generate less code than their predecessors. The new macros ACPI_ERROR, ACPI_EXCEPTION, ACPI_WARNING, and ACPI_INFO replace the ACPI_REPORT_* macros. Implemented the acpi_cpu_flags type to simplify host OS integration of the Acquire/Release Lock OSL interfaces. Suggested by Steven Rostedt and Andrew Morton. Fixed a problem where Alias ASL operators are sometimes not correctly resolved. causing AE_AML_INTERNAL http://bugzilla.kernel.org/show_bug.cgi?id=5189 http://bugzilla.kernel.org/show_bug.cgi?id=5674 Fixed several problems with the implementation of the ConcatenateResTemplate ASL operator. As per the ACPI specification, zero length buffers are now treated as a single EndTag. One-length buffers always cause a fatal exception. Non-zero length buffers that do not end with a full 2-byte EndTag cause a fatal exception. Fixed a possible structure overwrite in the AcpiGetObjectInfo external interface. (With assistance from Thomas Renninger) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/executer/exmutex.c')
-rw-r--r--drivers/acpi/executer/exmutex.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c
index 89b8ab79410b..f843b22e20b9 100644
--- a/drivers/acpi/executer/exmutex.c
+++ b/drivers/acpi/executer/exmutex.c
@@ -153,7 +153,9 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
153 /* Sanity check -- we must have a valid thread ID */ 153 /* Sanity check -- we must have a valid thread ID */
154 154
155 if (!walk_state->thread) { 155 if (!walk_state->thread) {
156 ACPI_REPORT_ERROR(("Cannot acquire Mutex [%4.4s], null thread info\n", acpi_ut_get_node_name(obj_desc->mutex.node))); 156 ACPI_ERROR((AE_INFO,
157 "Cannot acquire Mutex [%4.4s], null thread info",
158 acpi_ut_get_node_name(obj_desc->mutex.node)));
157 return_ACPI_STATUS(AE_AML_INTERNAL); 159 return_ACPI_STATUS(AE_AML_INTERNAL);
158 } 160 }
159 161
@@ -162,7 +164,9 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
162 * mutex. This mechanism provides some deadlock prevention 164 * mutex. This mechanism provides some deadlock prevention
163 */ 165 */
164 if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { 166 if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) {
165 ACPI_REPORT_ERROR(("Cannot acquire Mutex [%4.4s], incorrect sync_level\n", acpi_ut_get_node_name(obj_desc->mutex.node))); 167 ACPI_ERROR((AE_INFO,
168 "Cannot acquire Mutex [%4.4s], incorrect sync_level",
169 acpi_ut_get_node_name(obj_desc->mutex.node)));
166 return_ACPI_STATUS(AE_AML_MUTEX_ORDER); 170 return_ACPI_STATUS(AE_AML_MUTEX_ORDER);
167 } 171 }
168 172
@@ -237,14 +241,18 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
237 /* The mutex must have been previously acquired in order to release it */ 241 /* The mutex must have been previously acquired in order to release it */
238 242
239 if (!obj_desc->mutex.owner_thread) { 243 if (!obj_desc->mutex.owner_thread) {
240 ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], not acquired\n", acpi_ut_get_node_name(obj_desc->mutex.node))); 244 ACPI_ERROR((AE_INFO,
245 "Cannot release Mutex [%4.4s], not acquired",
246 acpi_ut_get_node_name(obj_desc->mutex.node)));
241 return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED); 247 return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED);
242 } 248 }
243 249
244 /* Sanity check -- we must have a valid thread ID */ 250 /* Sanity check -- we must have a valid thread ID */
245 251
246 if (!walk_state->thread) { 252 if (!walk_state->thread) {
247 ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], null thread info\n", acpi_ut_get_node_name(obj_desc->mutex.node))); 253 ACPI_ERROR((AE_INFO,
254 "Cannot release Mutex [%4.4s], null thread info",
255 acpi_ut_get_node_name(obj_desc->mutex.node)));
248 return_ACPI_STATUS(AE_AML_INTERNAL); 256 return_ACPI_STATUS(AE_AML_INTERNAL);
249 } 257 }
250 258
@@ -255,7 +263,11 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
255 if ((obj_desc->mutex.owner_thread->thread_id != 263 if ((obj_desc->mutex.owner_thread->thread_id !=
256 walk_state->thread->thread_id) 264 walk_state->thread->thread_id)
257 && (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) { 265 && (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) {
258 ACPI_REPORT_ERROR(("Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n", walk_state->thread->thread_id, acpi_ut_get_node_name(obj_desc->mutex.node), obj_desc->mutex.owner_thread->thread_id)); 266 ACPI_ERROR((AE_INFO,
267 "Thread %X cannot release Mutex [%4.4s] acquired by thread %X",
268 walk_state->thread->thread_id,
269 acpi_ut_get_node_name(obj_desc->mutex.node),
270 obj_desc->mutex.owner_thread->thread_id));
259 return_ACPI_STATUS(AE_AML_NOT_OWNER); 271 return_ACPI_STATUS(AE_AML_NOT_OWNER);
260 } 272 }
261 273
@@ -264,7 +276,9 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
264 * equal to the current sync level 276 * equal to the current sync level
265 */ 277 */
266 if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) { 278 if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) {
267 ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], incorrect sync_level\n", acpi_ut_get_node_name(obj_desc->mutex.node))); 279 ACPI_ERROR((AE_INFO,
280 "Cannot release Mutex [%4.4s], incorrect sync_level",
281 acpi_ut_get_node_name(obj_desc->mutex.node)));
268 return_ACPI_STATUS(AE_AML_MUTEX_ORDER); 282 return_ACPI_STATUS(AE_AML_MUTEX_ORDER);
269 } 283 }
270 284