diff options
author | Lv Zheng <lv.zheng@intel.com> | 2014-05-12 03:46:38 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-27 12:13:07 -0400 |
commit | 07d8391433380fc72f999d99c554b1cfedea9778 (patch) | |
tree | e497e4aff2a785ab234c60bc6d89db4da2d8a72f /arch/x86/include/asm/acpi.h | |
parent | d13bd5a602982cd7f697e39b13ac736c2c553af1 (diff) |
ACPICA: Linux headers: Add <asm/acenv.h> to remove mis-ordered inclusion of <asm/acpi.h>
There is a mis-order inclusion for <asm/acpi.h>.
As we will enforce including <linux/acpi.h> for all Linux ACPI users, we
can find the inclusion order is as follows:
<linux/acpi.h>
<acpi/acpi.h>
<acpi/platform/acenv.h>
(acenv.h before including aclinux.h)
<acpi/platform/aclinux.h>
...........................................................................
(aclinux.h before including asm/acpi.h)
<asm/acpi.h> @Redundant@
(ACPICA specific stuff)
...........................................................................
...........................................................................
(Linux ACPI specific stuff) ? - - - - - - - - - - - - +
(aclinux.h after including asm/acpi.h) @Invisible@ |
(acenv.h after including aclinux.h) @Invisible@ |
other ACPICA headers @Invisible@ |
............................................................|..............
<acpi/acpi_bus.h> |
<acpi/acpi_drivers.h> |
<asm/acpi.h> (Excluded) |
(Linux ACPI specific stuff) ! <- - - - - - - - - - - - - +
NOTE that, in ACPICA, <acpi/platform/acenv.h> is more like Kconfig
generated <generated/autoconf.h> for Linux, it is meant to be included
before including any ACPICA code.
In the above figure, there is a question mark for "Linux ACPI specific
stuff" in <asm/acpi.h> which should be included after including all other
ACPICA header files. Thus they really need to be moved to the position
marked with exclaimation mark or the definitions in the blocks marked with
"@Invisible@" will be invisible to such architecture specific "Linux ACPI
specific stuff" header blocks. This leaves 2 issues:
1. All environmental definitions in these blocks should have a copy in the
area marked with "@Redundant@" if they are required by the "Linux ACPI
specific stuff".
2. We cannot use any ACPICA defined types in <asm/acpi.h>.
This patch splits architecture specific ACPICA stuff from <asm/acpi.h> to
fix this issue.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/x86/include/asm/acpi.h')
-rw-r--r-- | arch/x86/include/asm/acpi.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index c8c1e700c26e..e06225eda635 100644 --- a/arch/x86/include/asm/acpi.h +++ b/arch/x86/include/asm/acpi.h | |||
@@ -32,51 +32,6 @@ | |||
32 | #include <asm/mpspec.h> | 32 | #include <asm/mpspec.h> |
33 | #include <asm/realmode.h> | 33 | #include <asm/realmode.h> |
34 | 34 | ||
35 | #define COMPILER_DEPENDENT_INT64 long long | ||
36 | #define COMPILER_DEPENDENT_UINT64 unsigned long long | ||
37 | |||
38 | /* | ||
39 | * Calling conventions: | ||
40 | * | ||
41 | * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) | ||
42 | * ACPI_EXTERNAL_XFACE - External ACPI interfaces | ||
43 | * ACPI_INTERNAL_XFACE - Internal ACPI interfaces | ||
44 | * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces | ||
45 | */ | ||
46 | #define ACPI_SYSTEM_XFACE | ||
47 | #define ACPI_EXTERNAL_XFACE | ||
48 | #define ACPI_INTERNAL_XFACE | ||
49 | #define ACPI_INTERNAL_VAR_XFACE | ||
50 | |||
51 | /* Asm macros */ | ||
52 | |||
53 | #define ACPI_FLUSH_CPU_CACHE() wbinvd() | ||
54 | |||
55 | int __acpi_acquire_global_lock(unsigned int *lock); | ||
56 | int __acpi_release_global_lock(unsigned int *lock); | ||
57 | |||
58 | #define ACPI_ACQUIRE_GLOBAL_LOCK(facs, Acq) \ | ||
59 | ((Acq) = __acpi_acquire_global_lock(&facs->global_lock)) | ||
60 | |||
61 | #define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \ | ||
62 | ((Acq) = __acpi_release_global_lock(&facs->global_lock)) | ||
63 | |||
64 | /* | ||
65 | * Math helper asm macros | ||
66 | */ | ||
67 | #define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ | ||
68 | asm("divl %2;" \ | ||
69 | : "=a"(q32), "=d"(r32) \ | ||
70 | : "r"(d32), \ | ||
71 | "0"(n_lo), "1"(n_hi)) | ||
72 | |||
73 | |||
74 | #define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ | ||
75 | asm("shrl $1,%2 ;" \ | ||
76 | "rcrl $1,%3;" \ | ||
77 | : "=r"(n_hi), "=r"(n_lo) \ | ||
78 | : "0"(n_hi), "1"(n_lo)) | ||
79 | |||
80 | #ifdef CONFIG_ACPI | 35 | #ifdef CONFIG_ACPI |
81 | extern int acpi_lapic; | 36 | extern int acpi_lapic; |
82 | extern int acpi_ioapic; | 37 | extern int acpi_ioapic; |