aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/utilities')
-rw-r--r--drivers/acpi/utilities/utdelete.c13
-rw-r--r--drivers/acpi/utilities/utmisc.c25
-rw-r--r--drivers/acpi/utilities/utstate.c7
3 files changed, 35 insertions, 10 deletions
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
index 38ebe1c54330..9d3f1149ba21 100644
--- a/drivers/acpi/utilities/utdelete.c
+++ b/drivers/acpi/utilities/utdelete.c
@@ -447,11 +447,16 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
447 */ 447 */
448 switch (ACPI_GET_OBJECT_TYPE(object)) { 448 switch (ACPI_GET_OBJECT_TYPE(object)) {
449 case ACPI_TYPE_DEVICE: 449 case ACPI_TYPE_DEVICE:
450 case ACPI_TYPE_PROCESSOR:
451 case ACPI_TYPE_POWER:
452 case ACPI_TYPE_THERMAL:
450 453
451 acpi_ut_update_ref_count(object->device.system_notify, 454 /* Update the notify objects for these types (if present) */
452 action); 455
453 acpi_ut_update_ref_count(object->device.device_notify, 456 acpi_ut_update_ref_count(object->common_notify.
454 action); 457 system_notify, action);
458 acpi_ut_update_ref_count(object->common_notify.
459 device_notify, action);
455 break; 460 break;
456 461
457 case ACPI_TYPE_PACKAGE: 462 case ACPI_TYPE_PACKAGE:
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
index 33268310c738..6d8a8211be90 100644
--- a/drivers/acpi/utilities/utmisc.c
+++ b/drivers/acpi/utilities/utmisc.c
@@ -65,7 +65,7 @@ ACPI_MODULE_NAME("utmisc")
65u8 acpi_ut_is_aml_table(struct acpi_table_header *table) 65u8 acpi_ut_is_aml_table(struct acpi_table_header *table)
66{ 66{
67 67
68 /* Ignore tables that contain AML */ 68 /* These are the only tables that contain executable AML */
69 69
70 if (ACPI_COMPARE_NAME(table->signature, DSDT_SIG) || 70 if (ACPI_COMPARE_NAME(table->signature, DSDT_SIG) ||
71 ACPI_COMPARE_NAME(table->signature, PSDT_SIG) || 71 ACPI_COMPARE_NAME(table->signature, PSDT_SIG) ||
@@ -419,10 +419,15 @@ void acpi_ut_set_integer_width(u8 revision)
419{ 419{
420 420
421 if (revision <= 1) { 421 if (revision <= 1) {
422
423 /* 32-bit case */
424
422 acpi_gbl_integer_bit_width = 32; 425 acpi_gbl_integer_bit_width = 32;
423 acpi_gbl_integer_nybble_width = 8; 426 acpi_gbl_integer_nybble_width = 8;
424 acpi_gbl_integer_byte_width = 4; 427 acpi_gbl_integer_byte_width = 4;
425 } else { 428 } else {
429 /* 64-bit case (ACPI 2.0+) */
430
426 acpi_gbl_integer_bit_width = 64; 431 acpi_gbl_integer_bit_width = 64;
427 acpi_gbl_integer_nybble_width = 16; 432 acpi_gbl_integer_nybble_width = 16;
428 acpi_gbl_integer_byte_width = 8; 433 acpi_gbl_integer_byte_width = 8;
@@ -502,6 +507,7 @@ acpi_ut_display_init_pathname(u8 type,
502 * FUNCTION: acpi_ut_valid_acpi_char 507 * FUNCTION: acpi_ut_valid_acpi_char
503 * 508 *
504 * PARAMETERS: Char - The character to be examined 509 * PARAMETERS: Char - The character to be examined
510 * Position - Byte position (0-3)
505 * 511 *
506 * RETURN: TRUE if the character is valid, FALSE otherwise 512 * RETURN: TRUE if the character is valid, FALSE otherwise
507 * 513 *
@@ -609,7 +615,9 @@ acpi_name acpi_ut_repair_name(acpi_name name)
609 * 615 *
610 * RETURN: Status and Converted value 616 * RETURN: Status and Converted value
611 * 617 *
612 * DESCRIPTION: Convert a string into an unsigned value. 618 * DESCRIPTION: Convert a string into an unsigned value. Performs either a
619 * 32-bit or 64-bit conversion, depending on the current mode
620 * of the interpreter.
613 * NOTE: Does not support Octal strings, not needed. 621 * NOTE: Does not support Octal strings, not needed.
614 * 622 *
615 ******************************************************************************/ 623 ******************************************************************************/
@@ -627,7 +635,7 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
627 u8 sign_of0x = 0; 635 u8 sign_of0x = 0;
628 u8 term = 0; 636 u8 term = 0;
629 637
630 ACPI_FUNCTION_TRACE(ut_stroul64); 638 ACPI_FUNCTION_TRACE_STR(ut_stroul64, string);
631 639
632 switch (base) { 640 switch (base) {
633 case ACPI_ANY_BASE: 641 case ACPI_ANY_BASE:
@@ -675,11 +683,13 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
675 } 683 }
676 } 684 }
677 685
686 /*
687 * Perform a 32-bit or 64-bit conversion, depending upon the current
688 * execution mode of the interpreter
689 */
678 dividend = (mode32) ? ACPI_UINT32_MAX : ACPI_UINT64_MAX; 690 dividend = (mode32) ? ACPI_UINT32_MAX : ACPI_UINT64_MAX;
679 691
680 /* At least one character in the string here */ 692 /* Main loop: convert the string to a 32- or 64-bit integer */
681
682 /* Main loop: convert the string to a 64-bit integer */
683 693
684 while (*string) { 694 while (*string) {
685 if (ACPI_IS_DIGIT(*string)) { 695 if (ACPI_IS_DIGIT(*string)) {
@@ -754,6 +764,9 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
754 764
755 all_done: 765 all_done:
756 766
767 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Converted value: %8.8X%8.8X\n",
768 ACPI_FORMAT_UINT64(return_value)));
769
757 *ret_integer = return_value; 770 *ret_integer = return_value;
758 return_ACPI_STATUS(AE_OK); 771 return_ACPI_STATUS(AE_OK);
759 772
diff --git a/drivers/acpi/utilities/utstate.c b/drivers/acpi/utilities/utstate.c
index 0f5c5bb5deff..eaa13d05c859 100644
--- a/drivers/acpi/utilities/utstate.c
+++ b/drivers/acpi/utilities/utstate.c
@@ -199,6 +199,13 @@ struct acpi_thread_state *acpi_ut_create_thread_state(void)
199 state->common.descriptor_type = ACPI_DESC_TYPE_STATE_THREAD; 199 state->common.descriptor_type = ACPI_DESC_TYPE_STATE_THREAD;
200 state->thread.thread_id = acpi_os_get_thread_id(); 200 state->thread.thread_id = acpi_os_get_thread_id();
201 201
202 /* Check for invalid thread ID - zero is very bad, it will break things */
203
204 if (!state->thread.thread_id) {
205 ACPI_ERROR((AE_INFO, "Invalid zero ID from AcpiOsGetThreadId"));
206 state->thread.thread_id = (acpi_thread_id) 1;
207 }
208
202 return_PTR((struct acpi_thread_state *)state); 209 return_PTR((struct acpi_thread_state *)state);
203} 210}
204 211