aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/acpi/platform/aclinuxex.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h
index 191e741cfa0e..568d4b886712 100644
--- a/include/acpi/platform/aclinuxex.h
+++ b/include/acpi/platform/aclinuxex.h
@@ -46,6 +46,28 @@
46 46
47#ifdef __KERNEL__ 47#ifdef __KERNEL__
48 48
49#ifndef ACPI_USE_NATIVE_DIVIDE
50
51#ifndef ACPI_DIV_64_BY_32
52#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
53 do { \
54 u64 (__n) = ((u64) n_hi) << 32 | (n_lo); \
55 (r32) = do_div ((__n), (d32)); \
56 (q32) = (u32) (__n); \
57 } while (0)
58#endif
59
60#ifndef ACPI_SHIFT_RIGHT_64
61#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
62 do { \
63 (n_lo) >>= 1; \
64 (n_lo) |= (((n_hi) & 1) << 31); \
65 (n_hi) >>= 1; \
66 } while (0)
67#endif
68
69#endif
70
49/* 71/*
50 * Overrides for in-kernel ACPICA 72 * Overrides for in-kernel ACPICA
51 */ 73 */