diff options
author | Bob Moore <robert.moore@intel.com> | 2010-09-15 02:00:53 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-10-01 01:47:55 -0400 |
commit | e786db75406b30fa74dea095c571c8c164a2f3dd (patch) | |
tree | bb66c29a0981e781f6e16bde89b33091887cf05c /drivers/acpi/acpica/utmath.c | |
parent | 28eb3fcf8762a3b52f4fef5af29dce50d23c7151 (diff) |
ACPICA: Update math module; no functional change
Move the 64-bit overlay structures to the utmath module since
they are used nowhere else. Update module comment. ACPICA BZ 829.
http://www.acpica.org/bugzilla/show_bug.cgi?id=829
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utmath.c')
-rw-r--r-- | drivers/acpi/acpica/utmath.c | 23 |
1 files changed, 20 insertions, 3 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) |