diff options
| -rw-r--r-- | drivers/acpi/acpica/utmath.c | 23 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 10 |
2 files changed, 20 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/utmath.c b/drivers/acpi/acpica/utmath.c index 35059a14eb72..49cf7b7fd816 100644 --- a/drivers/acpi/acpica/utmath.c +++ b/drivers/acpi/acpica/utmath.c | |||
| @@ -48,11 +48,27 @@ | |||
| 48 | ACPI_MODULE_NAME("utmath") | 48 | ACPI_MODULE_NAME("utmath") |
| 49 | 49 | ||
| 50 | /* | 50 | /* |
| 51 | * Support for double-precision integer divide. This code is included here | 51 | * Optional support for 64-bit double-precision integer divide. This code |
| 52 | * in order to support kernel environments where the double-precision math | 52 | * is configurable and is implemented in order to support 32-bit kernel |
| 53 | * library is not available. | 53 | * environments where a 64-bit double-precision math library is not available. |
| 54 | * | ||
| 55 | * Support for a more normal 64-bit divide/modulo (with check for a divide- | ||
| 56 | * by-zero) appears after this optional section of code. | ||
| 54 | */ | 57 | */ |
| 55 | #ifndef ACPI_USE_NATIVE_DIVIDE | 58 | #ifndef ACPI_USE_NATIVE_DIVIDE |
| 59 | /* Structures used only for 64-bit divide */ | ||
| 60 | typedef struct uint64_struct { | ||
| 61 | u32 lo; | ||
| 62 | u32 hi; | ||
| 63 | |||
| 64 | } uint64_struct; | ||
| 65 | |||
| 66 | typedef union uint64_overlay { | ||
| 67 | u64 full; | ||
| 68 | struct uint64_struct part; | ||
| 69 | |||
| 70 | } uint64_overlay; | ||
| 71 | |||
| 56 | /******************************************************************************* | 72 | /******************************************************************************* |
| 57 | * | 73 | * |
| 58 | * FUNCTION: acpi_ut_short_divide | 74 | * FUNCTION: acpi_ut_short_divide |
| @@ -69,6 +85,7 @@ ACPI_MODULE_NAME("utmath") | |||
| 69 | * 32-bit remainder. | 85 | * 32-bit remainder. |
| 70 | * | 86 | * |
| 71 | ******************************************************************************/ | 87 | ******************************************************************************/ |
| 88 | |||
| 72 | acpi_status | 89 | acpi_status |
| 73 | acpi_ut_short_divide(u64 dividend, | 90 | acpi_ut_short_divide(u64 dividend, |
| 74 | u32 divisor, u64 *out_quotient, u32 *out_remainder) | 91 | u32 divisor, u64 *out_quotient, u32 *out_remainder) |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 864cfae337f3..2b134b691e34 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -378,16 +378,6 @@ typedef void *acpi_handle; /* Actually a ptr to a NS Node */ | |||
| 378 | typedef u8 acpi_owner_id; | 378 | typedef u8 acpi_owner_id; |
| 379 | #define ACPI_OWNER_ID_MAX 0xFF | 379 | #define ACPI_OWNER_ID_MAX 0xFF |
| 380 | 380 | ||
| 381 | struct uint64_struct { | ||
| 382 | u32 lo; | ||
| 383 | u32 hi; | ||
| 384 | }; | ||
| 385 | |||
| 386 | union uint64_overlay { | ||
| 387 | u64 full; | ||
| 388 | struct uint64_struct part; | ||
| 389 | }; | ||
| 390 | |||
| 391 | #define ACPI_INTEGER_BIT_SIZE 64 | 381 | #define ACPI_INTEGER_BIT_SIZE 64 |
| 392 | #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ | 382 | #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ |
| 393 | 383 | ||
