diff options
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acconfig.h | 2 | ||||
-rw-r--r-- | include/acpi/acinterp.h | 10 | ||||
-rw-r--r-- | include/acpi/aclocal.h | 4 | ||||
-rw-r--r-- | include/acpi/acmacros.h | 8 | ||||
-rw-r--r-- | include/acpi/acresrc.h | 8 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 27 |
6 files changed, 48 insertions, 11 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index b492857fe721..9e6c23c360b2 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -63,7 +63,7 @@ | |||
63 | 63 | ||
64 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 64 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
65 | 65 | ||
66 | #define ACPI_CA_VERSION 0x20060623 | 66 | #define ACPI_CA_VERSION 0x20060707 |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | 69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, |
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index 216339a8f1f6..91586d0d5bb5 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h | |||
@@ -53,10 +53,14 @@ | |||
53 | #define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_exdump_info)) | 53 | #define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_exdump_info)) |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * If possible, pack the following structure to byte alignment, since we | 56 | * If possible, pack the following structures to byte alignment, since we |
57 | * don't care about performance for debug output | 57 | * don't care about performance for debug output. Two cases where we cannot |
58 | * pack the structures: | ||
59 | * | ||
60 | * 1) Hardware does not support misaligned memory transfers | ||
61 | * 2) Compiler does not support pointers within packed structures | ||
58 | */ | 62 | */ |
59 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | 63 | #if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED)) |
60 | #pragma pack(1) | 64 | #pragma pack(1) |
61 | #endif | 65 | #endif |
62 | 66 | ||
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 56b802486161..a4d0e73d5aca 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -127,7 +127,7 @@ typedef u8 acpi_owner_id; | |||
127 | 127 | ||
128 | /* This Thread ID means that the mutex is not in use (unlocked) */ | 128 | /* This Thread ID means that the mutex is not in use (unlocked) */ |
129 | 129 | ||
130 | #define ACPI_MUTEX_NOT_ACQUIRED (u32) -1 | 130 | #define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_id) 0 |
131 | 131 | ||
132 | /* Table for the global mutexes */ | 132 | /* Table for the global mutexes */ |
133 | 133 | ||
@@ -204,7 +204,7 @@ struct acpi_namespace_node { | |||
204 | /* Namespace Node flags */ | 204 | /* Namespace Node flags */ |
205 | 205 | ||
206 | #define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */ | 206 | #define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */ |
207 | #define ANOBJ_DATA_WIDTH_32 0x02 /* Parent table uses 32-bit math */ | 207 | #define ANOBJ_RESERVED 0x02 /* Available for future use */ |
208 | #define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */ | 208 | #define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */ |
209 | #define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ | 209 | #define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ |
210 | #define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ | 210 | #define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ |
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index f1ac6109556e..192fa095a515 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -724,9 +724,15 @@ | |||
724 | 724 | ||
725 | /* Memory allocation */ | 725 | /* Memory allocation */ |
726 | 726 | ||
727 | #ifndef ACPI_ALLOCATE | ||
727 | #define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) | 728 | #define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) |
729 | #endif | ||
730 | #ifndef ACPI_ALLOCATE_ZEROED | ||
728 | #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) | 731 | #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) |
729 | #define ACPI_FREE(a) kfree(a) | 732 | #endif |
733 | #ifndef ACPI_FREE | ||
734 | #define ACPI_FREE(a) acpio_os_free(a) | ||
735 | #endif | ||
730 | #define ACPI_MEM_TRACKING(a) | 736 | #define ACPI_MEM_TRACKING(a) |
731 | 737 | ||
732 | #else | 738 | #else |
diff --git a/include/acpi/acresrc.h b/include/acpi/acresrc.h index ad11fc13fbef..80a3b33571b4 100644 --- a/include/acpi/acresrc.h +++ b/include/acpi/acresrc.h | |||
@@ -50,9 +50,13 @@ | |||
50 | 50 | ||
51 | /* | 51 | /* |
52 | * If possible, pack the following structures to byte alignment, since we | 52 | * If possible, pack the following structures to byte alignment, since we |
53 | * don't care about performance for debug output | 53 | * don't care about performance for debug output. Two cases where we cannot |
54 | * pack the structures: | ||
55 | * | ||
56 | * 1) Hardware does not support misaligned memory transfers | ||
57 | * 2) Compiler does not support pointers within packed structures | ||
54 | */ | 58 | */ |
55 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | 59 | #if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED)) |
56 | #pragma pack(1) | 60 | #pragma pack(1) |
57 | #endif | 61 | #endif |
58 | 62 | ||
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 3f853cabbd41..47faf27913a5 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <asm/acpi.h> | 59 | #include <asm/acpi.h> |
60 | #include <linux/slab.h> | 60 | #include <linux/slab.h> |
61 | #include <linux/spinlock_types.h> | 61 | #include <linux/spinlock_types.h> |
62 | #include <asm/current.h> | ||
62 | 63 | ||
63 | /* Host-dependent types and defines */ | 64 | /* Host-dependent types and defines */ |
64 | 65 | ||
@@ -100,8 +101,30 @@ | |||
100 | 101 | ||
101 | #define acpi_cpu_flags unsigned long | 102 | #define acpi_cpu_flags unsigned long |
102 | 103 | ||
103 | #define acpi_thread_id u32 | 104 | #define acpi_thread_id struct task_struct * |
104 | 105 | ||
105 | static inline acpi_thread_id acpi_os_get_thread_id(void) { return 0; } | 106 | static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; } |
107 | |||
108 | /* | ||
109 | * The irqs_disabled() check is for resume from RAM. | ||
110 | * Interrupts are off during resume, just like they are for boot. | ||
111 | * However, boot has (system_state != SYSTEM_RUNNING) | ||
112 | * to quiet __might_sleep() in kmalloc() and resume does not. | ||
113 | */ | ||
114 | #include <acpi/actypes.h> | ||
115 | static inline void *acpi_os_allocate(acpi_size size) { | ||
116 | return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); | ||
117 | } | ||
118 | static inline void *acpi_os_allocate_zeroed(acpi_size size) { | ||
119 | return kzalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); | ||
120 | } | ||
121 | |||
122 | static inline void *acpi_os_acquire_object(acpi_cache_t * cache) { | ||
123 | return kmem_cache_zalloc(cache, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); | ||
124 | } | ||
125 | |||
126 | #define ACPI_ALLOCATE(a) acpi_os_allocate(a) | ||
127 | #define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a) | ||
128 | #define ACPI_FREE(a) kfree(a) | ||
106 | 129 | ||
107 | #endif /* __ACLINUX_H__ */ | 130 | #endif /* __ACLINUX_H__ */ |