diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-18 07:41:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 07:41:27 -0400 |
commit | 2fb5e1e101d1b1c9a1aeca7ad99a02b49241ba7b (patch) | |
tree | 45c4575110c61ca181196c038e1579f0f4fb0174 /drivers/acpi/events | |
parent | 34646bca474142e1424e5f6c4a33cb2ba0930ea1 (diff) | |
parent | 5b664cb235e97afbf34db9c4d77f08ebd725335e (diff) |
Merge branch 'linus' into x86/paravirt-spinlocks
Conflicts:
arch/x86/kernel/Makefile
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/acpi/events')
-rw-r--r-- | drivers/acpi/events/evevent.c | 6 | ||||
-rw-r--r-- | drivers/acpi/events/evgpe.c | 36 | ||||
-rw-r--r-- | drivers/acpi/events/evgpeblk.c | 18 | ||||
-rw-r--r-- | drivers/acpi/events/evmisc.c | 4 | ||||
-rw-r--r-- | drivers/acpi/events/evregion.c | 5 | ||||
-rw-r--r-- | drivers/acpi/events/evrgnini.c | 2 | ||||
-rw-r--r-- | drivers/acpi/events/evxfevnt.c | 18 |
7 files changed, 51 insertions, 38 deletions
diff --git a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c index 5d30e5be1b1c..c56c5c6ea77b 100644 --- a/drivers/acpi/events/evevent.c +++ b/drivers/acpi/events/evevent.c | |||
@@ -188,7 +188,7 @@ acpi_status acpi_ev_install_xrupt_handlers(void) | |||
188 | 188 | ||
189 | static acpi_status acpi_ev_fixed_event_initialize(void) | 189 | static acpi_status acpi_ev_fixed_event_initialize(void) |
190 | { | 190 | { |
191 | acpi_native_uint i; | 191 | u32 i; |
192 | acpi_status status; | 192 | acpi_status status; |
193 | 193 | ||
194 | /* | 194 | /* |
@@ -231,7 +231,7 @@ u32 acpi_ev_fixed_event_detect(void) | |||
231 | u32 int_status = ACPI_INTERRUPT_NOT_HANDLED; | 231 | u32 int_status = ACPI_INTERRUPT_NOT_HANDLED; |
232 | u32 fixed_status; | 232 | u32 fixed_status; |
233 | u32 fixed_enable; | 233 | u32 fixed_enable; |
234 | acpi_native_uint i; | 234 | u32 i; |
235 | 235 | ||
236 | ACPI_FUNCTION_NAME(ev_fixed_event_detect); | 236 | ACPI_FUNCTION_NAME(ev_fixed_event_detect); |
237 | 237 | ||
@@ -260,7 +260,7 @@ u32 acpi_ev_fixed_event_detect(void) | |||
260 | 260 | ||
261 | /* Found an active (signalled) event */ | 261 | /* Found an active (signalled) event */ |
262 | acpi_os_fixed_event_count(i); | 262 | acpi_os_fixed_event_count(i); |
263 | int_status |= acpi_ev_fixed_event_dispatch((u32) i); | 263 | int_status |= acpi_ev_fixed_event_dispatch(i); |
264 | } | 264 | } |
265 | } | 265 | } |
266 | 266 | ||
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index 5354be44f876..c5e53aae86f7 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c | |||
@@ -256,7 +256,7 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
256 | return_ACPI_STATUS(status); | 256 | return_ACPI_STATUS(status); |
257 | } | 257 | } |
258 | 258 | ||
259 | /* Mark wake-disabled or HW disable, or both */ | 259 | /* Clear the appropriate enabled flags for this GPE */ |
260 | 260 | ||
261 | switch (gpe_event_info->flags & ACPI_GPE_TYPE_MASK) { | 261 | switch (gpe_event_info->flags & ACPI_GPE_TYPE_MASK) { |
262 | case ACPI_GPE_TYPE_WAKE: | 262 | case ACPI_GPE_TYPE_WAKE: |
@@ -273,13 +273,23 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
273 | /* Disable the requested runtime GPE */ | 273 | /* Disable the requested runtime GPE */ |
274 | 274 | ||
275 | ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED); | 275 | ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED); |
276 | 276 | break; | |
277 | /* fallthrough */ | ||
278 | 277 | ||
279 | default: | 278 | default: |
280 | acpi_hw_write_gpe_enable_reg(gpe_event_info); | 279 | break; |
281 | } | 280 | } |
282 | 281 | ||
282 | /* | ||
283 | * Even if we don't know the GPE type, make sure that we always | ||
284 | * disable it. low_disable_gpe will just clear the enable bit for this | ||
285 | * GPE and write it. It will not write out the current GPE enable mask, | ||
286 | * since this may inadvertently enable GPEs too early, if a rogue GPE has | ||
287 | * come in during ACPICA initialization - possibly as a result of AML or | ||
288 | * other code that has enabled the GPE. | ||
289 | */ | ||
290 | status = acpi_hw_low_disable_gpe(gpe_event_info); | ||
291 | return_ACPI_STATUS(status); | ||
292 | |||
283 | return_ACPI_STATUS(AE_OK); | 293 | return_ACPI_STATUS(AE_OK); |
284 | } | 294 | } |
285 | 295 | ||
@@ -305,7 +315,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, | |||
305 | { | 315 | { |
306 | union acpi_operand_object *obj_desc; | 316 | union acpi_operand_object *obj_desc; |
307 | struct acpi_gpe_block_info *gpe_block; | 317 | struct acpi_gpe_block_info *gpe_block; |
308 | acpi_native_uint i; | 318 | u32 i; |
309 | 319 | ||
310 | ACPI_FUNCTION_ENTRY(); | 320 | ACPI_FUNCTION_ENTRY(); |
311 | 321 | ||
@@ -379,8 +389,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) | |||
379 | u32 status_reg; | 389 | u32 status_reg; |
380 | u32 enable_reg; | 390 | u32 enable_reg; |
381 | acpi_cpu_flags flags; | 391 | acpi_cpu_flags flags; |
382 | acpi_native_uint i; | 392 | u32 i; |
383 | acpi_native_uint j; | 393 | u32 j; |
384 | 394 | ||
385 | ACPI_FUNCTION_NAME(ev_gpe_detect); | 395 | ACPI_FUNCTION_NAME(ev_gpe_detect); |
386 | 396 | ||
@@ -462,13 +472,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) | |||
462 | */ | 472 | */ |
463 | int_status |= | 473 | int_status |= |
464 | acpi_ev_gpe_dispatch(&gpe_block-> | 474 | acpi_ev_gpe_dispatch(&gpe_block-> |
465 | event_info[(i * | 475 | event_info[((acpi_size) i * ACPI_GPE_REGISTER_WIDTH) + j], j + gpe_register_info->base_gpe_number); |
466 | ACPI_GPE_REGISTER_WIDTH) | ||
467 | + | ||
468 | j], | ||
469 | (u32) j + | ||
470 | gpe_register_info-> | ||
471 | base_gpe_number); | ||
472 | } | 476 | } |
473 | } | 477 | } |
474 | } | 478 | } |
@@ -555,10 +559,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) | |||
555 | */ | 559 | */ |
556 | info->prefix_node = | 560 | info->prefix_node = |
557 | local_gpe_event_info.dispatch.method_node; | 561 | local_gpe_event_info.dispatch.method_node; |
558 | info->parameters = | ||
559 | ACPI_CAST_PTR(union acpi_operand_object *, | ||
560 | gpe_event_info); | ||
561 | info->parameter_type = ACPI_PARAM_GPE; | ||
562 | info->flags = ACPI_IGNORE_RETURN_VALUE; | 562 | info->flags = ACPI_IGNORE_RETURN_VALUE; |
563 | 563 | ||
564 | status = acpi_ns_evaluate(info); | 564 | status = acpi_ns_evaluate(info); |
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c index e6c4d4c49e79..73c058e2f5c2 100644 --- a/drivers/acpi/events/evgpeblk.c +++ b/drivers/acpi/events/evgpeblk.c | |||
@@ -189,8 +189,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
189 | struct acpi_gpe_block_info *gpe_block) | 189 | struct acpi_gpe_block_info *gpe_block) |
190 | { | 190 | { |
191 | struct acpi_gpe_event_info *gpe_event_info; | 191 | struct acpi_gpe_event_info *gpe_event_info; |
192 | acpi_native_uint i; | 192 | u32 i; |
193 | acpi_native_uint j; | 193 | u32 j; |
194 | 194 | ||
195 | ACPI_FUNCTION_TRACE(ev_delete_gpe_handlers); | 195 | ACPI_FUNCTION_TRACE(ev_delete_gpe_handlers); |
196 | 196 | ||
@@ -203,7 +203,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
203 | for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { | 203 | for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { |
204 | gpe_event_info = | 204 | gpe_event_info = |
205 | &gpe_block-> | 205 | &gpe_block-> |
206 | event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j]; | 206 | event_info[((acpi_size) i * |
207 | ACPI_GPE_REGISTER_WIDTH) + j]; | ||
207 | 208 | ||
208 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == | 209 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == |
209 | ACPI_GPE_DISPATCH_HANDLER) { | 210 | ACPI_GPE_DISPATCH_HANDLER) { |
@@ -744,8 +745,8 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
744 | struct acpi_gpe_event_info *gpe_event_info = NULL; | 745 | struct acpi_gpe_event_info *gpe_event_info = NULL; |
745 | struct acpi_gpe_event_info *this_event; | 746 | struct acpi_gpe_event_info *this_event; |
746 | struct acpi_gpe_register_info *this_register; | 747 | struct acpi_gpe_register_info *this_register; |
747 | acpi_native_uint i; | 748 | u32 i; |
748 | acpi_native_uint j; | 749 | u32 j; |
749 | acpi_status status; | 750 | acpi_status status; |
750 | 751 | ||
751 | ACPI_FUNCTION_TRACE(ev_create_gpe_info_blocks); | 752 | ACPI_FUNCTION_TRACE(ev_create_gpe_info_blocks); |
@@ -983,8 +984,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, | |||
983 | struct acpi_gpe_walk_info gpe_info; | 984 | struct acpi_gpe_walk_info gpe_info; |
984 | u32 wake_gpe_count; | 985 | u32 wake_gpe_count; |
985 | u32 gpe_enabled_count; | 986 | u32 gpe_enabled_count; |
986 | acpi_native_uint i; | 987 | u32 i; |
987 | acpi_native_uint j; | 988 | u32 j; |
988 | 989 | ||
989 | ACPI_FUNCTION_TRACE(ev_initialize_gpe_block); | 990 | ACPI_FUNCTION_TRACE(ev_initialize_gpe_block); |
990 | 991 | ||
@@ -1033,7 +1034,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, | |||
1033 | 1034 | ||
1034 | gpe_event_info = | 1035 | gpe_event_info = |
1035 | &gpe_block-> | 1036 | &gpe_block-> |
1036 | event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j]; | 1037 | event_info[((acpi_size) i * |
1038 | ACPI_GPE_REGISTER_WIDTH) + j]; | ||
1037 | 1039 | ||
1038 | if (((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == | 1040 | if (((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == |
1039 | ACPI_GPE_DISPATCH_METHOD) | 1041 | ACPI_GPE_DISPATCH_METHOD) |
diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c index 2113e58e2221..1d5670be729a 100644 --- a/drivers/acpi/events/evmisc.c +++ b/drivers/acpi/events/evmisc.c | |||
@@ -575,7 +575,7 @@ acpi_status acpi_ev_release_global_lock(void) | |||
575 | 575 | ||
576 | void acpi_ev_terminate(void) | 576 | void acpi_ev_terminate(void) |
577 | { | 577 | { |
578 | acpi_native_uint i; | 578 | u32 i; |
579 | acpi_status status; | 579 | acpi_status status; |
580 | 580 | ||
581 | ACPI_FUNCTION_TRACE(ev_terminate); | 581 | ACPI_FUNCTION_TRACE(ev_terminate); |
@@ -589,7 +589,7 @@ void acpi_ev_terminate(void) | |||
589 | /* Disable all fixed events */ | 589 | /* Disable all fixed events */ |
590 | 590 | ||
591 | for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { | 591 | for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { |
592 | status = acpi_disable_event((u32) i, 0); | 592 | status = acpi_disable_event(i, 0); |
593 | if (ACPI_FAILURE(status)) { | 593 | if (ACPI_FAILURE(status)) { |
594 | ACPI_ERROR((AE_INFO, | 594 | ACPI_ERROR((AE_INFO, |
595 | "Could not disable fixed event %d", | 595 | "Could not disable fixed event %d", |
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c index 1628f5934752..236fbd1ca438 100644 --- a/drivers/acpi/events/evregion.c +++ b/drivers/acpi/events/evregion.c | |||
@@ -81,7 +81,7 @@ acpi_ev_install_handler(acpi_handle obj_handle, | |||
81 | acpi_status acpi_ev_install_region_handlers(void) | 81 | acpi_status acpi_ev_install_region_handlers(void) |
82 | { | 82 | { |
83 | acpi_status status; | 83 | acpi_status status; |
84 | acpi_native_uint i; | 84 | u32 i; |
85 | 85 | ||
86 | ACPI_FUNCTION_TRACE(ev_install_region_handlers); | 86 | ACPI_FUNCTION_TRACE(ev_install_region_handlers); |
87 | 87 | ||
@@ -151,7 +151,7 @@ acpi_status acpi_ev_install_region_handlers(void) | |||
151 | acpi_status acpi_ev_initialize_op_regions(void) | 151 | acpi_status acpi_ev_initialize_op_regions(void) |
152 | { | 152 | { |
153 | acpi_status status; | 153 | acpi_status status; |
154 | acpi_native_uint i; | 154 | u32 i; |
155 | 155 | ||
156 | ACPI_FUNCTION_TRACE(ev_initialize_op_regions); | 156 | ACPI_FUNCTION_TRACE(ev_initialize_op_regions); |
157 | 157 | ||
@@ -219,7 +219,6 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) | |||
219 | info->prefix_node = region_obj2->extra.method_REG; | 219 | info->prefix_node = region_obj2->extra.method_REG; |
220 | info->pathname = NULL; | 220 | info->pathname = NULL; |
221 | info->parameters = args; | 221 | info->parameters = args; |
222 | info->parameter_type = ACPI_PARAM_ARGS; | ||
223 | info->flags = ACPI_IGNORE_RETURN_VALUE; | 222 | info->flags = ACPI_IGNORE_RETURN_VALUE; |
224 | 223 | ||
225 | /* | 224 | /* |
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c index 2e3d2c5e4f4d..6b94b38df07d 100644 --- a/drivers/acpi/events/evrgnini.c +++ b/drivers/acpi/events/evrgnini.c | |||
@@ -380,7 +380,7 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) | |||
380 | acpi_status status; | 380 | acpi_status status; |
381 | struct acpica_device_id hid; | 381 | struct acpica_device_id hid; |
382 | struct acpi_compatible_id_list *cid; | 382 | struct acpi_compatible_id_list *cid; |
383 | acpi_native_uint i; | 383 | u32 i; |
384 | 384 | ||
385 | /* | 385 | /* |
386 | * Get the _HID and check for a PCI Root Bridge | 386 | * Get the _HID and check for a PCI Root Bridge |
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c index 99a7502e6a87..73bfd6bf962f 100644 --- a/drivers/acpi/events/evxfevnt.c +++ b/drivers/acpi/events/evxfevnt.c | |||
@@ -472,7 +472,6 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | |||
472 | } | 472 | } |
473 | 473 | ||
474 | ACPI_EXPORT_SYMBOL(acpi_clear_gpe) | 474 | ACPI_EXPORT_SYMBOL(acpi_clear_gpe) |
475 | #ifdef ACPI_FUTURE_USAGE | ||
476 | /******************************************************************************* | 475 | /******************************************************************************* |
477 | * | 476 | * |
478 | * FUNCTION: acpi_get_event_status | 477 | * FUNCTION: acpi_get_event_status |
@@ -489,6 +488,7 @@ ACPI_EXPORT_SYMBOL(acpi_clear_gpe) | |||
489 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) | 488 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) |
490 | { | 489 | { |
491 | acpi_status status = AE_OK; | 490 | acpi_status status = AE_OK; |
491 | u32 value; | ||
492 | 492 | ||
493 | ACPI_FUNCTION_TRACE(acpi_get_event_status); | 493 | ACPI_FUNCTION_TRACE(acpi_get_event_status); |
494 | 494 | ||
@@ -506,7 +506,20 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) | |||
506 | 506 | ||
507 | status = | 507 | status = |
508 | acpi_get_register(acpi_gbl_fixed_event_info[event]. | 508 | acpi_get_register(acpi_gbl_fixed_event_info[event]. |
509 | status_register_id, event_status); | 509 | enable_register_id, &value); |
510 | if (ACPI_FAILURE(status)) | ||
511 | return_ACPI_STATUS(status); | ||
512 | |||
513 | *event_status = value; | ||
514 | |||
515 | status = | ||
516 | acpi_get_register(acpi_gbl_fixed_event_info[event]. | ||
517 | status_register_id, &value); | ||
518 | if (ACPI_FAILURE(status)) | ||
519 | return_ACPI_STATUS(status); | ||
520 | |||
521 | if (value) | ||
522 | *event_status |= ACPI_EVENT_FLAG_SET; | ||
510 | 523 | ||
511 | return_ACPI_STATUS(status); | 524 | return_ACPI_STATUS(status); |
512 | } | 525 | } |
@@ -566,7 +579,6 @@ acpi_get_gpe_status(acpi_handle gpe_device, | |||
566 | } | 579 | } |
567 | 580 | ||
568 | ACPI_EXPORT_SYMBOL(acpi_get_gpe_status) | 581 | ACPI_EXPORT_SYMBOL(acpi_get_gpe_status) |
569 | #endif /* ACPI_FUTURE_USAGE */ | ||
570 | /******************************************************************************* | 582 | /******************************************************************************* |
571 | * | 583 | * |
572 | * FUNCTION: acpi_install_gpe_block | 584 | * FUNCTION: acpi_install_gpe_block |