diff options
Diffstat (limited to 'source/include/platform/aclinuxex.h')
-rw-r--r-- | source/include/platform/aclinuxex.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/include/platform/aclinuxex.h b/source/include/platform/aclinuxex.h index e3d5d5bb7..d4111a135 100644 --- a/source/include/platform/aclinuxex.h +++ b/source/include/platform/aclinuxex.h @@ -118,6 +118,28 @@ #ifdef __KERNEL__ +#ifndef ACPI_USE_NATIVE_DIVIDE + +#ifndef ACPI_DIV_64_BY_32 +#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ + do { \ + UINT64 (__n) = ((UINT64) n_hi) << 32 | (n_lo); \ + (r32) = do_div ((__n), (d32)); \ + (q32) = (UINT32) (__n); \ + } while (0) +#endif + +#ifndef ACPI_SHIFT_RIGHT_64 +#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ + do { \ + (n_lo) >>= 1; \ + (n_lo) |= (((n_hi) & 1) << 31); \ + (n_hi) >>= 1; \ + } while (0) +#endif + +#endif + /* * Overrides for in-kernel ACPICA */ |