aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-03 17:12:27 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-03 17:12:27 -0400
commit0e36d43c9c87554cdb18aa865eec9edccda17324 (patch)
treedc2c2cfacca0e9c53ca8148dc91676a30be3f010 /arch/ia64
parentb04c58b1ed26317bfb4b33d3a2d16377fc6acd0f (diff)
parent729ddb657f6a47a2cb6e495f1ff68fff622c758a (diff)
Merge branch 'acpica'
* acpica: (63 commits) ACPICA: Namespace: Remove _PRP method support. ACPI: Fix x86 regression related to early mapping size limitation ACPICA: Tables: Add mechanism to control early table checksum verification. ACPICA: acpidump: Fix repetitive table dump in -n mode. ACPI: Clean up acpi_os_map/unmap_memory() to eliminate __iomem. ACPICA: Clean up redudant definitions already defined elsewhere ACPICA: Linux headers: Add <asm/acenv.h> to remove mis-ordered inclusion of <asm/acpi.h> ACPICA: Linux headers: Add <acpi/platform/aclinuxex.h> ACPICA: Linux headers: Remove ACPI_PREEMPTION_POINT() due to no usages. ACPICA: Update version to 20140424. ACPICA: Comment/format update, no functional change. ACPICA: Events: Update GPE handling and initialization code. ACPICA: Remove extraneous error message for large number of GPEs. ACPICA: Tables: Remove old mechanism to validate if XSDT contains NULL entries. ACPICA: Tables: Add new mechanism to skip NULL entries in RSDT and XSDT. ACPICA: acpidump: Add support to force using RSDT. ACPICA: Back port of improvements on exception code. ACPICA: Back port of _PRP update. ACPICA: acpidump: Fix truncated RSDP signature validation. ACPICA: Linux header: Add support for stubbed externals. ...
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/include/asm/acenv.h56
-rw-r--r--arch/ia64/include/asm/acpi.h50
2 files changed, 56 insertions, 50 deletions
diff --git a/arch/ia64/include/asm/acenv.h b/arch/ia64/include/asm/acenv.h
new file mode 100644
index 000000000000..3f9eaeec9873
--- /dev/null
+++ b/arch/ia64/include/asm/acenv.h
@@ -0,0 +1,56 @@
1/*
2 * IA64 specific ACPICA environments and implementation
3 *
4 * Copyright (C) 2014, Intel Corporation
5 * Author: Lv Zheng <lv.zheng@intel.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef _ASM_IA64_ACENV_H
13#define _ASM_IA64_ACENV_H
14
15#include <asm/intrinsics.h>
16
17#define COMPILER_DEPENDENT_INT64 long
18#define COMPILER_DEPENDENT_UINT64 unsigned long
19
20/* Asm macros */
21
22#ifdef CONFIG_ACPI
23
24static inline int
25ia64_acpi_acquire_global_lock(unsigned int *lock)
26{
27 unsigned int old, new, val;
28 do {
29 old = *lock;
30 new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1));
31 val = ia64_cmpxchg4_acq(lock, new, old);
32 } while (unlikely (val != old));
33 return (new < 3) ? -1 : 0;
34}
35
36static inline int
37ia64_acpi_release_global_lock(unsigned int *lock)
38{
39 unsigned int old, new, val;
40 do {
41 old = *lock;
42 new = old & ~0x3;
43 val = ia64_cmpxchg4_acq(lock, new, old);
44 } while (unlikely (val != old));
45 return old & 0x1;
46}
47
48#define ACPI_ACQUIRE_GLOBAL_LOCK(facs, Acq) \
49 ((Acq) = ia64_acpi_acquire_global_lock(&facs->global_lock))
50
51#define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \
52 ((Acq) = ia64_acpi_release_global_lock(&facs->global_lock))
53
54#endif
55
56#endif /* _ASM_IA64_ACENV_H */
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h
index 2e73dffa16af..75dc59a793d6 100644
--- a/arch/ia64/include/asm/acpi.h
+++ b/arch/ia64/include/asm/acpi.h
@@ -34,56 +34,6 @@
34#include <linux/numa.h> 34#include <linux/numa.h>
35#include <asm/numa.h> 35#include <asm/numa.h>
36 36
37#define COMPILER_DEPENDENT_INT64 long
38#define COMPILER_DEPENDENT_UINT64 unsigned long
39
40/*
41 * Calling conventions:
42 *
43 * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads)
44 * ACPI_EXTERNAL_XFACE - External ACPI interfaces
45 * ACPI_INTERNAL_XFACE - Internal ACPI interfaces
46 * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces
47 */
48#define ACPI_SYSTEM_XFACE
49#define ACPI_EXTERNAL_XFACE
50#define ACPI_INTERNAL_XFACE
51#define ACPI_INTERNAL_VAR_XFACE
52
53/* Asm macros */
54
55#define ACPI_FLUSH_CPU_CACHE()
56
57static inline int
58ia64_acpi_acquire_global_lock (unsigned int *lock)
59{
60 unsigned int old, new, val;
61 do {
62 old = *lock;
63 new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1));
64 val = ia64_cmpxchg4_acq(lock, new, old);
65 } while (unlikely (val != old));
66 return (new < 3) ? -1 : 0;
67}
68
69static inline int
70ia64_acpi_release_global_lock (unsigned int *lock)
71{
72 unsigned int old, new, val;
73 do {
74 old = *lock;
75 new = old & ~0x3;
76 val = ia64_cmpxchg4_acq(lock, new, old);
77 } while (unlikely (val != old));
78 return old & 0x1;
79}
80
81#define ACPI_ACQUIRE_GLOBAL_LOCK(facs, Acq) \
82 ((Acq) = ia64_acpi_acquire_global_lock(&facs->global_lock))
83
84#define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \
85 ((Acq) = ia64_acpi_release_global_lock(&facs->global_lock))
86
87#ifdef CONFIG_ACPI 37#ifdef CONFIG_ACPI
88extern int acpi_lapic; 38extern int acpi_lapic;
89#define acpi_disabled 0 /* ACPI always enabled on IA64 */ 39#define acpi_disabled 0 /* ACPI always enabled on IA64 */