aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpixf.h28
-rw-r--r--include/acpi/platform/aclinux.h12
-rw-r--r--include/acpi/platform/aclinuxex.h22
3 files changed, 51 insertions, 11 deletions
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 508e5649dda9..c3f38bc459e1 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -53,8 +53,6 @@
53#include <acpi/actbl.h> 53#include <acpi/actbl.h>
54#include <acpi/acbuffer.h> 54#include <acpi/acbuffer.h>
55 55
56extern u8 acpi_gbl_permanent_mmap;
57
58/***************************************************************************** 56/*****************************************************************************
59 * 57 *
60 * Macros used for ACPICA globals and configuration 58 * Macros used for ACPICA globals and configuration
@@ -889,17 +887,25 @@ ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
889/* 887/*
890 * Divergences 888 * Divergences
891 */ 889 */
892acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type); 890ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap);
891
892ACPI_EXTERNAL_RETURN_STATUS(acpi_status
893 acpi_get_id(acpi_handle object,
894 acpi_owner_id * out_type))
893 895
894acpi_status acpi_unload_table_id(acpi_owner_id id); 896ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_unload_table_id(acpi_owner_id id))
895 897
896acpi_status 898ACPI_EXTERNAL_RETURN_STATUS(acpi_status
897acpi_get_table_with_size(acpi_string signature, 899 acpi_get_table_with_size(acpi_string signature,
898 u32 instance, struct acpi_table_header **out_table, 900 u32 instance,
899 acpi_size *tbl_size); 901 struct acpi_table_header
902 **out_table,
903 acpi_size *tbl_size))
900 904
901acpi_status 905ACPI_EXTERNAL_RETURN_STATUS(acpi_status
902acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data, 906 acpi_get_data_full(acpi_handle object,
903 void (*callback)(void *)); 907 acpi_object_handler handler,
908 void **data,
909 void (*callback)(void *)))
904 910
905#endif /* __ACXFACE_H__ */ 911#endif /* __ACXFACE_H__ */
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index cd1f052d55bb..1ba7c190c2cc 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -44,6 +44,16 @@
44#ifndef __ACLINUX_H__ 44#ifndef __ACLINUX_H__
45#define __ACLINUX_H__ 45#define __ACLINUX_H__
46 46
47#ifdef __KERNEL__
48
49/* ACPICA external files should not include ACPICA headers directly. */
50
51#if !defined(BUILDING_ACPICA) && !defined(_LINUX_ACPI_H)
52#error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead."
53#endif
54
55#endif
56
47/* Common (in-kernel/user-space) ACPICA configuration */ 57/* Common (in-kernel/user-space) ACPICA configuration */
48 58
49#define ACPI_USE_SYSTEM_CLIBRARY 59#define ACPI_USE_SYSTEM_CLIBRARY
@@ -70,7 +80,9 @@
70#ifdef EXPORT_ACPI_INTERFACES 80#ifdef EXPORT_ACPI_INTERFACES
71#include <linux/export.h> 81#include <linux/export.h>
72#endif 82#endif
83#ifdef CONFIG_ACPI
73#include <asm/acenv.h> 84#include <asm/acenv.h>
85#endif
74 86
75#ifndef CONFIG_ACPI 87#ifndef CONFIG_ACPI
76 88
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 */