diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-07 13:21:11 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-07 13:21:11 -0500 |
commit | 0faf996f4dd02a361158a705afcc31284d732276 (patch) | |
tree | 9d0907fced6600cdd0d9cef78f532838220157f7 /include | |
parent | ee360d688c8e37f81c92039f76bebaddbe36befe (diff) | |
parent | 45c9f78b25ad9ce6cdf259ac4b652e6783adcb23 (diff) |
Merge branch 'acpica'
* acpica: (35 commits)
ACPICA: Add __init for ACPICA initializers/finalizers.
ACPICA: Cleanup asmlinkage for ACPICA APIs.
ACPICA: Update acpidump related header file changes.
ACPICA: Update compilation environment settings.
ACPICA: Fix cached object deletion code.
ACPICA: Remove dead AOPOBJ_INVALID check.
ACPICA: Cleanup useless memset invocations.
ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.
ACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size().
ACPICA: Add new statistics interface.
ACPICA: Update DMAR table definitions.
ACPICA: Update RSDP table definitions.
ACPICA: Update namespace dump code.
ACPICA: Update check for setting the ANOBJ_IS_EXTERNAL flag.
ACPICA: Update default space handlers.
ACPICA: Update version to 20130927.
ACPICA: Update aclinux.h for new OSL override mechanism.
ACPICA: Add support to allow host OS to redefine individual OSL prototypes.
ACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro.
ACPICA: Fix indentation issues for macro invocations.
...
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acconfig.h | 2 | ||||
-rw-r--r-- | include/acpi/acnames.h | 26 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 155 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 82 | ||||
-rw-r--r-- | include/acpi/actbl.h | 19 | ||||
-rw-r--r-- | include/acpi/actbl2.h | 4 | ||||
-rw-r--r-- | include/acpi/actypes.h | 69 | ||||
-rw-r--r-- | include/acpi/platform/acenv.h | 8 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 132 |
9 files changed, 391 insertions, 106 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 1c16f821434f..d98c67001840 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -100,7 +100,9 @@ | |||
100 | * ACPI PM timer | 100 | * ACPI PM timer |
101 | * FACS table (Waking vectors and Global Lock) | 101 | * FACS table (Waking vectors and Global Lock) |
102 | */ | 102 | */ |
103 | #ifndef ACPI_REDUCED_HARDWARE | ||
103 | #define ACPI_REDUCED_HARDWARE FALSE | 104 | #define ACPI_REDUCED_HARDWARE FALSE |
105 | #endif | ||
104 | 106 | ||
105 | /****************************************************************************** | 107 | /****************************************************************************** |
106 | * | 108 | * |
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index ce08ef7d969c..1f36777e26fe 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
@@ -46,25 +46,25 @@ | |||
46 | 46 | ||
47 | /* Method names - these methods can appear anywhere in the namespace */ | 47 | /* Method names - these methods can appear anywhere in the namespace */ |
48 | 48 | ||
49 | #define METHOD_NAME__SB_ "_SB_" | ||
50 | #define METHOD_NAME__HID "_HID" | ||
51 | #define METHOD_NAME__CID "_CID" | ||
52 | #define METHOD_NAME__UID "_UID" | ||
53 | #define METHOD_NAME__SUB "_SUB" | ||
54 | #define METHOD_NAME__ADR "_ADR" | 49 | #define METHOD_NAME__ADR "_ADR" |
55 | #define METHOD_NAME__INI "_INI" | 50 | #define METHOD_NAME__AEI "_AEI" |
56 | #define METHOD_NAME__STA "_STA" | ||
57 | #define METHOD_NAME__REG "_REG" | ||
58 | #define METHOD_NAME__SEG "_SEG" | ||
59 | #define METHOD_NAME__BBN "_BBN" | 51 | #define METHOD_NAME__BBN "_BBN" |
60 | #define METHOD_NAME__PRT "_PRT" | 52 | #define METHOD_NAME__CBA "_CBA" |
53 | #define METHOD_NAME__CID "_CID" | ||
61 | #define METHOD_NAME__CRS "_CRS" | 54 | #define METHOD_NAME__CRS "_CRS" |
55 | #define METHOD_NAME__HID "_HID" | ||
56 | #define METHOD_NAME__INI "_INI" | ||
57 | #define METHOD_NAME__PLD "_PLD" | ||
62 | #define METHOD_NAME__PRS "_PRS" | 58 | #define METHOD_NAME__PRS "_PRS" |
63 | #define METHOD_NAME__AEI "_AEI" | 59 | #define METHOD_NAME__PRT "_PRT" |
64 | #define METHOD_NAME__PRW "_PRW" | 60 | #define METHOD_NAME__PRW "_PRW" |
61 | #define METHOD_NAME__REG "_REG" | ||
62 | #define METHOD_NAME__SB_ "_SB_" | ||
63 | #define METHOD_NAME__SEG "_SEG" | ||
65 | #define METHOD_NAME__SRS "_SRS" | 64 | #define METHOD_NAME__SRS "_SRS" |
66 | #define METHOD_NAME__CBA "_CBA" | 65 | #define METHOD_NAME__STA "_STA" |
67 | #define METHOD_NAME__PLD "_PLD" | 66 | #define METHOD_NAME__SUB "_SUB" |
67 | #define METHOD_NAME__UID "_UID" | ||
68 | 68 | ||
69 | /* Method names - these methods must appear at the namespace root */ | 69 | /* Method names - these methods must appear at the namespace root */ |
70 | 70 | ||
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 64b8c7639520..01e6c6d8b7e1 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -77,54 +77,80 @@ struct acpi_signal_fatal_info { | |||
77 | /* | 77 | /* |
78 | * OSL Initialization and shutdown primitives | 78 | * OSL Initialization and shutdown primitives |
79 | */ | 79 | */ |
80 | acpi_status __init acpi_os_initialize(void); | 80 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_initialize |
81 | acpi_status acpi_os_initialize(void); | ||
82 | #endif | ||
81 | 83 | ||
84 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_terminate | ||
82 | acpi_status acpi_os_terminate(void); | 85 | acpi_status acpi_os_terminate(void); |
86 | #endif | ||
83 | 87 | ||
84 | /* | 88 | /* |
85 | * ACPI Table interfaces | 89 | * ACPI Table interfaces |
86 | */ | 90 | */ |
91 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_root_pointer | ||
87 | acpi_physical_address acpi_os_get_root_pointer(void); | 92 | acpi_physical_address acpi_os_get_root_pointer(void); |
93 | #endif | ||
88 | 94 | ||
95 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_predefined_override | ||
89 | acpi_status | 96 | acpi_status |
90 | acpi_os_predefined_override(const struct acpi_predefined_names *init_val, | 97 | acpi_os_predefined_override(const struct acpi_predefined_names *init_val, |
91 | acpi_string * new_val); | 98 | acpi_string * new_val); |
99 | #endif | ||
92 | 100 | ||
101 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_table_override | ||
93 | acpi_status | 102 | acpi_status |
94 | acpi_os_table_override(struct acpi_table_header *existing_table, | 103 | acpi_os_table_override(struct acpi_table_header *existing_table, |
95 | struct acpi_table_header **new_table); | 104 | struct acpi_table_header **new_table); |
105 | #endif | ||
96 | 106 | ||
107 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_physical_table_override | ||
97 | acpi_status | 108 | acpi_status |
98 | acpi_os_physical_table_override(struct acpi_table_header *existing_table, | 109 | acpi_os_physical_table_override(struct acpi_table_header *existing_table, |
99 | acpi_physical_address * new_address, | 110 | acpi_physical_address * new_address, |
100 | u32 *new_table_length); | 111 | u32 *new_table_length); |
112 | #endif | ||
101 | 113 | ||
102 | /* | 114 | /* |
103 | * Spinlock primitives | 115 | * Spinlock primitives |
104 | */ | 116 | */ |
105 | #ifndef acpi_os_create_lock | 117 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock |
106 | acpi_status acpi_os_create_lock(acpi_spinlock * out_handle); | 118 | acpi_status acpi_os_create_lock(acpi_spinlock * out_handle); |
107 | #endif | 119 | #endif |
108 | 120 | ||
121 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_lock | ||
109 | void acpi_os_delete_lock(acpi_spinlock handle); | 122 | void acpi_os_delete_lock(acpi_spinlock handle); |
123 | #endif | ||
110 | 124 | ||
125 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_lock | ||
111 | acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); | 126 | acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); |
127 | #endif | ||
112 | 128 | ||
129 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_lock | ||
113 | void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags); | 130 | void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags); |
131 | #endif | ||
114 | 132 | ||
115 | /* | 133 | /* |
116 | * Semaphore primitives | 134 | * Semaphore primitives |
117 | */ | 135 | */ |
136 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_semaphore | ||
118 | acpi_status | 137 | acpi_status |
119 | acpi_os_create_semaphore(u32 max_units, | 138 | acpi_os_create_semaphore(u32 max_units, |
120 | u32 initial_units, acpi_semaphore * out_handle); | 139 | u32 initial_units, acpi_semaphore * out_handle); |
140 | #endif | ||
121 | 141 | ||
142 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_semaphore | ||
122 | acpi_status acpi_os_delete_semaphore(acpi_semaphore handle); | 143 | acpi_status acpi_os_delete_semaphore(acpi_semaphore handle); |
144 | #endif | ||
123 | 145 | ||
146 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_wait_semaphore | ||
124 | acpi_status | 147 | acpi_status |
125 | acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout); | 148 | acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout); |
149 | #endif | ||
126 | 150 | ||
151 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_signal_semaphore | ||
127 | acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units); | 152 | acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units); |
153 | #endif | ||
128 | 154 | ||
129 | /* | 155 | /* |
130 | * Mutex primitives. May be configured to use semaphores instead via | 156 | * Mutex primitives. May be configured to use semaphores instead via |
@@ -132,29 +158,48 @@ acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units); | |||
132 | */ | 158 | */ |
133 | #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE) | 159 | #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE) |
134 | 160 | ||
161 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_mutex | ||
135 | acpi_status acpi_os_create_mutex(acpi_mutex * out_handle); | 162 | acpi_status acpi_os_create_mutex(acpi_mutex * out_handle); |
163 | #endif | ||
136 | 164 | ||
165 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_mutex | ||
137 | void acpi_os_delete_mutex(acpi_mutex handle); | 166 | void acpi_os_delete_mutex(acpi_mutex handle); |
167 | #endif | ||
138 | 168 | ||
169 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_mutex | ||
139 | acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout); | 170 | acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout); |
171 | #endif | ||
140 | 172 | ||
173 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_mutex | ||
141 | void acpi_os_release_mutex(acpi_mutex handle); | 174 | void acpi_os_release_mutex(acpi_mutex handle); |
142 | #endif | 175 | #endif |
143 | 176 | ||
177 | #endif | ||
178 | |||
144 | /* | 179 | /* |
145 | * Memory allocation and mapping | 180 | * Memory allocation and mapping |
146 | */ | 181 | */ |
182 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate | ||
147 | void *acpi_os_allocate(acpi_size size); | 183 | void *acpi_os_allocate(acpi_size size); |
184 | #endif | ||
148 | 185 | ||
186 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate_zeroed | ||
187 | void *acpi_os_allocate_zeroed(acpi_size size); | ||
188 | #endif | ||
189 | |||
190 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_free | ||
149 | void acpi_os_free(void *memory); | 191 | void acpi_os_free(void *memory); |
192 | #endif | ||
150 | 193 | ||
151 | void __iomem *acpi_os_map_memory(acpi_physical_address where, | 194 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_map_memory |
152 | acpi_size length); | 195 | void *acpi_os_map_memory(acpi_physical_address where, acpi_size length); |
196 | #endif | ||
153 | 197 | ||
154 | void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size); | 198 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_unmap_memory |
155 | void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size); | 199 | void acpi_os_unmap_memory(void *logical_address, acpi_size size); |
200 | #endif | ||
156 | 201 | ||
157 | #ifdef ACPI_FUTURE_USAGE | 202 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_physical_address |
158 | acpi_status | 203 | acpi_status |
159 | acpi_os_get_physical_address(void *logical_address, | 204 | acpi_os_get_physical_address(void *logical_address, |
160 | acpi_physical_address * physical_address); | 205 | acpi_physical_address * physical_address); |
@@ -163,117 +208,195 @@ acpi_os_get_physical_address(void *logical_address, | |||
163 | /* | 208 | /* |
164 | * Memory/Object Cache | 209 | * Memory/Object Cache |
165 | */ | 210 | */ |
211 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_cache | ||
166 | acpi_status | 212 | acpi_status |
167 | acpi_os_create_cache(char *cache_name, | 213 | acpi_os_create_cache(char *cache_name, |
168 | u16 object_size, | 214 | u16 object_size, |
169 | u16 max_depth, acpi_cache_t ** return_cache); | 215 | u16 max_depth, acpi_cache_t ** return_cache); |
216 | #endif | ||
170 | 217 | ||
218 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_cache | ||
171 | acpi_status acpi_os_delete_cache(acpi_cache_t * cache); | 219 | acpi_status acpi_os_delete_cache(acpi_cache_t * cache); |
220 | #endif | ||
172 | 221 | ||
222 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_purge_cache | ||
173 | acpi_status acpi_os_purge_cache(acpi_cache_t * cache); | 223 | acpi_status acpi_os_purge_cache(acpi_cache_t * cache); |
224 | #endif | ||
174 | 225 | ||
226 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_object | ||
175 | void *acpi_os_acquire_object(acpi_cache_t * cache); | 227 | void *acpi_os_acquire_object(acpi_cache_t * cache); |
228 | #endif | ||
176 | 229 | ||
230 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_object | ||
177 | acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object); | 231 | acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object); |
232 | #endif | ||
178 | 233 | ||
179 | /* | 234 | /* |
180 | * Interrupt handlers | 235 | * Interrupt handlers |
181 | */ | 236 | */ |
237 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_install_interrupt_handler | ||
182 | acpi_status | 238 | acpi_status |
183 | acpi_os_install_interrupt_handler(u32 interrupt_number, | 239 | acpi_os_install_interrupt_handler(u32 interrupt_number, |
184 | acpi_osd_handler service_routine, | 240 | acpi_osd_handler service_routine, |
185 | void *context); | 241 | void *context); |
242 | #endif | ||
186 | 243 | ||
244 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_remove_interrupt_handler | ||
187 | acpi_status | 245 | acpi_status |
188 | acpi_os_remove_interrupt_handler(u32 interrupt_number, | 246 | acpi_os_remove_interrupt_handler(u32 interrupt_number, |
189 | acpi_osd_handler service_routine); | 247 | acpi_osd_handler service_routine); |
190 | 248 | #endif | |
191 | void acpi_os_gpe_count(u32 gpe_number); | ||
192 | void acpi_os_fixed_event_count(u32 fixed_event_number); | ||
193 | 249 | ||
194 | /* | 250 | /* |
195 | * Threads and Scheduling | 251 | * Threads and Scheduling |
196 | */ | 252 | */ |
253 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_thread_id | ||
197 | acpi_thread_id acpi_os_get_thread_id(void); | 254 | acpi_thread_id acpi_os_get_thread_id(void); |
255 | #endif | ||
198 | 256 | ||
257 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_execute | ||
199 | acpi_status | 258 | acpi_status |
200 | acpi_os_execute(acpi_execute_type type, | 259 | acpi_os_execute(acpi_execute_type type, |
201 | acpi_osd_exec_callback function, void *context); | 260 | acpi_osd_exec_callback function, void *context); |
261 | #endif | ||
202 | 262 | ||
203 | acpi_status | 263 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_wait_events_complete |
204 | acpi_os_hotplug_execute(acpi_osd_exec_callback function, void *context); | ||
205 | |||
206 | void acpi_os_wait_events_complete(void); | 264 | void acpi_os_wait_events_complete(void); |
265 | #endif | ||
207 | 266 | ||
267 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_sleep | ||
208 | void acpi_os_sleep(u64 milliseconds); | 268 | void acpi_os_sleep(u64 milliseconds); |
269 | #endif | ||
209 | 270 | ||
271 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_stall | ||
210 | void acpi_os_stall(u32 microseconds); | 272 | void acpi_os_stall(u32 microseconds); |
273 | #endif | ||
211 | 274 | ||
212 | /* | 275 | /* |
213 | * Platform and hardware-independent I/O interfaces | 276 | * Platform and hardware-independent I/O interfaces |
214 | */ | 277 | */ |
215 | acpi_status acpi_os_read_port(acpi_io_address address, u32 * value, u32 width); | 278 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_port |
279 | acpi_status acpi_os_read_port(acpi_io_address address, u32 *value, u32 width); | ||
280 | #endif | ||
216 | 281 | ||
282 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_port | ||
217 | acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width); | 283 | acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width); |
284 | #endif | ||
218 | 285 | ||
219 | /* | 286 | /* |
220 | * Platform and hardware-independent physical memory interfaces | 287 | * Platform and hardware-independent physical memory interfaces |
221 | */ | 288 | */ |
289 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_memory | ||
222 | acpi_status | 290 | acpi_status |
223 | acpi_os_read_memory(acpi_physical_address address, u64 *value, u32 width); | 291 | acpi_os_read_memory(acpi_physical_address address, u64 *value, u32 width); |
292 | #endif | ||
224 | 293 | ||
294 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_memory | ||
225 | acpi_status | 295 | acpi_status |
226 | acpi_os_write_memory(acpi_physical_address address, u64 value, u32 width); | 296 | acpi_os_write_memory(acpi_physical_address address, u64 value, u32 width); |
297 | #endif | ||
227 | 298 | ||
228 | /* | 299 | /* |
229 | * Platform and hardware-independent PCI configuration space access | 300 | * Platform and hardware-independent PCI configuration space access |
230 | * Note: Can't use "Register" as a parameter, changed to "Reg" -- | 301 | * Note: Can't use "Register" as a parameter, changed to "Reg" -- |
231 | * certain compilers complain. | 302 | * certain compilers complain. |
232 | */ | 303 | */ |
304 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_pci_configuration | ||
233 | acpi_status | 305 | acpi_status |
234 | acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, | 306 | acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, |
235 | u32 reg, u64 *value, u32 width); | 307 | u32 reg, u64 *value, u32 width); |
308 | #endif | ||
236 | 309 | ||
310 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_pci_configuration | ||
237 | acpi_status | 311 | acpi_status |
238 | acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, | 312 | acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, |
239 | u32 reg, u64 value, u32 width); | 313 | u32 reg, u64 value, u32 width); |
314 | #endif | ||
240 | 315 | ||
241 | /* | 316 | /* |
242 | * Miscellaneous | 317 | * Miscellaneous |
243 | */ | 318 | */ |
319 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_readable | ||
320 | u8 acpi_os_readable(void *pointer, acpi_size length); | ||
321 | #endif | ||
322 | |||
323 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_writable | ||
324 | u8 acpi_os_writable(void *pointer, acpi_size length); | ||
325 | #endif | ||
326 | |||
327 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_timer | ||
244 | u64 acpi_os_get_timer(void); | 328 | u64 acpi_os_get_timer(void); |
329 | #endif | ||
245 | 330 | ||
331 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_signal | ||
246 | acpi_status acpi_os_signal(u32 function, void *info); | 332 | acpi_status acpi_os_signal(u32 function, void *info); |
333 | #endif | ||
247 | 334 | ||
248 | /* | 335 | /* |
249 | * Debug print routines | 336 | * Debug print routines |
250 | */ | 337 | */ |
338 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_printf | ||
251 | void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...); | 339 | void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...); |
340 | #endif | ||
252 | 341 | ||
342 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_vprintf | ||
253 | void acpi_os_vprintf(const char *format, va_list args); | 343 | void acpi_os_vprintf(const char *format, va_list args); |
344 | #endif | ||
254 | 345 | ||
346 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_redirect_output | ||
255 | void acpi_os_redirect_output(void *destination); | 347 | void acpi_os_redirect_output(void *destination); |
348 | #endif | ||
256 | 349 | ||
257 | #ifdef ACPI_FUTURE_USAGE | ||
258 | /* | 350 | /* |
259 | * Debug input | 351 | * Debug input |
260 | */ | 352 | */ |
261 | u32 acpi_os_get_line(char *buffer); | 353 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_line |
354 | acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read); | ||
355 | #endif | ||
356 | |||
357 | /* | ||
358 | * Obtain ACPI table(s) | ||
359 | */ | ||
360 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_name | ||
361 | acpi_status | ||
362 | acpi_os_get_table_by_name(char *signature, | ||
363 | u32 instance, | ||
364 | struct acpi_table_header **table, | ||
365 | acpi_physical_address * address); | ||
366 | #endif | ||
367 | |||
368 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index | ||
369 | acpi_status | ||
370 | acpi_os_get_table_by_index(u32 index, | ||
371 | struct acpi_table_header **table, | ||
372 | u32 *instance, acpi_physical_address * address); | ||
373 | #endif | ||
374 | |||
375 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address | ||
376 | acpi_status | ||
377 | acpi_os_get_table_by_address(acpi_physical_address address, | ||
378 | struct acpi_table_header **table); | ||
262 | #endif | 379 | #endif |
263 | 380 | ||
264 | /* | 381 | /* |
265 | * Directory manipulation | 382 | * Directory manipulation |
266 | */ | 383 | */ |
384 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_directory | ||
267 | void *acpi_os_open_directory(char *pathname, | 385 | void *acpi_os_open_directory(char *pathname, |
268 | char *wildcard_spec, char requested_file_type); | 386 | char *wildcard_spec, char requested_file_type); |
387 | #endif | ||
269 | 388 | ||
270 | /* requeste_file_type values */ | 389 | /* requeste_file_type values */ |
271 | 390 | ||
272 | #define REQUEST_FILE_ONLY 0 | 391 | #define REQUEST_FILE_ONLY 0 |
273 | #define REQUEST_DIR_ONLY 1 | 392 | #define REQUEST_DIR_ONLY 1 |
274 | 393 | ||
394 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_next_filename | ||
275 | char *acpi_os_get_next_filename(void *dir_handle); | 395 | char *acpi_os_get_next_filename(void *dir_handle); |
396 | #endif | ||
276 | 397 | ||
398 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_directory | ||
277 | void acpi_os_close_directory(void *dir_handle); | 399 | void acpi_os_close_directory(void *dir_handle); |
400 | #endif | ||
278 | 401 | ||
279 | #endif /* __ACPIOSXF_H__ */ | 402 | #endif /* __ACPIOSXF_H__ */ |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index c7b1475422b3..d8f9457755b4 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
48 | 48 | ||
49 | #define ACPI_CA_VERSION 0x20130823 | 49 | #define ACPI_CA_VERSION 0x20130927 |
50 | 50 | ||
51 | #include <acpi/acconfig.h> | 51 | #include <acpi/acconfig.h> |
52 | #include <acpi/actypes.h> | 52 | #include <acpi/actypes.h> |
@@ -54,6 +54,7 @@ | |||
54 | #include <acpi/acbuffer.h> | 54 | #include <acpi/acbuffer.h> |
55 | 55 | ||
56 | extern u8 acpi_gbl_permanent_mmap; | 56 | extern u8 acpi_gbl_permanent_mmap; |
57 | extern u32 acpi_rsdt_forced; | ||
57 | 58 | ||
58 | /* | 59 | /* |
59 | * Globals that are publically available | 60 | * Globals that are publically available |
@@ -106,39 +107,41 @@ extern u8 acpi_gbl_disable_ssdt_table_load; | |||
106 | static ACPI_INLINE prototype {return(AE_OK);} | 107 | static ACPI_INLINE prototype {return(AE_OK);} |
107 | 108 | ||
108 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | 109 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ |
109 | static ACPI_INLINE prototype {} | 110 | static ACPI_INLINE prototype {return;} |
110 | 111 | ||
111 | #endif /* !ACPI_REDUCED_HARDWARE */ | 112 | #endif /* !ACPI_REDUCED_HARDWARE */ |
112 | 113 | ||
113 | extern u32 acpi_rsdt_forced; | ||
114 | /* | 114 | /* |
115 | * Initialization | 115 | * Initialization |
116 | */ | 116 | */ |
117 | acpi_status | 117 | acpi_status __init |
118 | acpi_initialize_tables(struct acpi_table_desc *initial_storage, | 118 | acpi_initialize_tables(struct acpi_table_desc *initial_storage, |
119 | u32 initial_table_count, u8 allow_resize); | 119 | u32 initial_table_count, u8 allow_resize); |
120 | 120 | ||
121 | acpi_status __init acpi_initialize_subsystem(void); | 121 | acpi_status __init acpi_initialize_subsystem(void); |
122 | 122 | ||
123 | acpi_status acpi_enable_subsystem(u32 flags); | 123 | acpi_status __init acpi_enable_subsystem(u32 flags); |
124 | 124 | ||
125 | acpi_status acpi_initialize_objects(u32 flags); | 125 | acpi_status __init acpi_initialize_objects(u32 flags); |
126 | 126 | ||
127 | acpi_status acpi_terminate(void); | 127 | acpi_status __init acpi_terminate(void); |
128 | 128 | ||
129 | /* | 129 | /* |
130 | * Miscellaneous global interfaces | 130 | * Miscellaneous global interfaces |
131 | */ | 131 | */ |
132 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) | 132 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) |
133 | |||
133 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) | 134 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) |
134 | #ifdef ACPI_FUTURE_USAGE | 135 | #ifdef ACPI_FUTURE_USAGE |
135 | acpi_status acpi_subsystem_status(void); | 136 | acpi_status acpi_subsystem_status(void); |
136 | #endif | 137 | #endif |
137 | 138 | ||
138 | #ifdef ACPI_FUTURE_USAGE | 139 | #ifdef ACPI_FUTURE_USAGE |
139 | acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); | 140 | acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); |
140 | #endif | 141 | #endif |
141 | 142 | ||
143 | acpi_status acpi_get_statistics(struct acpi_statistics *stats); | ||
144 | |||
142 | const char *acpi_format_exception(acpi_status exception); | 145 | const char *acpi_format_exception(acpi_status exception); |
143 | 146 | ||
144 | acpi_status acpi_purge_cached_objects(void); | 147 | acpi_status acpi_purge_cached_objects(void); |
@@ -159,29 +162,20 @@ acpi_decode_pld_buffer(u8 *in_buffer, | |||
159 | acpi_size length, struct acpi_pld_info **return_buffer); | 162 | acpi_size length, struct acpi_pld_info **return_buffer); |
160 | 163 | ||
161 | /* | 164 | /* |
162 | * ACPI Memory management | ||
163 | */ | ||
164 | void *acpi_allocate(u32 size); | ||
165 | |||
166 | void *acpi_callocate(u32 size); | ||
167 | |||
168 | void acpi_free(void *address); | ||
169 | |||
170 | /* | ||
171 | * ACPI table load/unload interfaces | 165 | * ACPI table load/unload interfaces |
172 | */ | 166 | */ |
173 | acpi_status acpi_load_table(struct acpi_table_header *table); | 167 | acpi_status acpi_load_table(struct acpi_table_header *table); |
174 | 168 | ||
175 | acpi_status acpi_unload_parent_table(acpi_handle object); | 169 | acpi_status acpi_unload_parent_table(acpi_handle object); |
176 | 170 | ||
177 | acpi_status acpi_load_tables(void); | 171 | acpi_status __init acpi_load_tables(void); |
178 | 172 | ||
179 | /* | 173 | /* |
180 | * ACPI table manipulation interfaces | 174 | * ACPI table manipulation interfaces |
181 | */ | 175 | */ |
182 | acpi_status acpi_reallocate_root_table(void); | 176 | acpi_status __init acpi_reallocate_root_table(void); |
183 | 177 | ||
184 | acpi_status acpi_find_root_pointer(acpi_size *rsdp_address); | 178 | acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address); |
185 | 179 | ||
186 | acpi_status acpi_unload_table_id(acpi_owner_id id); | 180 | acpi_status acpi_unload_table_id(acpi_owner_id id); |
187 | 181 | ||
@@ -193,6 +187,7 @@ acpi_status | |||
193 | acpi_get_table_with_size(acpi_string signature, | 187 | acpi_get_table_with_size(acpi_string signature, |
194 | u32 instance, struct acpi_table_header **out_table, | 188 | u32 instance, struct acpi_table_header **out_table, |
195 | acpi_size *tbl_size); | 189 | acpi_size *tbl_size); |
190 | |||
196 | acpi_status | 191 | acpi_status |
197 | acpi_get_table(acpi_string signature, | 192 | acpi_get_table(acpi_string signature, |
198 | u32 instance, struct acpi_table_header **out_table); | 193 | u32 instance, struct acpi_table_header **out_table); |
@@ -283,13 +278,16 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
283 | acpi_install_sci_handler(acpi_sci_handler | 278 | acpi_install_sci_handler(acpi_sci_handler |
284 | address, | 279 | address, |
285 | void *context)) | 280 | void *context)) |
281 | |||
286 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 282 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
287 | acpi_remove_sci_handler(acpi_sci_handler | 283 | acpi_remove_sci_handler(acpi_sci_handler |
288 | address)) | 284 | address)) |
285 | |||
289 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 286 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
290 | acpi_install_global_event_handler | 287 | acpi_install_global_event_handler |
291 | (acpi_gbl_event_handler handler, | 288 | (acpi_gbl_event_handler handler, |
292 | void *context)) | 289 | void *context)) |
290 | |||
293 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 291 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
294 | acpi_install_fixed_event_handler(u32 | 292 | acpi_install_fixed_event_handler(u32 |
295 | acpi_event, | 293 | acpi_event, |
@@ -297,10 +295,12 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
297 | handler, | 295 | handler, |
298 | void | 296 | void |
299 | *context)) | 297 | *context)) |
298 | |||
300 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 299 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
301 | acpi_remove_fixed_event_handler(u32 acpi_event, | 300 | acpi_remove_fixed_event_handler(u32 acpi_event, |
302 | acpi_event_handler | 301 | acpi_event_handler |
303 | handler)) | 302 | handler)) |
303 | |||
304 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 304 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
305 | acpi_install_gpe_handler(acpi_handle | 305 | acpi_install_gpe_handler(acpi_handle |
306 | gpe_device, | 306 | gpe_device, |
@@ -309,6 +309,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
309 | acpi_gpe_handler | 309 | acpi_gpe_handler |
310 | address, | 310 | address, |
311 | void *context)) | 311 | void *context)) |
312 | |||
312 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 313 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
313 | acpi_remove_gpe_handler(acpi_handle gpe_device, | 314 | acpi_remove_gpe_handler(acpi_handle gpe_device, |
314 | u32 gpe_number, | 315 | u32 gpe_number, |
@@ -345,6 +346,7 @@ acpi_status acpi_install_interface_handler(acpi_interface_handler handler); | |||
345 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 346 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
346 | acpi_acquire_global_lock(u16 timeout, | 347 | acpi_acquire_global_lock(u16 timeout, |
347 | u32 *handle)) | 348 | u32 *handle)) |
349 | |||
348 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 350 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
349 | acpi_release_global_lock(u32 handle)) | 351 | acpi_release_global_lock(u32 handle)) |
350 | 352 | ||
@@ -371,6 +373,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
371 | acpi_get_event_status(u32 event, | 373 | acpi_get_event_status(u32 event, |
372 | acpi_event_status | 374 | acpi_event_status |
373 | *event_status)) | 375 | *event_status)) |
376 | |||
374 | /* | 377 | /* |
375 | * General Purpose Event (GPE) Interfaces | 378 | * General Purpose Event (GPE) Interfaces |
376 | */ | 379 | */ |
@@ -401,10 +404,12 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
401 | parent_device, | 404 | parent_device, |
402 | acpi_handle gpe_device, | 405 | acpi_handle gpe_device, |
403 | u32 gpe_number)) | 406 | u32 gpe_number)) |
407 | |||
404 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 408 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
405 | acpi_set_gpe_wake_mask(acpi_handle gpe_device, | 409 | acpi_set_gpe_wake_mask(acpi_handle gpe_device, |
406 | u32 gpe_number, | 410 | u32 gpe_number, |
407 | u8 action)) | 411 | u8 action)) |
412 | |||
408 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 413 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
409 | acpi_get_gpe_status(acpi_handle gpe_device, | 414 | acpi_get_gpe_status(acpi_handle gpe_device, |
410 | u32 gpe_number, | 415 | u32 gpe_number, |
@@ -426,6 +431,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
426 | *gpe_block_address, | 431 | *gpe_block_address, |
427 | u32 register_count, | 432 | u32 register_count, |
428 | u32 interrupt_number)) | 433 | u32 interrupt_number)) |
434 | |||
429 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 435 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
430 | acpi_remove_gpe_block(acpi_handle gpe_device)) | 436 | acpi_remove_gpe_block(acpi_handle gpe_device)) |
431 | 437 | ||
@@ -500,13 +506,13 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
500 | * Sleep/Wake interfaces | 506 | * Sleep/Wake interfaces |
501 | */ | 507 | */ |
502 | acpi_status | 508 | acpi_status |
503 | acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); | 509 | acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b); |
504 | 510 | ||
505 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); | 511 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); |
506 | 512 | ||
507 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state); | 513 | acpi_status acpi_enter_sleep_state(u8 sleep_state); |
508 | 514 | ||
509 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)) | 515 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void)) |
510 | 516 | ||
511 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); | 517 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); |
512 | 518 | ||
@@ -515,7 +521,6 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state); | |||
515 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 521 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
516 | acpi_set_firmware_waking_vector(u32 | 522 | acpi_set_firmware_waking_vector(u32 |
517 | physical_address)) | 523 | physical_address)) |
518 | |||
519 | #if ACPI_MACHINE_WIDTH == 64 | 524 | #if ACPI_MACHINE_WIDTH == 64 |
520 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 525 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
521 | acpi_set_firmware_waking_vector64(u64 | 526 | acpi_set_firmware_waking_vector64(u64 |
@@ -539,50 +544,53 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
539 | /* | 544 | /* |
540 | * Error/Warning output | 545 | * Error/Warning output |
541 | */ | 546 | */ |
547 | ACPI_PRINTF_LIKE(3) | ||
542 | void ACPI_INTERNAL_VAR_XFACE | 548 | void ACPI_INTERNAL_VAR_XFACE |
543 | acpi_error(const char *module_name, | 549 | acpi_error(const char *module_name, u32 line_number, const char *format, ...); |
544 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | ||
545 | 550 | ||
551 | ACPI_PRINTF_LIKE(4) | ||
546 | void ACPI_INTERNAL_VAR_XFACE | 552 | void ACPI_INTERNAL_VAR_XFACE |
547 | acpi_exception(const char *module_name, | 553 | acpi_exception(const char *module_name, |
548 | u32 line_number, | 554 | u32 line_number, acpi_status status, const char *format, ...); |
549 | acpi_status status, const char *format, ...) ACPI_PRINTF_LIKE(4); | ||
550 | 555 | ||
556 | ACPI_PRINTF_LIKE(3) | ||
551 | void ACPI_INTERNAL_VAR_XFACE | 557 | void ACPI_INTERNAL_VAR_XFACE |
552 | acpi_warning(const char *module_name, | 558 | acpi_warning(const char *module_name, u32 line_number, const char *format, ...); |
553 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | ||
554 | 559 | ||
560 | ACPI_PRINTF_LIKE(3) | ||
555 | void ACPI_INTERNAL_VAR_XFACE | 561 | void ACPI_INTERNAL_VAR_XFACE |
556 | acpi_info(const char *module_name, | 562 | acpi_info(const char *module_name, u32 line_number, const char *format, ...); |
557 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | ||
558 | 563 | ||
564 | ACPI_PRINTF_LIKE(3) | ||
559 | void ACPI_INTERNAL_VAR_XFACE | 565 | void ACPI_INTERNAL_VAR_XFACE |
560 | acpi_bios_error(const char *module_name, | 566 | acpi_bios_error(const char *module_name, |
561 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | 567 | u32 line_number, const char *format, ...); |
562 | 568 | ||
569 | ACPI_PRINTF_LIKE(3) | ||
563 | void ACPI_INTERNAL_VAR_XFACE | 570 | void ACPI_INTERNAL_VAR_XFACE |
564 | acpi_bios_warning(const char *module_name, | 571 | acpi_bios_warning(const char *module_name, |
565 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | 572 | u32 line_number, const char *format, ...); |
566 | 573 | ||
567 | /* | 574 | /* |
568 | * Debug output | 575 | * Debug output |
569 | */ | 576 | */ |
570 | #ifdef ACPI_DEBUG_OUTPUT | 577 | #ifdef ACPI_DEBUG_OUTPUT |
571 | 578 | ||
579 | ACPI_PRINTF_LIKE(6) | ||
572 | void ACPI_INTERNAL_VAR_XFACE | 580 | void ACPI_INTERNAL_VAR_XFACE |
573 | acpi_debug_print(u32 requested_debug_level, | 581 | acpi_debug_print(u32 requested_debug_level, |
574 | u32 line_number, | 582 | u32 line_number, |
575 | const char *function_name, | 583 | const char *function_name, |
576 | const char *module_name, | 584 | const char *module_name, |
577 | u32 component_id, const char *format, ...) ACPI_PRINTF_LIKE(6); | 585 | u32 component_id, const char *format, ...); |
578 | 586 | ||
587 | ACPI_PRINTF_LIKE(6) | ||
579 | void ACPI_INTERNAL_VAR_XFACE | 588 | void ACPI_INTERNAL_VAR_XFACE |
580 | acpi_debug_print_raw(u32 requested_debug_level, | 589 | acpi_debug_print_raw(u32 requested_debug_level, |
581 | u32 line_number, | 590 | u32 line_number, |
582 | const char *function_name, | 591 | const char *function_name, |
583 | const char *module_name, | 592 | const char *module_name, |
584 | u32 component_id, | 593 | u32 component_id, const char *format, ...); |
585 | const char *format, ...) ACPI_PRINTF_LIKE(6); | ||
586 | #endif | 594 | #endif |
587 | 595 | ||
588 | #endif /* __ACXFACE_H__ */ | 596 | #endif /* __ACXFACE_H__ */ |
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 9b58a8f43771..94970880126f 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -146,7 +146,24 @@ struct acpi_table_rsdp { | |||
146 | u8 reserved[3]; /* Reserved, must be zero */ | 146 | u8 reserved[3]; /* Reserved, must be zero */ |
147 | }; | 147 | }; |
148 | 148 | ||
149 | #define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */ | 149 | /* Standalone struct for the ACPI 1.0 RSDP */ |
150 | |||
151 | struct acpi_rsdp_common { | ||
152 | char signature[8]; | ||
153 | u8 checksum; | ||
154 | char oem_id[ACPI_OEM_ID_SIZE]; | ||
155 | u8 revision; | ||
156 | u32 rsdt_physical_address; | ||
157 | }; | ||
158 | |||
159 | /* Standalone struct for the extended part of the RSDP (ACPI 2.0+) */ | ||
160 | |||
161 | struct acpi_rsdp_extension { | ||
162 | u32 length; | ||
163 | u64 xsdt_physical_address; | ||
164 | u8 extended_checksum; | ||
165 | u8 reserved[3]; | ||
166 | }; | ||
150 | 167 | ||
151 | /******************************************************************************* | 168 | /******************************************************************************* |
152 | * | 169 | * |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index ffaac0e7e0c6..40f7ed115452 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
@@ -444,8 +444,8 @@ enum acpi_dmar_scope_type { | |||
444 | }; | 444 | }; |
445 | 445 | ||
446 | struct acpi_dmar_pci_path { | 446 | struct acpi_dmar_pci_path { |
447 | u8 dev; | 447 | u8 device; |
448 | u8 fn; | 448 | u8 function; |
449 | }; | 449 | }; |
450 | 450 | ||
451 | /* | 451 | /* |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index f6abf23ad0a7..809b1a0fee7f 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -299,13 +299,57 @@ typedef u32 acpi_physical_address; | |||
299 | #endif | 299 | #endif |
300 | 300 | ||
301 | /* | 301 | /* |
302 | * All ACPICA functions that are available to the rest of the kernel are | 302 | * All ACPICA external functions that are available to the rest of the kernel |
303 | * tagged with this macro which can be defined as appropriate for the host. | 303 | * are tagged with thes macros which can be defined as appropriate for the host. |
304 | * | ||
305 | * Notes: | ||
306 | * ACPI_EXPORT_SYMBOL_INIT is used for initialization and termination | ||
307 | * interfaces that may need special processing. | ||
308 | * ACPI_EXPORT_SYMBOL is used for all other public external functions. | ||
304 | */ | 309 | */ |
310 | #ifndef ACPI_EXPORT_SYMBOL_INIT | ||
311 | #define ACPI_EXPORT_SYMBOL_INIT(symbol) | ||
312 | #endif | ||
313 | |||
305 | #ifndef ACPI_EXPORT_SYMBOL | 314 | #ifndef ACPI_EXPORT_SYMBOL |
306 | #define ACPI_EXPORT_SYMBOL(symbol) | 315 | #define ACPI_EXPORT_SYMBOL(symbol) |
307 | #endif | 316 | #endif |
308 | 317 | ||
318 | /* | ||
319 | * Compiler/Clibrary-dependent debug initialization. Used for ACPICA | ||
320 | * utilities only. | ||
321 | */ | ||
322 | #ifndef ACPI_DEBUG_INITIALIZE | ||
323 | #define ACPI_DEBUG_INITIALIZE() | ||
324 | #endif | ||
325 | |||
326 | /******************************************************************************* | ||
327 | * | ||
328 | * Configuration | ||
329 | * | ||
330 | ******************************************************************************/ | ||
331 | |||
332 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | ||
333 | /* | ||
334 | * Memory allocation tracking (used by acpi_exec to detect memory leaks) | ||
335 | */ | ||
336 | #define ACPI_MEM_PARAMETERS _COMPONENT, _acpi_module_name, __LINE__ | ||
337 | #define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track ((acpi_size) (a), ACPI_MEM_PARAMETERS) | ||
338 | #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track ((acpi_size) (a), ACPI_MEM_PARAMETERS) | ||
339 | #define ACPI_FREE(a) acpi_ut_free_and_track (a, ACPI_MEM_PARAMETERS) | ||
340 | #define ACPI_MEM_TRACKING(a) a | ||
341 | |||
342 | #else | ||
343 | /* | ||
344 | * Normal memory allocation directly via the OS services layer | ||
345 | */ | ||
346 | #define ACPI_ALLOCATE(a) acpi_os_allocate ((acpi_size) (a)) | ||
347 | #define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed ((acpi_size) (a)) | ||
348 | #define ACPI_FREE(a) acpi_os_free (a) | ||
349 | #define ACPI_MEM_TRACKING(a) | ||
350 | |||
351 | #endif /* ACPI_DBG_TRACK_ALLOCATIONS */ | ||
352 | |||
309 | /****************************************************************************** | 353 | /****************************************************************************** |
310 | * | 354 | * |
311 | * ACPI Specification constants (Do not change unless the specification changes) | 355 | * ACPI Specification constants (Do not change unless the specification changes) |
@@ -322,6 +366,7 @@ typedef u32 acpi_physical_address; | |||
322 | #define ACPI_PM1_REGISTER_WIDTH 16 | 366 | #define ACPI_PM1_REGISTER_WIDTH 16 |
323 | #define ACPI_PM2_REGISTER_WIDTH 8 | 367 | #define ACPI_PM2_REGISTER_WIDTH 8 |
324 | #define ACPI_PM_TIMER_WIDTH 32 | 368 | #define ACPI_PM_TIMER_WIDTH 32 |
369 | #define ACPI_RESET_REGISTER_WIDTH 8 | ||
325 | 370 | ||
326 | /* Names within the namespace are 4 bytes long */ | 371 | /* Names within the namespace are 4 bytes long */ |
327 | 372 | ||
@@ -891,9 +936,13 @@ struct acpi_buffer { | |||
891 | void *pointer; /* pointer to buffer */ | 936 | void *pointer; /* pointer to buffer */ |
892 | }; | 937 | }; |
893 | 938 | ||
894 | /* Free a buffer created in an struct acpi_buffer via ACPI_ALLOCATE_LOCAL_BUFFER */ | 939 | /* |
895 | 940 | * Free a buffer created in an struct acpi_buffer via ACPI_ALLOCATE_BUFFER. | |
896 | #define ACPI_FREE_BUFFER(b) ACPI_FREE(b.pointer) | 941 | * Note: We use acpi_os_free here because acpi_os_allocate was used to allocate |
942 | * the buffer. This purposefully bypasses the internal allocation tracking | ||
943 | * mechanism (if it is enabled). | ||
944 | */ | ||
945 | #define ACPI_FREE_BUFFER(b) acpi_os_free((b).pointer) | ||
897 | 946 | ||
898 | /* | 947 | /* |
899 | * name_type for acpi_get_name | 948 | * name_type for acpi_get_name |
@@ -932,6 +981,16 @@ struct acpi_system_info { | |||
932 | u32 debug_layer; | 981 | u32 debug_layer; |
933 | }; | 982 | }; |
934 | 983 | ||
984 | /* | ||
985 | * System statistics returned by acpi_get_statistics() | ||
986 | */ | ||
987 | struct acpi_statistics { | ||
988 | u32 sci_count; | ||
989 | u32 gpe_count; | ||
990 | u32 fixed_event_count[ACPI_NUM_FIXED_EVENTS]; | ||
991 | u32 method_count; | ||
992 | }; | ||
993 | |||
935 | /* Table Event Types */ | 994 | /* Table Event Types */ |
936 | 995 | ||
937 | #define ACPI_TABLE_EVENT_LOAD 0x0 | 996 | #define ACPI_TABLE_EVENT_LOAD 0x0 |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index ef04b36ca6ed..974d3ef7c141 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -96,10 +96,11 @@ | |||
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * acpi_bin/acpi_help/acpi_src configuration. All single threaded, with | 99 | * acpi_bin/acpi_dump/acpi_src/acpi_xtract configuration. All single |
100 | * no debug output. | 100 | * threaded, with no debug output. |
101 | */ | 101 | */ |
102 | #if (defined ACPI_BIN_APP) || \ | 102 | #if (defined ACPI_BIN_APP) || \ |
103 | (defined ACPI_DUMP_APP) || \ | ||
103 | (defined ACPI_SRC_APP) || \ | 104 | (defined ACPI_SRC_APP) || \ |
104 | (defined ACPI_XTRACT_APP) | 105 | (defined ACPI_XTRACT_APP) |
105 | #define ACPI_APPLICATION | 106 | #define ACPI_APPLICATION |
@@ -147,6 +148,9 @@ | |||
147 | #if defined(_LINUX) || defined(__linux__) | 148 | #if defined(_LINUX) || defined(__linux__) |
148 | #include <acpi/platform/aclinux.h> | 149 | #include <acpi/platform/aclinux.h> |
149 | 150 | ||
151 | #elif defined(_APPLE) || defined(__APPLE__) | ||
152 | #include "acmacosx.h" | ||
153 | |||
150 | #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) | 154 | #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) |
151 | #include "acfreebsd.h" | 155 | #include "acfreebsd.h" |
152 | 156 | ||
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index fda0f3e35c03..ab57930794a5 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -50,7 +50,6 @@ | |||
50 | #define ACPI_USE_DO_WHILE_0 | 50 | #define ACPI_USE_DO_WHILE_0 |
51 | #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE | 51 | #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE |
52 | 52 | ||
53 | |||
54 | #ifdef __KERNEL__ | 53 | #ifdef __KERNEL__ |
55 | 54 | ||
56 | #include <linux/string.h> | 55 | #include <linux/string.h> |
@@ -58,11 +57,13 @@ | |||
58 | #include <linux/ctype.h> | 57 | #include <linux/ctype.h> |
59 | #include <linux/sched.h> | 58 | #include <linux/sched.h> |
60 | #include <linux/atomic.h> | 59 | #include <linux/atomic.h> |
61 | #include <asm/div64.h> | 60 | #include <linux/math64.h> |
62 | #include <asm/acpi.h> | ||
63 | #include <linux/slab.h> | 61 | #include <linux/slab.h> |
64 | #include <linux/spinlock_types.h> | 62 | #include <linux/spinlock_types.h> |
65 | #include <asm/current.h> | 63 | #ifdef EXPORT_ACPI_INTERFACES |
64 | #include <linux/export.h> | ||
65 | #endif | ||
66 | #include <asm/acpi.h> | ||
66 | 67 | ||
67 | /* Host-dependent types and defines for in-kernel ACPICA */ | 68 | /* Host-dependent types and defines for in-kernel ACPICA */ |
68 | 69 | ||
@@ -74,7 +75,7 @@ | |||
74 | #define acpi_spinlock spinlock_t * | 75 | #define acpi_spinlock spinlock_t * |
75 | #define acpi_cpu_flags unsigned long | 76 | #define acpi_cpu_flags unsigned long |
76 | 77 | ||
77 | #else /* !__KERNEL__ */ | 78 | #else /* !__KERNEL__ */ |
78 | 79 | ||
79 | #include <stdarg.h> | 80 | #include <stdarg.h> |
80 | #include <string.h> | 81 | #include <string.h> |
@@ -102,21 +103,35 @@ | |||
102 | #define __cdecl | 103 | #define __cdecl |
103 | #endif | 104 | #endif |
104 | 105 | ||
105 | #endif /* __KERNEL__ */ | 106 | #endif /* __KERNEL__ */ |
106 | 107 | ||
107 | /* Linux uses GCC */ | 108 | /* Linux uses GCC */ |
108 | 109 | ||
109 | #include <acpi/platform/acgcc.h> | 110 | #include <acpi/platform/acgcc.h> |
110 | 111 | ||
111 | #ifdef __KERNEL__ | 112 | #ifdef __KERNEL__ |
113 | |||
114 | /* | ||
115 | * FIXME: Inclusion of actypes.h | ||
116 | * Linux kernel need this before defining inline OSL interfaces as | ||
117 | * actypes.h need to be included to find ACPICA type definitions. | ||
118 | * Since from ACPICA's perspective, the actypes.h should be included after | ||
119 | * acenv.h (aclinux.h), this leads to a inclusion mis-ordering issue. | ||
120 | */ | ||
112 | #include <acpi/actypes.h> | 121 | #include <acpi/actypes.h> |
122 | |||
113 | /* | 123 | /* |
114 | * Overrides for in-kernel ACPICA | 124 | * Overrides for in-kernel ACPICA |
115 | */ | 125 | */ |
116 | static inline acpi_thread_id acpi_os_get_thread_id(void) | 126 | acpi_status __init acpi_os_initialize(void); |
117 | { | 127 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_initialize |
118 | return (acpi_thread_id)(unsigned long)current; | 128 | |
119 | } | 129 | acpi_status acpi_os_terminate(void); |
130 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_terminate | ||
131 | |||
132 | /* | ||
133 | * Memory allocation/deallocation | ||
134 | */ | ||
120 | 135 | ||
121 | /* | 136 | /* |
122 | * The irqs_disabled() check is for resume from RAM. | 137 | * The irqs_disabled() check is for resume from RAM. |
@@ -126,25 +141,45 @@ static inline acpi_thread_id acpi_os_get_thread_id(void) | |||
126 | */ | 141 | */ |
127 | static inline void *acpi_os_allocate(acpi_size size) | 142 | static inline void *acpi_os_allocate(acpi_size size) |
128 | { | 143 | { |
129 | return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); | 144 | return kmalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL); |
130 | } | 145 | } |
131 | 146 | ||
147 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate | ||
148 | |||
149 | /* Use native linux version of acpi_os_allocate_zeroed */ | ||
150 | |||
132 | static inline void *acpi_os_allocate_zeroed(acpi_size size) | 151 | static inline void *acpi_os_allocate_zeroed(acpi_size size) |
133 | { | 152 | { |
134 | return kzalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); | 153 | return kzalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL); |
135 | } | 154 | } |
136 | 155 | ||
156 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate_zeroed | ||
157 | #define USE_NATIVE_ALLOCATE_ZEROED | ||
158 | |||
159 | static inline void acpi_os_free(void *memory) | ||
160 | { | ||
161 | kfree(memory); | ||
162 | } | ||
163 | |||
164 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_free | ||
165 | |||
137 | static inline void *acpi_os_acquire_object(acpi_cache_t * cache) | 166 | static inline void *acpi_os_acquire_object(acpi_cache_t * cache) |
138 | { | 167 | { |
139 | return kmem_cache_zalloc(cache, | 168 | return kmem_cache_zalloc(cache, |
140 | irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); | 169 | irqs_disabled()? GFP_ATOMIC : GFP_KERNEL); |
141 | } | 170 | } |
142 | 171 | ||
143 | #define ACPI_ALLOCATE(a) acpi_os_allocate(a) | 172 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_object |
144 | #define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a) | 173 | |
145 | #define ACPI_FREE(a) kfree(a) | 174 | static inline acpi_thread_id acpi_os_get_thread_id(void) |
175 | { | ||
176 | return (acpi_thread_id) (unsigned long)current; | ||
177 | } | ||
178 | |||
179 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_thread_id | ||
146 | 180 | ||
147 | #ifndef CONFIG_PREEMPT | 181 | #ifndef CONFIG_PREEMPT |
182 | |||
148 | /* | 183 | /* |
149 | * Used within ACPICA to show where it is safe to preempt execution | 184 | * Used within ACPICA to show where it is safe to preempt execution |
150 | * when CONFIG_PREEMPT=n | 185 | * when CONFIG_PREEMPT=n |
@@ -154,6 +189,7 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache) | |||
154 | if (!irqs_disabled()) \ | 189 | if (!irqs_disabled()) \ |
155 | cond_resched(); \ | 190 | cond_resched(); \ |
156 | } while (0) | 191 | } while (0) |
192 | |||
157 | #endif | 193 | #endif |
158 | 194 | ||
159 | /* | 195 | /* |
@@ -163,17 +199,53 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache) | |||
163 | * all locks to the name of the argument of acpi_os_create_lock(), which | 199 | * all locks to the name of the argument of acpi_os_create_lock(), which |
164 | * prevents lockdep from reporting false positives for ACPICA locks. | 200 | * prevents lockdep from reporting false positives for ACPICA locks. |
165 | */ | 201 | */ |
166 | #define acpi_os_create_lock(__handle) \ | 202 | #define acpi_os_create_lock(__handle) \ |
167 | ({ \ | 203 | ({ \ |
168 | spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \ | 204 | spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \ |
169 | \ | 205 | if (lock) { \ |
170 | if (lock) { \ | 206 | *(__handle) = lock; \ |
171 | *(__handle) = lock; \ | 207 | spin_lock_init(*(__handle)); \ |
172 | spin_lock_init(*(__handle)); \ | 208 | } \ |
173 | } \ | 209 | lock ? AE_OK : AE_NO_MEMORY; \ |
174 | lock ? AE_OK : AE_NO_MEMORY; \ | 210 | }) |
175 | }) | 211 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock |
176 | 212 | ||
177 | #endif /* __KERNEL__ */ | 213 | void __iomem *acpi_os_map_memory(acpi_physical_address where, acpi_size length); |
178 | 214 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_map_memory | |
179 | #endif /* __ACLINUX_H__ */ | 215 | |
216 | void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size); | ||
217 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_unmap_memory | ||
218 | |||
219 | /* | ||
220 | * OSL interfaces used by debugger/disassembler | ||
221 | */ | ||
222 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_readable | ||
223 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_writable | ||
224 | |||
225 | /* | ||
226 | * OSL interfaces used by utilities | ||
227 | */ | ||
228 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_redirect_output | ||
229 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_line | ||
230 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_name | ||
231 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index | ||
232 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address | ||
233 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_directory | ||
234 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_next_filename | ||
235 | #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_directory | ||
236 | |||
237 | /* | ||
238 | * OSL interfaces added by Linux | ||
239 | */ | ||
240 | void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size); | ||
241 | |||
242 | void acpi_os_gpe_count(u32 gpe_number); | ||
243 | |||
244 | void acpi_os_fixed_event_count(u32 fixed_event_number); | ||
245 | |||
246 | acpi_status | ||
247 | acpi_os_hotplug_execute(acpi_osd_exec_callback function, void *context); | ||
248 | |||
249 | #endif /* __KERNEL__ */ | ||
250 | |||
251 | #endif /* __ACLINUX_H__ */ | ||