diff options
author | Bob Moore <robert.moore@intel.com> | 2006-10-02 00:00:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-03-31 02:19:03 -0500 |
commit | 52fc0b026e99b5d5d585095148d997d5634bbc25 (patch) | |
tree | 7bf93132cfd3e6957308a84198ee159f7d43cf6f /drivers/acpi/namespace/nsxfeval.c | |
parent | 46358614ed5b031797522f1020e989c959a8d8a6 (diff) |
[ACPI] ACPICA 20060210
Removed a couple of extraneous ACPI_ERROR messages that
appeared during normal execution. These became apparent
after the conversion from ACPI_DEBUG_PRINT.
Fixed a problem where the CreateField operator could hang
if the BitIndex or NumBits parameter referred to a named
object. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5359
Fixed a problem where a DeRefOf operation on a buffer
object incorrectly failed with an exception. This also
fixes a couple of related RefOf and DeRefOf issues.
From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5360
http://bugzilla.kernel.org/show_bug.cgi?id=5387
http://bugzilla.kernel.org/show_bug.cgi?id=5392
Fixed a problem where the AE_BUFFER_LIMIT exception was
returned instead of AE_STRING_LIMIT on an out-of-bounds
Index() operation. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5480
Implemented a memory cleanup at the end of the execution
of each iteration of an AML While() loop, preventing the
accumulation of outstanding objects. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5427
Eliminated a chunk of duplicate code in the object
resolution code. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5336
Fixed several warnings during the 64-bit code generation.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/namespace/nsxfeval.c')
-rw-r--r-- | drivers/acpi/namespace/nsxfeval.c | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c index a95f636dc35d..71e7769d7daf 100644 --- a/drivers/acpi/namespace/nsxfeval.c +++ b/drivers/acpi/namespace/nsxfeval.c | |||
@@ -110,6 +110,7 @@ acpi_evaluate_object_typed(acpi_handle handle, | |||
110 | } | 110 | } |
111 | 111 | ||
112 | if (return_buffer->length == 0) { | 112 | if (return_buffer->length == 0) { |
113 | |||
113 | /* Error because caller specifically asked for a return value */ | 114 | /* Error because caller specifically asked for a return value */ |
114 | 115 | ||
115 | ACPI_ERROR((AE_INFO, "No return value")); | 116 | ACPI_ERROR((AE_INFO, "No return value")); |
@@ -131,6 +132,7 @@ acpi_evaluate_object_typed(acpi_handle handle, | |||
131 | acpi_ut_get_type_name(return_type))); | 132 | acpi_ut_get_type_name(return_type))); |
132 | 133 | ||
133 | if (must_free) { | 134 | if (must_free) { |
135 | |||
134 | /* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */ | 136 | /* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */ |
135 | 137 | ||
136 | acpi_os_free(return_buffer->pointer); | 138 | acpi_os_free(return_buffer->pointer); |
@@ -224,9 +226,9 @@ acpi_evaluate_object(acpi_handle handle, | |||
224 | * 3) Valid handle | 226 | * 3) Valid handle |
225 | */ | 227 | */ |
226 | if ((pathname) && (acpi_ns_valid_root_prefix(pathname[0]))) { | 228 | if ((pathname) && (acpi_ns_valid_root_prefix(pathname[0]))) { |
227 | /* | 229 | |
228 | * The path is fully qualified, just evaluate by name | 230 | /* The path is fully qualified, just evaluate by name */ |
229 | */ | 231 | |
230 | status = acpi_ns_evaluate_by_name(pathname, &info); | 232 | status = acpi_ns_evaluate_by_name(pathname, &info); |
231 | } else if (!handle) { | 233 | } else if (!handle) { |
232 | /* | 234 | /* |
@@ -235,11 +237,12 @@ acpi_evaluate_object(acpi_handle handle, | |||
235 | * qualified names above, this is an error | 237 | * qualified names above, this is an error |
236 | */ | 238 | */ |
237 | if (!pathname) { | 239 | if (!pathname) { |
238 | ACPI_ERROR((AE_INFO, | 240 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
239 | "Both Handle and Pathname are NULL")); | 241 | "Both Handle and Pathname are NULL")); |
240 | } else { | 242 | } else { |
241 | ACPI_ERROR((AE_INFO, | 243 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
242 | "Handle is NULL and Pathname is relative")); | 244 | "Null Handle with relative pathname [%s]", |
245 | pathname)); | ||
243 | } | 246 | } |
244 | 247 | ||
245 | status = AE_BAD_PARAMETER; | 248 | status = AE_BAD_PARAMETER; |
@@ -256,9 +259,8 @@ acpi_evaluate_object(acpi_handle handle, | |||
256 | */ | 259 | */ |
257 | status = acpi_ns_evaluate_by_handle(&info); | 260 | status = acpi_ns_evaluate_by_handle(&info); |
258 | } else { | 261 | } else { |
259 | /* | 262 | /* Both a Handle and a relative Pathname */ |
260 | * Both a Handle and a relative Pathname | 263 | |
261 | */ | ||
262 | status = acpi_ns_evaluate_relative(pathname, &info); | 264 | status = acpi_ns_evaluate_relative(pathname, &info); |
263 | } | 265 | } |
264 | } | 266 | } |
@@ -295,6 +297,7 @@ acpi_evaluate_object(acpi_handle handle, | |||
295 | acpi_ut_get_object_size(info.return_object, | 297 | acpi_ut_get_object_size(info.return_object, |
296 | &buffer_space_needed); | 298 | &buffer_space_needed); |
297 | if (ACPI_SUCCESS(status)) { | 299 | if (ACPI_SUCCESS(status)) { |
300 | |||
298 | /* Validate/Allocate/Clear caller buffer */ | 301 | /* Validate/Allocate/Clear caller buffer */ |
299 | 302 | ||
300 | status = | 303 | status = |
@@ -303,7 +306,8 @@ acpi_evaluate_object(acpi_handle handle, | |||
303 | buffer_space_needed); | 306 | buffer_space_needed); |
304 | if (ACPI_FAILURE(status)) { | 307 | if (ACPI_FAILURE(status)) { |
305 | /* | 308 | /* |
306 | * Caller's buffer is too small or a new one can't be allocated | 309 | * Caller's buffer is too small or a new one can't |
310 | * be allocated | ||
307 | */ | 311 | */ |
308 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 312 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
309 | "Needed buffer size %X, %s\n", | 313 | "Needed buffer size %X, %s\n", |
@@ -312,9 +316,8 @@ acpi_evaluate_object(acpi_handle handle, | |||
312 | acpi_format_exception | 316 | acpi_format_exception |
313 | (status))); | 317 | (status))); |
314 | } else { | 318 | } else { |
315 | /* | 319 | /* We have enough space for the object, build it */ |
316 | * We have enough space for the object, build it | 320 | |
317 | */ | ||
318 | status = | 321 | status = |
319 | acpi_ut_copy_iobject_to_eobject | 322 | acpi_ut_copy_iobject_to_eobject |
320 | (info.return_object, | 323 | (info.return_object, |
@@ -341,10 +344,10 @@ acpi_evaluate_object(acpi_handle handle, | |||
341 | } | 344 | } |
342 | } | 345 | } |
343 | 346 | ||
344 | /* | 347 | /* Free the input parameter list (if we created one) */ |
345 | * Free the input parameter list (if we created one), | 348 | |
346 | */ | ||
347 | if (info.parameters) { | 349 | if (info.parameters) { |
350 | |||
348 | /* Free the allocated parameter block */ | 351 | /* Free the allocated parameter block */ |
349 | 352 | ||
350 | acpi_ut_delete_internal_object_list(info.parameters); | 353 | acpi_ut_delete_internal_object_list(info.parameters); |
@@ -473,6 +476,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, | |||
473 | } | 476 | } |
474 | 477 | ||
475 | if (!(flags & ACPI_STA_DEVICE_PRESENT)) { | 478 | if (!(flags & ACPI_STA_DEVICE_PRESENT)) { |
479 | |||
476 | /* Don't examine children of the device if not present */ | 480 | /* Don't examine children of the device if not present */ |
477 | 481 | ||
478 | return (AE_CTRL_DEPTH); | 482 | return (AE_CTRL_DEPTH); |
@@ -489,6 +493,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, | |||
489 | } | 493 | } |
490 | 494 | ||
491 | if (ACPI_STRNCMP(hid.value, info->hid, sizeof(hid.value)) != 0) { | 495 | if (ACPI_STRNCMP(hid.value, info->hid, sizeof(hid.value)) != 0) { |
496 | |||
492 | /* Get the list of Compatible IDs */ | 497 | /* Get the list of Compatible IDs */ |
493 | 498 | ||
494 | status = acpi_ut_execute_CID(node, &cid); | 499 | status = acpi_ut_execute_CID(node, &cid); |
@@ -563,9 +568,9 @@ acpi_get_devices(char *HID, | |||
563 | * We're going to call their callback from OUR callback, so we need | 568 | * We're going to call their callback from OUR callback, so we need |
564 | * to know what it is, and their context parameter. | 569 | * to know what it is, and their context parameter. |
565 | */ | 570 | */ |
571 | info.hid = HID; | ||
566 | info.context = context; | 572 | info.context = context; |
567 | info.user_function = user_function; | 573 | info.user_function = user_function; |
568 | info.hid = HID; | ||
569 | 574 | ||
570 | /* | 575 | /* |
571 | * Lock the namespace around the walk. | 576 | * Lock the namespace around the walk. |
@@ -578,9 +583,8 @@ acpi_get_devices(char *HID, | |||
578 | return_ACPI_STATUS(status); | 583 | return_ACPI_STATUS(status); |
579 | } | 584 | } |
580 | 585 | ||
581 | status = acpi_ns_walk_namespace(ACPI_TYPE_DEVICE, | 586 | status = acpi_ns_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, |
582 | ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, | 587 | ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK, |
583 | ACPI_NS_WALK_UNLOCK, | ||
584 | acpi_ns_get_device_callback, &info, | 588 | acpi_ns_get_device_callback, &info, |
585 | return_value); | 589 | return_value); |
586 | 590 | ||