From 5d088422407dc67a7c386938a837a70919907c09 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Wed, 15 Sep 2010 14:00:53 +0800 Subject: [PATCH] --- yaml --- r: 217641 b: refs/heads/master c: e786db75406b30fa74dea095c571c8c164a2f3dd h: refs/heads/master i: 217639: e31bb588b48eba4590969fa01a1cb345f01d38cb v: v3 --- [refs] | 2 +- trunk/drivers/acpi/acpica/utmath.c | 23 ++++++++++++++++++++--- trunk/include/acpi/actypes.h | 10 ---------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index a459a3f2ada6..1039dc51f7dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 28eb3fcf8762a3b52f4fef5af29dce50d23c7151 +refs/heads/master: e786db75406b30fa74dea095c571c8c164a2f3dd diff --git a/trunk/drivers/acpi/acpica/utmath.c b/trunk/drivers/acpi/acpica/utmath.c index 35059a14eb72..49cf7b7fd816 100644 --- a/trunk/drivers/acpi/acpica/utmath.c +++ b/trunk/drivers/acpi/acpica/utmath.c @@ -48,11 +48,27 @@ ACPI_MODULE_NAME("utmath") /* - * Support for double-precision integer divide. This code is included here - * in order to support kernel environments where the double-precision math - * library is not available. + * Optional support for 64-bit double-precision integer divide. This code + * is configurable and is implemented in order to support 32-bit kernel + * environments where a 64-bit double-precision math library is not available. + * + * Support for a more normal 64-bit divide/modulo (with check for a divide- + * by-zero) appears after this optional section of code. */ #ifndef ACPI_USE_NATIVE_DIVIDE +/* Structures used only for 64-bit divide */ +typedef struct uint64_struct { + u32 lo; + u32 hi; + +} uint64_struct; + +typedef union uint64_overlay { + u64 full; + struct uint64_struct part; + +} uint64_overlay; + /******************************************************************************* * * FUNCTION: acpi_ut_short_divide @@ -69,6 +85,7 @@ ACPI_MODULE_NAME("utmath") * 32-bit remainder. * ******************************************************************************/ + acpi_status acpi_ut_short_divide(u64 dividend, u32 divisor, u64 *out_quotient, u32 *out_remainder) diff --git a/trunk/include/acpi/actypes.h b/trunk/include/acpi/actypes.h index 864cfae337f3..2b134b691e34 100644 --- a/trunk/include/acpi/actypes.h +++ b/trunk/include/acpi/actypes.h @@ -378,16 +378,6 @@ typedef void *acpi_handle; /* Actually a ptr to a NS Node */ typedef u8 acpi_owner_id; #define ACPI_OWNER_ID_MAX 0xFF -struct uint64_struct { - u32 lo; - u32 hi; -}; - -union uint64_overlay { - u64 full; - struct uint64_struct part; -}; - #define ACPI_INTEGER_BIT_SIZE 64 #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */