diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acconfig.h | 2 | ||||
-rw-r--r-- | include/acpi/acdispat.h | 2 | ||||
-rw-r--r-- | include/acpi/acglobal.h | 26 | ||||
-rw-r--r-- | include/acpi/acinterp.h | 5 | ||||
-rw-r--r-- | include/acpi/aclocal.h | 36 | ||||
-rw-r--r-- | include/acpi/acmacros.h | 2 | ||||
-rw-r--r-- | include/acpi/acobject.h | 8 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 40 | ||||
-rw-r--r-- | include/acpi/actypes.h | 49 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 2 |
10 files changed, 113 insertions, 59 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index b9beceb33141..b492857fe721 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 0x20060608 | 66 | #define ACPI_CA_VERSION 0x20060623 |
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/acdispat.h b/include/acpi/acdispat.h index 288f84903af7..a22fe9cf8493 100644 --- a/include/acpi/acdispat.h +++ b/include/acpi/acdispat.h | |||
@@ -201,7 +201,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
201 | acpi_status | 201 | acpi_status |
202 | acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, | 202 | acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, |
203 | union acpi_operand_object *obj_desc, | 203 | union acpi_operand_object *obj_desc, |
204 | struct acpi_namespace_node *calling_method_node); | 204 | struct acpi_walk_state *walk_state); |
205 | 205 | ||
206 | acpi_status | 206 | acpi_status |
207 | acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state); | 207 | acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state); |
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index 14531d48f6b6..06972e6637de 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h | |||
@@ -181,6 +181,12 @@ ACPI_EXTERN u8 acpi_gbl_integer_nybble_width; | |||
181 | extern struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1]; | 181 | extern struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1]; |
182 | extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1]; | 182 | extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1]; |
183 | 183 | ||
184 | /***************************************************************************** | ||
185 | * | ||
186 | * Mutual exlusion within ACPICA subsystem | ||
187 | * | ||
188 | ****************************************************************************/ | ||
189 | |||
184 | /* | 190 | /* |
185 | * Predefined mutex objects. This array contains the | 191 | * Predefined mutex objects. This array contains the |
186 | * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. | 192 | * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. |
@@ -188,6 +194,20 @@ extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1]; | |||
188 | */ | 194 | */ |
189 | ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX]; | 195 | ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX]; |
190 | 196 | ||
197 | /* | ||
198 | * Global lock semaphore works in conjunction with the actual HW global lock | ||
199 | */ | ||
200 | ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore; | ||
201 | |||
202 | /* | ||
203 | * Spinlocks are used for interfaces that can be possibly called at | ||
204 | * interrupt level | ||
205 | */ | ||
206 | ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock; /* For GPE data structs and registers */ | ||
207 | ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */ | ||
208 | #define acpi_gbl_gpe_lock &_acpi_gbl_gpe_lock | ||
209 | #define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock | ||
210 | |||
191 | /***************************************************************************** | 211 | /***************************************************************************** |
192 | * | 212 | * |
193 | * Miscellaneous globals | 213 | * Miscellaneous globals |
@@ -217,7 +237,6 @@ ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify; | |||
217 | ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; | 237 | ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; |
218 | ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; | 238 | ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; |
219 | ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; | 239 | ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; |
220 | ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore; | ||
221 | 240 | ||
222 | /* Misc */ | 241 | /* Misc */ |
223 | 242 | ||
@@ -315,11 +334,6 @@ ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; | |||
315 | ACPI_EXTERN struct acpi_gpe_block_info | 334 | ACPI_EXTERN struct acpi_gpe_block_info |
316 | *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; | 335 | *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; |
317 | 336 | ||
318 | /* Spinlocks */ | ||
319 | |||
320 | ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock; | ||
321 | ACPI_EXTERN acpi_handle acpi_gbl_hardware_lock; | ||
322 | |||
323 | /***************************************************************************** | 337 | /***************************************************************************** |
324 | * | 338 | * |
325 | * Debugger globals | 339 | * Debugger globals |
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index 9f22cfcb624b..216339a8f1f6 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h | |||
@@ -287,7 +287,10 @@ acpi_ex_system_wait_event(union acpi_operand_object *time, | |||
287 | 287 | ||
288 | acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc); | 288 | acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc); |
289 | 289 | ||
290 | acpi_status acpi_ex_system_wait_semaphore(acpi_handle semaphore, u16 timeout); | 290 | acpi_status |
291 | acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout); | ||
292 | |||
293 | acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout); | ||
291 | 294 | ||
292 | /* | 295 | /* |
293 | * exoparg1 - ACPI AML execution, 1 operand | 296 | * exoparg1 - ACPI AML execution, 1 operand |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 1eeca7adca95..56b802486161 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -47,10 +47,11 @@ | |||
47 | /* acpisrc:struct_defs -- for acpisrc conversion */ | 47 | /* acpisrc:struct_defs -- for acpisrc conversion */ |
48 | 48 | ||
49 | #define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */ | 49 | #define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */ |
50 | #define ACPI_INFINITE_CONCURRENCY 0xFF | 50 | #define ACPI_DO_NOT_WAIT 0 |
51 | #define ACPI_SERIALIZED 0xFF | ||
51 | 52 | ||
52 | typedef void *acpi_mutex; | ||
53 | typedef u32 acpi_mutex_handle; | 53 | typedef u32 acpi_mutex_handle; |
54 | #define ACPI_GLOBAL_LOCK (acpi_semaphore) (-1) | ||
54 | 55 | ||
55 | /* Total number of aml opcodes defined */ | 56 | /* Total number of aml opcodes defined */ |
56 | 57 | ||
@@ -79,16 +80,15 @@ union acpi_parse_object; | |||
79 | * table below also! | 80 | * table below also! |
80 | */ | 81 | */ |
81 | #define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */ | 82 | #define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */ |
82 | #define ACPI_MTX_CONTROL_METHOD 1 /* Control method termination [TBD: may no longer be necessary] */ | 83 | #define ACPI_MTX_TABLES 1 /* Data for ACPI tables */ |
83 | #define ACPI_MTX_TABLES 2 /* Data for ACPI tables */ | 84 | #define ACPI_MTX_NAMESPACE 2 /* ACPI Namespace */ |
84 | #define ACPI_MTX_NAMESPACE 3 /* ACPI Namespace */ | 85 | #define ACPI_MTX_EVENTS 3 /* Data for ACPI events */ |
85 | #define ACPI_MTX_EVENTS 4 /* Data for ACPI events */ | 86 | #define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */ |
86 | #define ACPI_MTX_CACHES 5 /* Internal caches, general purposes */ | 87 | #define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */ |
87 | #define ACPI_MTX_MEMORY 6 /* Debug memory tracking lists */ | 88 | #define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */ |
88 | #define ACPI_MTX_DEBUG_CMD_COMPLETE 7 /* AML debugger */ | 89 | #define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */ |
89 | #define ACPI_MTX_DEBUG_CMD_READY 8 /* AML debugger */ | 90 | |
90 | 91 | #define ACPI_MAX_MUTEX 7 | |
91 | #define ACPI_MAX_MUTEX 8 | ||
92 | #define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 | 92 | #define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 |
93 | 93 | ||
94 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | 94 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) |
@@ -98,14 +98,13 @@ union acpi_parse_object; | |||
98 | 98 | ||
99 | static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = { | 99 | static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = { |
100 | "ACPI_MTX_Interpreter", | 100 | "ACPI_MTX_Interpreter", |
101 | "ACPI_MTX_Method", | ||
102 | "ACPI_MTX_Tables", | 101 | "ACPI_MTX_Tables", |
103 | "ACPI_MTX_Namespace", | 102 | "ACPI_MTX_Namespace", |
104 | "ACPI_MTX_Events", | 103 | "ACPI_MTX_Events", |
105 | "ACPI_MTX_Caches", | 104 | "ACPI_MTX_Caches", |
106 | "ACPI_MTX_Memory", | 105 | "ACPI_MTX_Memory", |
107 | "ACPI_MTX_DebugCmdComplete", | 106 | "ACPI_MTX_CommandComplete", |
108 | "ACPI_MTX_DebugCmdReady" | 107 | "ACPI_MTX_CommandReady" |
109 | }; | 108 | }; |
110 | 109 | ||
111 | #endif | 110 | #endif |
@@ -705,6 +704,13 @@ struct acpi_bit_register_info { | |||
705 | }; | 704 | }; |
706 | 705 | ||
707 | /* | 706 | /* |
707 | * Some ACPI registers have bits that must be ignored -- meaning that they | ||
708 | * must be preserved. | ||
709 | */ | ||
710 | #define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */ | ||
711 | #define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0201 /* Bit 9, Bit 0 (SCI_EN) */ | ||
712 | |||
713 | /* | ||
708 | * Register IDs | 714 | * Register IDs |
709 | * These are the full ACPI registers | 715 | * These are the full ACPI registers |
710 | */ | 716 | */ |
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 38f9aa4bef00..4bb38068f40d 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -394,6 +394,8 @@ | |||
394 | #define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) | 394 | #define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) |
395 | #define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) | 395 | #define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) |
396 | 396 | ||
397 | #define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask)) | ||
398 | |||
397 | /* Generate a UUID */ | 399 | /* Generate a UUID */ |
398 | 400 | ||
399 | #define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ | 401 | #define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ |
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 1747d94084d8..8fdee31119f3 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h | |||
@@ -140,14 +140,14 @@ struct acpi_object_package { | |||
140 | *****************************************************************************/ | 140 | *****************************************************************************/ |
141 | 141 | ||
142 | struct acpi_object_event { | 142 | struct acpi_object_event { |
143 | ACPI_OBJECT_COMMON_HEADER void *semaphore; | 143 | ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore; /* Actual OS synchronization object */ |
144 | }; | 144 | }; |
145 | 145 | ||
146 | struct acpi_object_mutex { | 146 | struct acpi_object_mutex { |
147 | ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ | 147 | ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ |
148 | u16 acquisition_depth; /* Allow multiple Acquires, same thread */ | 148 | u16 acquisition_depth; /* Allow multiple Acquires, same thread */ |
149 | struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ | 149 | struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ |
150 | void *semaphore; /* Actual OS synchronization object */ | 150 | acpi_mutex os_mutex; /* Actual OS synchronization object */ |
151 | union acpi_operand_object *prev; /* Link for list of acquired mutexes */ | 151 | union acpi_operand_object *prev; /* Link for list of acquired mutexes */ |
152 | union acpi_operand_object *next; /* Link for list of acquired mutexes */ | 152 | union acpi_operand_object *next; /* Link for list of acquired mutexes */ |
153 | struct acpi_namespace_node *node; /* Containing namespace node */ | 153 | struct acpi_namespace_node *node; /* Containing namespace node */ |
@@ -166,8 +166,8 @@ struct acpi_object_region { | |||
166 | struct acpi_object_method { | 166 | struct acpi_object_method { |
167 | ACPI_OBJECT_COMMON_HEADER u8 method_flags; | 167 | ACPI_OBJECT_COMMON_HEADER u8 method_flags; |
168 | u8 param_count; | 168 | u8 param_count; |
169 | u8 concurrency; | 169 | u8 sync_level; |
170 | void *semaphore; | 170 | union acpi_operand_object *mutex; |
171 | u8 *aml_start; | 171 | u8 *aml_start; |
172 | ACPI_INTERNAL_METHOD implementation; | 172 | ACPI_INTERNAL_METHOD implementation; |
173 | u32 aml_length; | 173 | u32 aml_length; |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 8f473c83b7c4..89bc4a16c2e8 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -96,25 +96,47 @@ acpi_os_table_override(struct acpi_table_header *existing_table, | |||
96 | struct acpi_table_header **new_table); | 96 | struct acpi_table_header **new_table); |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * Synchronization primitives | 99 | * Spinlock primitives |
100 | */ | ||
101 | acpi_status acpi_os_create_lock(acpi_spinlock * out_handle); | ||
102 | |||
103 | void acpi_os_delete_lock(acpi_spinlock handle); | ||
104 | |||
105 | acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); | ||
106 | |||
107 | void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags); | ||
108 | |||
109 | /* | ||
110 | * Semaphore primitives | ||
100 | */ | 111 | */ |
101 | acpi_status | 112 | acpi_status |
102 | acpi_os_create_semaphore(u32 max_units, | 113 | acpi_os_create_semaphore(u32 max_units, |
103 | u32 initial_units, acpi_handle * out_handle); | 114 | u32 initial_units, acpi_semaphore * out_handle); |
104 | 115 | ||
105 | acpi_status acpi_os_delete_semaphore(acpi_handle handle); | 116 | acpi_status acpi_os_delete_semaphore(acpi_semaphore handle); |
106 | 117 | ||
107 | acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout); | 118 | acpi_status |
119 | acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout); | ||
120 | |||
121 | acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units); | ||
122 | |||
123 | /* | ||
124 | * Mutex primitives | ||
125 | */ | ||
126 | acpi_status acpi_os_create_mutex(acpi_mutex * out_handle); | ||
108 | 127 | ||
109 | acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units); | 128 | void acpi_os_delete_mutex(acpi_mutex handle); |
110 | 129 | ||
111 | acpi_status acpi_os_create_lock(acpi_handle * out_handle); | 130 | acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout); |
112 | 131 | ||
113 | void acpi_os_delete_lock(acpi_handle handle); | 132 | void acpi_os_release_mutex(acpi_mutex handle); |
114 | 133 | ||
115 | acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle); | 134 | /* Temporary macros for Mutex* interfaces, map to existing semaphore xfaces */ |
116 | 135 | ||
117 | void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags); | 136 | #define acpi_os_create_mutex(out_handle) acpi_os_create_semaphore (1, 1, out_handle) |
137 | #define acpi_os_delete_mutex(handle) (void) acpi_os_delete_semaphore (handle) | ||
138 | #define acpi_os_acquire_mutex(handle,time) acpi_os_wait_semaphore (handle, 1, time) | ||
139 | #define acpi_os_release_mutex(handle) (void) acpi_os_signal_semaphore (handle, 1) | ||
118 | 140 | ||
119 | /* | 141 | /* |
120 | * Memory allocation and mapping | 142 | * Memory allocation and mapping |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 77cf1236b05a..64b603cfe92e 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -241,7 +241,7 @@ typedef acpi_native_uint acpi_size; | |||
241 | 241 | ||
242 | /******************************************************************************* | 242 | /******************************************************************************* |
243 | * | 243 | * |
244 | * OS- or compiler-dependent types | 244 | * OS-dependent and compiler-dependent types |
245 | * | 245 | * |
246 | * If the defaults below are not appropriate for the host system, they can | 246 | * If the defaults below are not appropriate for the host system, they can |
247 | * be defined in the compiler-specific or OS-specific header, and this will | 247 | * be defined in the compiler-specific or OS-specific header, and this will |
@@ -249,29 +249,36 @@ typedef acpi_native_uint acpi_size; | |||
249 | * | 249 | * |
250 | ******************************************************************************/ | 250 | ******************************************************************************/ |
251 | 251 | ||
252 | /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ | 252 | /* Value returned by acpi_os_get_thread_id */ |
253 | 253 | ||
254 | #ifndef acpi_uintptr_t | 254 | #ifndef acpi_thread_id |
255 | #define acpi_uintptr_t void * | 255 | #define acpi_thread_id acpi_native_uint |
256 | #endif | 256 | #endif |
257 | 257 | ||
258 | /* | 258 | /* Object returned from acpi_os_create_lock */ |
259 | * If acpi_cache_t was not defined in the OS-dependent header, | 259 | |
260 | * define it now. This is typically the case where the local cache | 260 | #ifndef acpi_spinlock |
261 | * manager implementation is to be used (ACPI_USE_LOCAL_CACHE) | 261 | #define acpi_spinlock void * |
262 | */ | ||
263 | #ifndef acpi_cache_t | ||
264 | #define acpi_cache_t struct acpi_memory_list | ||
265 | #endif | 262 | #endif |
266 | 263 | ||
267 | /* | 264 | /* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ |
268 | * Allow the CPU flags word to be defined per-OS to simplify the use of the | 265 | |
269 | * lock and unlock OSL interfaces. | ||
270 | */ | ||
271 | #ifndef acpi_cpu_flags | 266 | #ifndef acpi_cpu_flags |
272 | #define acpi_cpu_flags acpi_native_uint | 267 | #define acpi_cpu_flags acpi_native_uint |
273 | #endif | 268 | #endif |
274 | 269 | ||
270 | /* Object returned from acpi_os_create_cache */ | ||
271 | |||
272 | #ifndef acpi_cache_t | ||
273 | #define acpi_cache_t struct acpi_memory_list | ||
274 | #endif | ||
275 | |||
276 | /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ | ||
277 | |||
278 | #ifndef acpi_uintptr_t | ||
279 | #define acpi_uintptr_t void * | ||
280 | #endif | ||
281 | |||
275 | /* | 282 | /* |
276 | * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because | 283 | * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because |
277 | * some compilers can catch printf format string problems | 284 | * some compilers can catch printf format string problems |
@@ -298,13 +305,6 @@ typedef acpi_native_uint acpi_size; | |||
298 | #define ACPI_EXPORT_SYMBOL(symbol) | 305 | #define ACPI_EXPORT_SYMBOL(symbol) |
299 | #endif | 306 | #endif |
300 | 307 | ||
301 | /* | ||
302 | * thread_id is returned by acpi_os_get_thread_id. | ||
303 | */ | ||
304 | #ifndef acpi_thread_id | ||
305 | #define acpi_thread_id acpi_native_uint | ||
306 | #endif | ||
307 | |||
308 | /******************************************************************************* | 308 | /******************************************************************************* |
309 | * | 309 | * |
310 | * Independent types | 310 | * Independent types |
@@ -380,6 +380,11 @@ struct uint32_struct { | |||
380 | u32 hi; | 380 | u32 hi; |
381 | }; | 381 | }; |
382 | 382 | ||
383 | /* Synchronization objects */ | ||
384 | |||
385 | #define acpi_mutex void * | ||
386 | #define acpi_semaphore void * | ||
387 | |||
383 | /* | 388 | /* |
384 | * Acpi integer width. In ACPI version 1, integers are | 389 | * Acpi integer width. In ACPI version 1, integers are |
385 | * 32 bits. In ACPI version 2, integers are 64 bits. | 390 | * 32 bits. In ACPI version 2, integers are 64 bits. |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 277d35bced03..3f853cabbd41 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -58,11 +58,13 @@ | |||
58 | #include <asm/div64.h> | 58 | #include <asm/div64.h> |
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 | 62 | ||
62 | /* Host-dependent types and defines */ | 63 | /* Host-dependent types and defines */ |
63 | 64 | ||
64 | #define ACPI_MACHINE_WIDTH BITS_PER_LONG | 65 | #define ACPI_MACHINE_WIDTH BITS_PER_LONG |
65 | #define acpi_cache_t kmem_cache_t | 66 | #define acpi_cache_t kmem_cache_t |
67 | #define acpi_spinlock spinlock_t * | ||
66 | #define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); | 68 | #define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); |
67 | #define strtoul simple_strtoul | 69 | #define strtoul simple_strtoul |
68 | 70 | ||