diff options
author | Lin Ming <ming.m.lin@intel.com> | 2010-12-13 00:38:46 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-01-12 04:24:41 -0500 |
commit | 8b6cd8ad18def34bfc5045b2a0234329bf94cf78 (patch) | |
tree | 659d2951081b7dd2c09fe63bc569da5555795bbd /drivers | |
parent | 3a37898d507794cfc68a092303e02651d3f01308 (diff) |
ACPICA: New GPE handler callback definition
The new GPE handler callback has 2 additional parameters, gpe_device and
gpe_number.
typedef
u32 (*acpi_gpe_handler) (acpi_handle gpe_device, u32 gpe_number, void *context);
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/acpica/acevents.h | 3 | ||||
-rw-r--r-- | drivers/acpi/acpica/aclocal.h | 6 | ||||
-rw-r--r-- | drivers/acpi/acpica/evgpe.c | 14 | ||||
-rw-r--r-- | drivers/acpi/acpica/evxface.c | 10 | ||||
-rw-r--r-- | drivers/acpi/ec.c | 3 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 3 |
6 files changed, 24 insertions, 15 deletions
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h index ce2af07f62b3..ebb467fe3678 100644 --- a/drivers/acpi/acpica/acevents.h +++ b/drivers/acpi/acpica/acevents.h | |||
@@ -112,7 +112,8 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
112 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); | 112 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); |
113 | 113 | ||
114 | u32 | 114 | u32 |
115 | acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, | 115 | acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, |
116 | struct acpi_gpe_event_info *gpe_event_info, | ||
116 | u32 gpe_number); | 117 | u32 gpe_number); |
117 | 118 | ||
118 | /* | 119 | /* |
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index 2f841d019a3a..6a71f8e673e9 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h | |||
@@ -408,8 +408,8 @@ struct acpi_predefined_data { | |||
408 | 408 | ||
409 | /* Dispatch info for each GPE -- either a method or handler, cannot be both */ | 409 | /* Dispatch info for each GPE -- either a method or handler, cannot be both */ |
410 | 410 | ||
411 | struct acpi_handler_info { | 411 | struct acpi_gpe_handler_info { |
412 | acpi_event_handler address; /* Address of handler, if any */ | 412 | acpi_gpe_handler address; /* Address of handler, if any */ |
413 | void *context; /* Context to be passed to handler */ | 413 | void *context; /* Context to be passed to handler */ |
414 | struct acpi_namespace_node *method_node; /* Method node for this GPE level (saved) */ | 414 | struct acpi_namespace_node *method_node; /* Method node for this GPE level (saved) */ |
415 | u8 original_flags; /* Original (pre-handler) GPE info */ | 415 | u8 original_flags; /* Original (pre-handler) GPE info */ |
@@ -418,7 +418,7 @@ struct acpi_handler_info { | |||
418 | 418 | ||
419 | union acpi_gpe_dispatch_info { | 419 | union acpi_gpe_dispatch_info { |
420 | struct acpi_namespace_node *method_node; /* Method node for this GPE level */ | 420 | struct acpi_namespace_node *method_node; /* Method node for this GPE level */ |
421 | struct acpi_handler_info *handler; /* Installed GPE handler */ | 421 | struct acpi_gpe_handler_info *handler; /* Installed GPE handler */ |
422 | }; | 422 | }; |
423 | 423 | ||
424 | /* | 424 | /* |
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 005c170d2448..3fb621eec2fa 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c | |||
@@ -409,7 +409,9 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) | |||
409 | * or method. | 409 | * or method. |
410 | */ | 410 | */ |
411 | int_status |= | 411 | int_status |= |
412 | acpi_ev_gpe_dispatch(&gpe_block-> | 412 | acpi_ev_gpe_dispatch(gpe_block-> |
413 | node, | ||
414 | &gpe_block-> | ||
413 | event_info[((acpi_size) i * ACPI_GPE_REGISTER_WIDTH) + j], j + gpe_register_info->base_gpe_number); | 415 | event_info[((acpi_size) i * ACPI_GPE_REGISTER_WIDTH) + j], j + gpe_register_info->base_gpe_number); |
414 | } | 416 | } |
415 | } | 417 | } |
@@ -542,7 +544,8 @@ static void acpi_ev_asynch_enable_gpe(void *context) | |||
542 | * | 544 | * |
543 | * FUNCTION: acpi_ev_gpe_dispatch | 545 | * FUNCTION: acpi_ev_gpe_dispatch |
544 | * | 546 | * |
545 | * PARAMETERS: gpe_event_info - Info for this GPE | 547 | * PARAMETERS: gpe_device - Device node. NULL for GPE0/GPE1 |
548 | * gpe_event_info - Info for this GPE | ||
546 | * gpe_number - Number relative to the parent GPE block | 549 | * gpe_number - Number relative to the parent GPE block |
547 | * | 550 | * |
548 | * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED | 551 | * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED |
@@ -555,7 +558,8 @@ static void acpi_ev_asynch_enable_gpe(void *context) | |||
555 | ******************************************************************************/ | 558 | ******************************************************************************/ |
556 | 559 | ||
557 | u32 | 560 | u32 |
558 | acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | 561 | acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, |
562 | struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | ||
559 | { | 563 | { |
560 | acpi_status status; | 564 | acpi_status status; |
561 | 565 | ||
@@ -593,7 +597,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
593 | * Ignore return status for now. | 597 | * Ignore return status for now. |
594 | * TBD: leave GPE disabled on error? | 598 | * TBD: leave GPE disabled on error? |
595 | */ | 599 | */ |
596 | (void)gpe_event_info->dispatch.handler->address(gpe_event_info-> | 600 | (void)gpe_event_info->dispatch.handler->address(gpe_device, |
601 | gpe_number, | ||
602 | gpe_event_info-> | ||
597 | dispatch. | 603 | dispatch. |
598 | handler-> | 604 | handler-> |
599 | context); | 605 | context); |
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index 042a6d69f38e..d193b905dfa2 100644 --- a/drivers/acpi/acpica/evxface.c +++ b/drivers/acpi/acpica/evxface.c | |||
@@ -671,10 +671,10 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler) | |||
671 | acpi_status | 671 | acpi_status |
672 | acpi_install_gpe_handler(acpi_handle gpe_device, | 672 | acpi_install_gpe_handler(acpi_handle gpe_device, |
673 | u32 gpe_number, | 673 | u32 gpe_number, |
674 | u32 type, acpi_event_handler address, void *context) | 674 | u32 type, acpi_gpe_handler address, void *context) |
675 | { | 675 | { |
676 | struct acpi_gpe_event_info *gpe_event_info; | 676 | struct acpi_gpe_event_info *gpe_event_info; |
677 | struct acpi_handler_info *handler; | 677 | struct acpi_gpe_handler_info *handler; |
678 | acpi_status status; | 678 | acpi_status status; |
679 | acpi_cpu_flags flags; | 679 | acpi_cpu_flags flags; |
680 | 680 | ||
@@ -693,7 +693,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
693 | 693 | ||
694 | /* Allocate memory for the handler object */ | 694 | /* Allocate memory for the handler object */ |
695 | 695 | ||
696 | handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_handler_info)); | 696 | handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_handler_info)); |
697 | if (!handler) { | 697 | if (!handler) { |
698 | status = AE_NO_MEMORY; | 698 | status = AE_NO_MEMORY; |
699 | goto unlock_and_exit; | 699 | goto unlock_and_exit; |
@@ -777,10 +777,10 @@ ACPI_EXPORT_SYMBOL(acpi_install_gpe_handler) | |||
777 | ******************************************************************************/ | 777 | ******************************************************************************/ |
778 | acpi_status | 778 | acpi_status |
779 | acpi_remove_gpe_handler(acpi_handle gpe_device, | 779 | acpi_remove_gpe_handler(acpi_handle gpe_device, |
780 | u32 gpe_number, acpi_event_handler address) | 780 | u32 gpe_number, acpi_gpe_handler address) |
781 | { | 781 | { |
782 | struct acpi_gpe_event_info *gpe_event_info; | 782 | struct acpi_gpe_event_info *gpe_event_info; |
783 | struct acpi_handler_info *handler; | 783 | struct acpi_gpe_handler_info *handler; |
784 | acpi_status status; | 784 | acpi_status status; |
785 | acpi_cpu_flags flags; | 785 | acpi_cpu_flags flags; |
786 | 786 | ||
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 302b31ed31f1..81887724de80 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -606,7 +606,8 @@ static int ec_check_sci(struct acpi_ec *ec, u8 state) | |||
606 | return 0; | 606 | return 0; |
607 | } | 607 | } |
608 | 608 | ||
609 | static u32 acpi_ec_gpe_handler(void *data) | 609 | static u32 acpi_ec_gpe_handler(acpi_handle gpe_device, |
610 | u32 gpe_number, void *data) | ||
610 | { | 611 | { |
611 | struct acpi_ec *ec = data; | 612 | struct acpi_ec *ec = data; |
612 | 613 | ||
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 035da9e64a17..c4bacc6ec450 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -1928,7 +1928,8 @@ static void __devinit hardcode_find_bmc(void) | |||
1928 | static int acpi_failure; | 1928 | static int acpi_failure; |
1929 | 1929 | ||
1930 | /* For GPE-type interrupts. */ | 1930 | /* For GPE-type interrupts. */ |
1931 | static u32 ipmi_acpi_gpe(void *context) | 1931 | static u32 ipmi_acpi_gpe(acpi_handle gpe_device, |
1932 | u32 gpe_number, void *context) | ||
1932 | { | 1933 | { |
1933 | struct smi_info *smi_info = context; | 1934 | struct smi_info *smi_info = context; |
1934 | unsigned long flags; | 1935 | unsigned long flags; |