diff options
Diffstat (limited to 'drivers/acpi/utilities/utmisc.c')
-rw-r--r-- | drivers/acpi/utilities/utmisc.c | 25 |
1 files changed, 19 insertions, 6 deletions
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") | |||
65 | u8 acpi_ut_is_aml_table(struct acpi_table_header *table) | 65 | u8 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 | ||