aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/events
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff)
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index" argument to an ASL function was still (internally) 32 bits instead of the required 64 bits. This was the Index argument to the Index, Mid, and Match operators. The "strupr" function is now permanently local (acpi_ut_strupr), since this is not a POSIX-defined function and not present in most kernel-level C libraries. References to the C library strupr function have been removed from the headers. Completed the deployment of static functions/prototypes. All prototypes with the static attribute have been moved from the headers to the owning C file. ACPICA 20050329 from Bob Moore An error is now generated if an attempt is made to create a Buffer Field of length zero (A CreateField with a length operand of zero.) The interpreter now issues a warning whenever executable code at the module level is detected during ACPI table load. This will give some idea of the prevalence of this type of code. Implemented support for references to named objects (other than control methods) within package objects. Enhanced package object output for the debug object. Package objects are now completely dumped, showing all elements. Enhanced miscellaneous object output for the debug object. Any object can now be written to the debug object (for example, a device object can be written, and the type of the object will be displayed.) The "static" qualifier has been added to all local functions across the core subsystem. The number of "long" lines (> 80 chars) within the source has been significantly reduced, by about 1/3. Cleaned up all header files to ensure that all CA/iASL functions are prototyped (even static functions) and the formatting is consistent. Two new header files have been added, acopcode.h and acnames.h. Removed several obsolete functions that were no longer used. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/events')
-rw-r--r--drivers/acpi/events/evevent.c33
-rw-r--r--drivers/acpi/events/evgpe.c39
-rw-r--r--drivers/acpi/events/evgpeblk.c63
-rw-r--r--drivers/acpi/events/evmisc.c97
-rw-r--r--drivers/acpi/events/evregion.c35
-rw-r--r--drivers/acpi/events/evrgnini.c14
-rw-r--r--drivers/acpi/events/evsci.c12
-rw-r--r--drivers/acpi/events/evxface.c19
-rw-r--r--drivers/acpi/events/evxfevnt.c25
9 files changed, 234 insertions, 103 deletions
diff --git a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c
index 2a213604ae51..dd3a72a869f4 100644
--- a/drivers/acpi/events/evevent.c
+++ b/drivers/acpi/events/evevent.c
@@ -47,6 +47,16 @@
47#define _COMPONENT ACPI_EVENTS 47#define _COMPONENT ACPI_EVENTS
48 ACPI_MODULE_NAME ("evevent") 48 ACPI_MODULE_NAME ("evevent")
49 49
50/* Local prototypes */
51
52static acpi_status
53acpi_ev_fixed_event_initialize (
54 void);
55
56static u32
57acpi_ev_fixed_event_dispatch (
58 u32 event);
59
50 60
51/******************************************************************************* 61/*******************************************************************************
52 * 62 *
@@ -56,7 +66,7 @@
56 * 66 *
57 * RETURN: Status 67 * RETURN: Status
58 * 68 *
59 * DESCRIPTION: Initialize global data structures for events. 69 * DESCRIPTION: Initialize global data structures for ACPI events (Fixed, GPE)
60 * 70 *
61 ******************************************************************************/ 71 ******************************************************************************/
62 72
@@ -78,9 +88,9 @@ acpi_ev_initialize_events (
78 } 88 }
79 89
80 /* 90 /*
81 * Initialize the Fixed and General Purpose Events. This is 91 * Initialize the Fixed and General Purpose Events. This is done prior to
82 * done prior to enabling SCIs to prevent interrupts from 92 * enabling SCIs to prevent interrupts from occurring before the handlers are
83 * occurring before handers are installed. 93 * installed.
84 */ 94 */
85 status = acpi_ev_fixed_event_initialize (); 95 status = acpi_ev_fixed_event_initialize ();
86 if (ACPI_FAILURE (status)) { 96 if (ACPI_FAILURE (status)) {
@@ -161,7 +171,7 @@ acpi_ev_install_xrupt_handlers (
161 * 171 *
162 ******************************************************************************/ 172 ******************************************************************************/
163 173
164acpi_status 174static acpi_status
165acpi_ev_fixed_event_initialize ( 175acpi_ev_fixed_event_initialize (
166 void) 176 void)
167{ 177{
@@ -180,7 +190,8 @@ acpi_ev_fixed_event_initialize (
180 /* Enable the fixed event */ 190 /* Enable the fixed event */
181 191
182 if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) { 192 if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) {
183 status = acpi_set_register (acpi_gbl_fixed_event_info[i].enable_register_id, 193 status = acpi_set_register (
194 acpi_gbl_fixed_event_info[i].enable_register_id,
184 0, ACPI_MTX_LOCK); 195 0, ACPI_MTX_LOCK);
185 if (ACPI_FAILURE (status)) { 196 if (ACPI_FAILURE (status)) {
186 return (status); 197 return (status);
@@ -200,7 +211,7 @@ acpi_ev_fixed_event_initialize (
200 * 211 *
201 * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED 212 * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
202 * 213 *
203 * DESCRIPTION: Checks the PM status register for fixed events 214 * DESCRIPTION: Checks the PM status register for active fixed events
204 * 215 *
205 ******************************************************************************/ 216 ******************************************************************************/
206 217
@@ -221,8 +232,10 @@ acpi_ev_fixed_event_detect (
221 * Read the fixed feature status and enable registers, as all the cases 232 * Read the fixed feature status and enable registers, as all the cases
222 * depend on their values. Ignore errors here. 233 * depend on their values. Ignore errors here.
223 */ 234 */
224 (void) acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS, &fixed_status); 235 (void) acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS,
225 (void) acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_ENABLE, &fixed_enable); 236 &fixed_status);
237 (void) acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_ENABLE,
238 &fixed_enable);
226 239
227 ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, 240 ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
228 "Fixed Event Block: Enable %08X Status %08X\n", 241 "Fixed Event Block: Enable %08X Status %08X\n",
@@ -259,7 +272,7 @@ acpi_ev_fixed_event_detect (
259 * 272 *
260 ******************************************************************************/ 273 ******************************************************************************/
261 274
262u32 275static u32
263acpi_ev_fixed_event_dispatch ( 276acpi_ev_fixed_event_dispatch (
264 u32 event) 277 u32 event)
265{ 278{
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
index 118d72ac7c76..081120b109ba 100644
--- a/drivers/acpi/events/evgpe.c
+++ b/drivers/acpi/events/evgpe.c
@@ -48,6 +48,12 @@
48#define _COMPONENT ACPI_EVENTS 48#define _COMPONENT ACPI_EVENTS
49 ACPI_MODULE_NAME ("evgpe") 49 ACPI_MODULE_NAME ("evgpe")
50 50
51/* Local prototypes */
52
53static void ACPI_SYSTEM_XFACE
54acpi_ev_asynch_execute_gpe_method (
55 void *context);
56
51 57
52/******************************************************************************* 58/*******************************************************************************
53 * 59 *
@@ -335,8 +341,10 @@ acpi_ev_get_gpe_event_info (
335 gpe_block = acpi_gbl_gpe_fadt_blocks[i]; 341 gpe_block = acpi_gbl_gpe_fadt_blocks[i];
336 if (gpe_block) { 342 if (gpe_block) {
337 if ((gpe_number >= gpe_block->block_base_number) && 343 if ((gpe_number >= gpe_block->block_base_number) &&
338 (gpe_number < gpe_block->block_base_number + (gpe_block->register_count * 8))) { 344 (gpe_number < gpe_block->block_base_number +
339 return (&gpe_block->event_info[gpe_number - gpe_block->block_base_number]); 345 (gpe_block->register_count * 8))) {
346 return (&gpe_block->event_info[gpe_number -
347 gpe_block->block_base_number]);
340 } 348 }
341 } 349 }
342 } 350 }
@@ -437,7 +445,7 @@ acpi_ev_gpe_detect (
437 "Read GPE Register at GPE%X: Status=%02X, Enable=%02X\n", 445 "Read GPE Register at GPE%X: Status=%02X, Enable=%02X\n",
438 gpe_register_info->base_gpe_number, status_reg, enable_reg)); 446 gpe_register_info->base_gpe_number, status_reg, enable_reg));
439 447
440 /* First check if there is anything active at all in this register */ 448 /* Check if there is anything active at all in this register */
441 449
442 enabled_status_byte = (u8) (status_reg & enable_reg); 450 enabled_status_byte = (u8) (status_reg & enable_reg);
443 if (!enabled_status_byte) { 451 if (!enabled_status_byte) {
@@ -457,8 +465,8 @@ acpi_ev_gpe_detect (
457 * or method. 465 * or method.
458 */ 466 */
459 int_status |= acpi_ev_gpe_dispatch ( 467 int_status |= acpi_ev_gpe_dispatch (
460 &gpe_block->event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j], 468 &gpe_block->event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j],
461 (u32) j + gpe_register_info->base_gpe_number); 469 (u32) j + gpe_register_info->base_gpe_number);
462 } 470 }
463 } 471 }
464 } 472 }
@@ -523,7 +531,8 @@ acpi_ev_asynch_execute_gpe_method (
523 * Take a snapshot of the GPE info for this level - we copy the 531 * Take a snapshot of the GPE info for this level - we copy the
524 * info to prevent a race condition with remove_handler/remove_block. 532 * info to prevent a race condition with remove_handler/remove_block.
525 */ 533 */
526 ACPI_MEMCPY (&local_gpe_event_info, gpe_event_info, sizeof (struct acpi_gpe_event_info)); 534 ACPI_MEMCPY (&local_gpe_event_info, gpe_event_info,
535 sizeof (struct acpi_gpe_event_info));
527 536
528 status = acpi_ut_release_mutex (ACPI_MTX_EVENTS); 537 status = acpi_ut_release_mutex (ACPI_MTX_EVENTS);
529 if (ACPI_FAILURE (status)) { 538 if (ACPI_FAILURE (status)) {
@@ -534,7 +543,8 @@ acpi_ev_asynch_execute_gpe_method (
534 * Must check for control method type dispatch one more 543 * Must check for control method type dispatch one more
535 * time to avoid race with ev_gpe_install_handler 544 * time to avoid race with ev_gpe_install_handler
536 */ 545 */
537 if ((local_gpe_event_info.flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_METHOD) { 546 if ((local_gpe_event_info.flags & ACPI_GPE_DISPATCH_MASK) ==
547 ACPI_GPE_DISPATCH_METHOD) {
538 /* 548 /*
539 * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx 549 * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx
540 * control method that corresponds to this GPE 550 * control method that corresponds to this GPE
@@ -553,7 +563,8 @@ acpi_ev_asynch_execute_gpe_method (
553 } 563 }
554 } 564 }
555 565
556 if ((local_gpe_event_info.flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_LEVEL_TRIGGERED) { 566 if ((local_gpe_event_info.flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
567 ACPI_GPE_LEVEL_TRIGGERED) {
557 /* 568 /*
558 * GPE is level-triggered, we clear the GPE status bit after 569 * GPE is level-triggered, we clear the GPE status bit after
559 * handling the event. 570 * handling the event.
@@ -575,7 +586,7 @@ acpi_ev_asynch_execute_gpe_method (
575 * 586 *
576 * FUNCTION: acpi_ev_gpe_dispatch 587 * FUNCTION: acpi_ev_gpe_dispatch
577 * 588 *
578 * PARAMETERS: gpe_event_info - info for this GPE 589 * PARAMETERS: gpe_event_info - Info for this GPE
579 * gpe_number - Number relative to the parent GPE block 590 * gpe_number - Number relative to the parent GPE block
580 * 591 *
581 * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED 592 * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
@@ -602,10 +613,12 @@ acpi_ev_gpe_dispatch (
602 * If edge-triggered, clear the GPE status bit now. Note that 613 * If edge-triggered, clear the GPE status bit now. Note that
603 * level-triggered events are cleared after the GPE is serviced. 614 * level-triggered events are cleared after the GPE is serviced.
604 */ 615 */
605 if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_EDGE_TRIGGERED) { 616 if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
617 ACPI_GPE_EDGE_TRIGGERED) {
606 status = acpi_hw_clear_gpe (gpe_event_info); 618 status = acpi_hw_clear_gpe (gpe_event_info);
607 if (ACPI_FAILURE (status)) { 619 if (ACPI_FAILURE (status)) {
608 ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: %s, Unable to clear GPE[%2X]\n", 620 ACPI_REPORT_ERROR ((
621 "acpi_ev_gpe_dispatch: %s, Unable to clear GPE[%2X]\n",
609 acpi_format_exception (status), gpe_number)); 622 acpi_format_exception (status), gpe_number));
610 return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); 623 return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
611 } 624 }
@@ -639,7 +652,8 @@ acpi_ev_gpe_dispatch (
639 652
640 /* It is now safe to clear level-triggered events. */ 653 /* It is now safe to clear level-triggered events. */
641 654
642 if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_LEVEL_TRIGGERED) { 655 if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
656 ACPI_GPE_LEVEL_TRIGGERED) {
643 status = acpi_hw_clear_gpe (gpe_event_info); 657 status = acpi_hw_clear_gpe (gpe_event_info);
644 if (ACPI_FAILURE (status)) { 658 if (ACPI_FAILURE (status)) {
645 ACPI_REPORT_ERROR (( 659 ACPI_REPORT_ERROR ((
@@ -704,7 +718,6 @@ acpi_ev_gpe_dispatch (
704 718
705 719
706#ifdef ACPI_GPE_NOTIFY_CHECK 720#ifdef ACPI_GPE_NOTIFY_CHECK
707
708/******************************************************************************* 721/*******************************************************************************
709 * TBD: NOT USED, PROTOTYPE ONLY AND WILL PROBABLY BE REMOVED 722 * TBD: NOT USED, PROTOTYPE ONLY AND WILL PROBABLY BE REMOVED
710 * 723 *
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index 00d981f53c6a..84186a7d17b2 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -48,6 +48,39 @@
48#define _COMPONENT ACPI_EVENTS 48#define _COMPONENT ACPI_EVENTS
49 ACPI_MODULE_NAME ("evgpeblk") 49 ACPI_MODULE_NAME ("evgpeblk")
50 50
51/* Local prototypes */
52
53static acpi_status
54acpi_ev_save_method_info (
55 acpi_handle obj_handle,
56 u32 level,
57 void *obj_desc,
58 void **return_value);
59
60static acpi_status
61acpi_ev_match_prw_and_gpe (
62 acpi_handle obj_handle,
63 u32 level,
64 void *info,
65 void **return_value);
66
67static struct acpi_gpe_xrupt_info *
68acpi_ev_get_gpe_xrupt_block (
69 u32 interrupt_level);
70
71static acpi_status
72acpi_ev_delete_gpe_xrupt (
73 struct acpi_gpe_xrupt_info *gpe_xrupt);
74
75static acpi_status
76acpi_ev_install_gpe_block (
77 struct acpi_gpe_block_info *gpe_block,
78 u32 interrupt_level);
79
80static acpi_status
81acpi_ev_create_gpe_info_blocks (
82 struct acpi_gpe_block_info *gpe_block);
83
51 84
52/******************************************************************************* 85/*******************************************************************************
53 * 86 *
@@ -155,7 +188,7 @@ unlock_and_exit:
155} 188}
156 189
157 190
158/****************************************************************************** 191/*******************************************************************************
159 * 192 *
160 * FUNCTION: acpi_ev_delete_gpe_handlers 193 * FUNCTION: acpi_ev_delete_gpe_handlers
161 * 194 *
@@ -190,7 +223,8 @@ acpi_ev_delete_gpe_handlers (
190 for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { 223 for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) {
191 gpe_event_info = &gpe_block->event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j]; 224 gpe_event_info = &gpe_block->event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j];
192 225
193 if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_HANDLER) { 226 if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
227 ACPI_GPE_DISPATCH_HANDLER) {
194 ACPI_MEM_FREE (gpe_event_info->dispatch.handler); 228 ACPI_MEM_FREE (gpe_event_info->dispatch.handler);
195 gpe_event_info->dispatch.handler = NULL; 229 gpe_event_info->dispatch.handler = NULL;
196 gpe_event_info->flags &= ~ACPI_GPE_DISPATCH_MASK; 230 gpe_event_info->flags &= ~ACPI_GPE_DISPATCH_MASK;
@@ -471,7 +505,7 @@ acpi_ev_get_gpe_xrupt_block (
471 ACPI_FUNCTION_TRACE ("ev_get_gpe_xrupt_block"); 505 ACPI_FUNCTION_TRACE ("ev_get_gpe_xrupt_block");
472 506
473 507
474 /* No need for spin lock since we are not changing any list elements here */ 508 /* No need for lock since we are not changing any list elements here */
475 509
476 next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head; 510 next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
477 while (next_gpe_xrupt) { 511 while (next_gpe_xrupt) {
@@ -619,7 +653,7 @@ acpi_ev_install_gpe_block (
619 goto unlock_and_exit; 653 goto unlock_and_exit;
620 } 654 }
621 655
622 /* Install the new block at the end of the list for this interrupt with lock */ 656 /* Install the new block at the end of the list with lock */
623 657
624 acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 658 acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
625 if (gpe_xrupt_block->gpe_block_list_head) { 659 if (gpe_xrupt_block->gpe_block_list_head) {
@@ -756,10 +790,12 @@ acpi_ev_create_gpe_info_blocks (
756 * per register. Initialization to zeros is sufficient. 790 * per register. Initialization to zeros is sufficient.
757 */ 791 */
758 gpe_event_info = ACPI_MEM_CALLOCATE ( 792 gpe_event_info = ACPI_MEM_CALLOCATE (
759 ((acpi_size) gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) * 793 ((acpi_size) gpe_block->register_count *
794 ACPI_GPE_REGISTER_WIDTH) *
760 sizeof (struct acpi_gpe_event_info)); 795 sizeof (struct acpi_gpe_event_info));
761 if (!gpe_event_info) { 796 if (!gpe_event_info) {
762 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not allocate the gpe_event_info table\n")); 797 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
798 "Could not allocate the gpe_event_info table\n"));
763 status = AE_NO_MEMORY; 799 status = AE_NO_MEMORY;
764 goto error_exit; 800 goto error_exit;
765 } 801 }
@@ -899,7 +935,8 @@ acpi_ev_create_gpe_block (
899 gpe_block->block_base_number = gpe_block_base_number; 935 gpe_block->block_base_number = gpe_block_base_number;
900 gpe_block->node = gpe_device; 936 gpe_block->node = gpe_device;
901 937
902 ACPI_MEMCPY (&gpe_block->block_address, gpe_block_address, sizeof (struct acpi_generic_address)); 938 ACPI_MEMCPY (&gpe_block->block_address, gpe_block_address,
939 sizeof (struct acpi_generic_address));
903 940
904 /* Create the register_info and event_info sub-structures */ 941 /* Create the register_info and event_info sub-structures */
905 942
@@ -1061,8 +1098,9 @@ acpi_ev_gpe_initialize (
1061 1098
1062 /* Install GPE Block 0 */ 1099 /* Install GPE Block 0 */
1063 1100
1064 status = acpi_ev_create_gpe_block (acpi_gbl_fadt_gpe_device, &acpi_gbl_FADT->xgpe0_blk, 1101 status = acpi_ev_create_gpe_block (acpi_gbl_fadt_gpe_device,
1065 register_count0, 0, acpi_gbl_FADT->sci_int, &acpi_gbl_gpe_fadt_blocks[0]); 1102 &acpi_gbl_FADT->xgpe0_blk, register_count0, 0,
1103 acpi_gbl_FADT->sci_int, &acpi_gbl_gpe_fadt_blocks[0]);
1066 1104
1067 if (ACPI_FAILURE (status)) { 1105 if (ACPI_FAILURE (status)) {
1068 ACPI_REPORT_ERROR (( 1106 ACPI_REPORT_ERROR ((
@@ -1094,8 +1132,9 @@ acpi_ev_gpe_initialize (
1094 else { 1132 else {
1095 /* Install GPE Block 1 */ 1133 /* Install GPE Block 1 */
1096 1134
1097 status = acpi_ev_create_gpe_block (acpi_gbl_fadt_gpe_device, &acpi_gbl_FADT->xgpe1_blk, 1135 status = acpi_ev_create_gpe_block (acpi_gbl_fadt_gpe_device,
1098 register_count1, acpi_gbl_FADT->gpe1_base, 1136 &acpi_gbl_FADT->xgpe1_blk, register_count1,
1137 acpi_gbl_FADT->gpe1_base,
1099 acpi_gbl_FADT->sci_int, &acpi_gbl_gpe_fadt_blocks[1]); 1138 acpi_gbl_FADT->sci_int, &acpi_gbl_gpe_fadt_blocks[1]);
1100 1139
1101 if (ACPI_FAILURE (status)) { 1140 if (ACPI_FAILURE (status)) {
@@ -1109,7 +1148,7 @@ acpi_ev_gpe_initialize (
1109 * space. However, GPE0 always starts at GPE number zero. 1148 * space. However, GPE0 always starts at GPE number zero.
1110 */ 1149 */
1111 gpe_number_max = acpi_gbl_FADT->gpe1_base + 1150 gpe_number_max = acpi_gbl_FADT->gpe1_base +
1112 ((register_count1 * ACPI_GPE_REGISTER_WIDTH) - 1); 1151 ((register_count1 * ACPI_GPE_REGISTER_WIDTH) - 1);
1113 } 1152 }
1114 } 1153 }
1115 1154
diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c
index 2548efa7a45f..659e90956112 100644
--- a/drivers/acpi/events/evmisc.c
+++ b/drivers/acpi/events/evmisc.c
@@ -50,6 +50,35 @@
50 ACPI_MODULE_NAME ("evmisc") 50 ACPI_MODULE_NAME ("evmisc")
51 51
52 52
53#ifdef ACPI_DEBUG_OUTPUT
54static const char *acpi_notify_value_names[] =
55{
56 "Bus Check",
57 "Device Check",
58 "Device Wake",
59 "Eject request",
60 "Device Check Light",
61 "Frequency Mismatch",
62 "Bus Mode Mismatch",
63 "Power Fault"
64};
65#endif
66
67/* Local prototypes */
68
69static void ACPI_SYSTEM_XFACE
70acpi_ev_notify_dispatch (
71 void *context);
72
73static void ACPI_SYSTEM_XFACE
74acpi_ev_global_lock_thread (
75 void *context);
76
77static u32
78acpi_ev_global_lock_handler (
79 void *context);
80
81
53/******************************************************************************* 82/*******************************************************************************
54 * 83 *
55 * FUNCTION: acpi_ev_is_notify_object 84 * FUNCTION: acpi_ev_is_notify_object
@@ -98,20 +127,6 @@ acpi_ev_is_notify_object (
98 * 127 *
99 ******************************************************************************/ 128 ******************************************************************************/
100 129
101#ifdef ACPI_DEBUG_OUTPUT
102static const char *acpi_notify_value_names[] =
103{
104 "Bus Check",
105 "Device Check",
106 "Device Wake",
107 "Eject request",
108 "Device Check Light",
109 "Frequency Mismatch",
110 "Bus Mode Mismatch",
111 "Power Fault"
112};
113#endif
114
115acpi_status 130acpi_status
116acpi_ev_queue_notify_request ( 131acpi_ev_queue_notify_request (
117 struct acpi_namespace_node *node, 132 struct acpi_namespace_node *node,
@@ -128,9 +143,10 @@ acpi_ev_queue_notify_request (
128 143
129 /* 144 /*
130 * For value 3 (Ejection Request), some device method may need to be run. 145 * For value 3 (Ejection Request), some device method may need to be run.
131 * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need to be run. 146 * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need
147 * to be run.
132 * For value 0x80 (Status Change) on the power button or sleep button, 148 * For value 0x80 (Status Change) on the power button or sleep button,
133 * initiate soft-off or sleep operation? 149 * initiate soft-off or sleep operation?
134 */ 150 */
135 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 151 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
136 "Dispatching Notify(%X) on node %p\n", notify_value, node)); 152 "Dispatching Notify(%X) on node %p\n", notify_value, node));
@@ -140,8 +156,9 @@ acpi_ev_queue_notify_request (
140 acpi_notify_value_names[notify_value])); 156 acpi_notify_value_names[notify_value]));
141 } 157 }
142 else { 158 else {
143 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: 0x%2.2X **Device Specific**\n", 159 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
144 notify_value)); 160 "Notify value: 0x%2.2X **Device Specific**\n",
161 notify_value));
145 } 162 }
146 163
147 /* Get the notify object attached to the NS Node */ 164 /* Get the notify object attached to the NS Node */
@@ -210,7 +227,7 @@ acpi_ev_queue_notify_request (
210 * 227 *
211 * FUNCTION: acpi_ev_notify_dispatch 228 * FUNCTION: acpi_ev_notify_dispatch
212 * 229 *
213 * PARAMETERS: Context - To be passsed to the notify handler 230 * PARAMETERS: Context - To be passed to the notify handler
214 * 231 *
215 * RETURN: None. 232 * RETURN: None.
216 * 233 *
@@ -219,7 +236,7 @@ acpi_ev_queue_notify_request (
219 * 236 *
220 ******************************************************************************/ 237 ******************************************************************************/
221 238
222void ACPI_SYSTEM_XFACE 239static void ACPI_SYSTEM_XFACE
223acpi_ev_notify_dispatch ( 240acpi_ev_notify_dispatch (
224 void *context) 241 void *context)
225{ 242{
@@ -234,7 +251,8 @@ acpi_ev_notify_dispatch (
234 251
235 /* 252 /*
236 * We will invoke a global notify handler if installed. 253 * We will invoke a global notify handler if installed.
237 * This is done _before_ we invoke the per-device handler attached to the device. 254 * This is done _before_ we invoke the per-device handler attached
255 * to the device.
238 */ 256 */
239 if (notify_info->notify.value <= ACPI_MAX_SYS_NOTIFY) { 257 if (notify_info->notify.value <= ACPI_MAX_SYS_NOTIFY) {
240 /* Global system notification handler */ 258 /* Global system notification handler */
@@ -256,15 +274,17 @@ acpi_ev_notify_dispatch (
256 /* Invoke the system handler first, if present */ 274 /* Invoke the system handler first, if present */
257 275
258 if (global_handler) { 276 if (global_handler) {
259 global_handler (notify_info->notify.node, notify_info->notify.value, global_context); 277 global_handler (notify_info->notify.node, notify_info->notify.value,
278 global_context);
260 } 279 }
261 280
262 /* Now invoke the per-device handler, if present */ 281 /* Now invoke the per-device handler, if present */
263 282
264 handler_obj = notify_info->notify.handler_obj; 283 handler_obj = notify_info->notify.handler_obj;
265 if (handler_obj) { 284 if (handler_obj) {
266 handler_obj->notify.handler (notify_info->notify.node, notify_info->notify.value, 285 handler_obj->notify.handler (notify_info->notify.node,
267 handler_obj->notify.context); 286 notify_info->notify.value,
287 handler_obj->notify.context);
268 } 288 }
269 289
270 /* All done with the info object */ 290 /* All done with the info object */
@@ -370,7 +390,8 @@ acpi_ev_global_lock_handler (
370 ******************************************************************************/ 390 ******************************************************************************/
371 391
372acpi_status 392acpi_status
373acpi_ev_init_global_lock_handler (void) 393acpi_ev_init_global_lock_handler (
394 void)
374{ 395{
375 acpi_status status; 396 acpi_status status;
376 397
@@ -380,7 +401,7 @@ acpi_ev_init_global_lock_handler (void)
380 401
381 acpi_gbl_global_lock_present = TRUE; 402 acpi_gbl_global_lock_present = TRUE;
382 status = acpi_install_fixed_event_handler (ACPI_EVENT_GLOBAL, 403 status = acpi_install_fixed_event_handler (ACPI_EVENT_GLOBAL,
383 acpi_ev_global_lock_handler, NULL); 404 acpi_ev_global_lock_handler, NULL);
384 405
385 /* 406 /*
386 * If the global lock does not exist on this platform, the attempt 407 * If the global lock does not exist on this platform, the attempt
@@ -433,8 +454,10 @@ acpi_ev_acquire_global_lock (
433 454
434 acpi_gbl_global_lock_thread_count++; 455 acpi_gbl_global_lock_thread_count++;
435 456
436 /* If we (OS side vs. BIOS side) have the hardware lock already, we are done */ 457 /*
437 458 * If we (OS side vs. BIOS side) have the hardware lock already,
459 * we are done
460 */
438 if (acpi_gbl_global_lock_acquired) { 461 if (acpi_gbl_global_lock_acquired) {
439 return_ACPI_STATUS (AE_OK); 462 return_ACPI_STATUS (AE_OK);
440 } 463 }
@@ -480,7 +503,8 @@ acpi_ev_acquire_global_lock (
480 ******************************************************************************/ 503 ******************************************************************************/
481 504
482acpi_status 505acpi_status
483acpi_ev_release_global_lock (void) 506acpi_ev_release_global_lock (
507 void)
484{ 508{
485 u8 pending = FALSE; 509 u8 pending = FALSE;
486 acpi_status status = AE_OK; 510 acpi_status status = AE_OK;
@@ -490,7 +514,8 @@ acpi_ev_release_global_lock (void)
490 514
491 515
492 if (!acpi_gbl_global_lock_thread_count) { 516 if (!acpi_gbl_global_lock_thread_count) {
493 ACPI_REPORT_WARNING(("Cannot release HW Global Lock, it has not been acquired\n")); 517 ACPI_REPORT_WARNING((
518 "Cannot release HW Global Lock, it has not been acquired\n"));
494 return_ACPI_STATUS (AE_NOT_ACQUIRED); 519 return_ACPI_STATUS (AE_NOT_ACQUIRED);
495 } 520 }
496 521
@@ -515,7 +540,8 @@ acpi_ev_release_global_lock (void)
515 * register 540 * register
516 */ 541 */
517 if (pending) { 542 if (pending) {
518 status = acpi_set_register (ACPI_BITREG_GLOBAL_LOCK_RELEASE, 1, ACPI_MTX_LOCK); 543 status = acpi_set_register (ACPI_BITREG_GLOBAL_LOCK_RELEASE,
544 1, ACPI_MTX_LOCK);
519 } 545 }
520 546
521 return_ACPI_STATUS (status); 547 return_ACPI_STATUS (status);
@@ -535,7 +561,8 @@ acpi_ev_release_global_lock (void)
535 ******************************************************************************/ 561 ******************************************************************************/
536 562
537void 563void
538acpi_ev_terminate (void) 564acpi_ev_terminate (
565 void)
539{ 566{
540 acpi_native_uint i; 567 acpi_native_uint i;
541 acpi_status status; 568 acpi_status status;
@@ -555,7 +582,8 @@ acpi_ev_terminate (void)
555 for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { 582 for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) {
556 status = acpi_disable_event ((u32) i, 0); 583 status = acpi_disable_event ((u32) i, 0);
557 if (ACPI_FAILURE (status)) { 584 if (ACPI_FAILURE (status)) {
558 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable fixed event %d\n", (u32) i)); 585 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
586 "Could not disable fixed event %d\n", (u32) i));
559 } 587 }
560 } 588 }
561 589
@@ -567,7 +595,8 @@ acpi_ev_terminate (void)
567 595
568 status = acpi_ev_remove_sci_handler (); 596 status = acpi_ev_remove_sci_handler ();
569 if (ACPI_FAILURE(status)) { 597 if (ACPI_FAILURE(status)) {
570 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not remove SCI handler\n")); 598 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
599 "Could not remove SCI handler\n"));
571 } 600 }
572 } 601 }
573 602
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c
index 772342708a7a..a1d7276c5742 100644
--- a/drivers/acpi/events/evregion.c
+++ b/drivers/acpi/events/evregion.c
@@ -58,6 +58,22 @@ static u8 acpi_gbl_default_address_spaces[ACPI_NUM_DEFAULT_SPA
58 ACPI_ADR_SPACE_PCI_CONFIG, 58 ACPI_ADR_SPACE_PCI_CONFIG,
59 ACPI_ADR_SPACE_DATA_TABLE}; 59 ACPI_ADR_SPACE_DATA_TABLE};
60 60
61/* Local prototypes */
62
63static acpi_status
64acpi_ev_reg_run (
65 acpi_handle obj_handle,
66 u32 level,
67 void *context,
68 void **return_value);
69
70static acpi_status
71acpi_ev_install_handler (
72 acpi_handle obj_handle,
73 u32 level,
74 void *context,
75 void **return_value);
76
61 77
62/******************************************************************************* 78/*******************************************************************************
63 * 79 *
@@ -179,8 +195,8 @@ acpi_ev_initialize_op_regions (
179 * 195 *
180 * FUNCTION: acpi_ev_execute_reg_method 196 * FUNCTION: acpi_ev_execute_reg_method
181 * 197 *
182 * PARAMETERS: region_obj - Object structure 198 * PARAMETERS: region_obj - Region object
183 * Function - Passed to _REG: On (1) or Off (0) 199 * Function - Passed to _REG: On (1) or Off (0)
184 * 200 *
185 * RETURN: Status 201 * RETURN: Status
186 * 202 *
@@ -323,14 +339,16 @@ acpi_ev_address_space_dispatch (
323 if (!region_setup) { 339 if (!region_setup) {
324 /* No initialization routine, exit with error */ 340 /* No initialization routine, exit with error */
325 341
326 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No init routine for region(%p) [%s]\n", 342 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
343 "No init routine for region(%p) [%s]\n",
327 region_obj, acpi_ut_get_region_name (region_obj->region.space_id))); 344 region_obj, acpi_ut_get_region_name (region_obj->region.space_id)));
328 return_ACPI_STATUS (AE_NOT_EXIST); 345 return_ACPI_STATUS (AE_NOT_EXIST);
329 } 346 }
330 347
331 /* 348 /*
332 * We must exit the interpreter because the region setup will potentially 349 * We must exit the interpreter because the region
333 * execute control methods (e.g., _REG method for this region) 350 * setup will potentially execute control methods
351 * (e.g., _REG method for this region)
334 */ 352 */
335 acpi_ex_exit_interpreter (); 353 acpi_ex_exit_interpreter ();
336 354
@@ -621,7 +639,7 @@ acpi_ev_attach_region (
621 * 639 *
622 ******************************************************************************/ 640 ******************************************************************************/
623 641
624acpi_status 642static acpi_status
625acpi_ev_install_handler ( 643acpi_ev_install_handler (
626 acpi_handle obj_handle, 644 acpi_handle obj_handle,
627 u32 level, 645 u32 level,
@@ -848,7 +866,8 @@ acpi_ev_install_space_handler (
848 if (handler_obj->address_space.handler == handler) { 866 if (handler_obj->address_space.handler == handler) {
849 /* 867 /*
850 * It is (relatively) OK to attempt to install the SAME 868 * It is (relatively) OK to attempt to install the SAME
851 * handler twice. This can easily happen with PCI_Config space. 869 * handler twice. This can easily happen
870 * with PCI_Config space.
852 */ 871 */
853 status = AE_SAME_HANDLER; 872 status = AE_SAME_HANDLER;
854 goto unlock_and_exit; 873 goto unlock_and_exit;
@@ -1011,7 +1030,7 @@ acpi_ev_execute_reg_methods (
1011 * 1030 *
1012 ******************************************************************************/ 1031 ******************************************************************************/
1013 1032
1014acpi_status 1033static acpi_status
1015acpi_ev_reg_run ( 1034acpi_ev_reg_run (
1016 acpi_handle obj_handle, 1035 acpi_handle obj_handle,
1017 u32 level, 1036 u32 level,
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c
index 4983a3378be5..95bc09c73a6a 100644
--- a/drivers/acpi/events/evrgnini.c
+++ b/drivers/acpi/events/evrgnini.c
@@ -61,7 +61,7 @@
61 * 61 *
62 * RETURN: Status 62 * RETURN: Status
63 * 63 *
64 * DESCRIPTION: Do any prep work for region handling, a nop for now 64 * DESCRIPTION: Setup a system_memory operation region
65 * 65 *
66 ******************************************************************************/ 66 ******************************************************************************/
67 67
@@ -115,7 +115,7 @@ acpi_ev_system_memory_region_setup (
115 * 115 *
116 * RETURN: Status 116 * RETURN: Status
117 * 117 *
118 * DESCRIPTION: Do any prep work for region handling 118 * DESCRIPTION: Setup a IO operation region
119 * 119 *
120 ******************************************************************************/ 120 ******************************************************************************/
121 121
@@ -144,14 +144,14 @@ acpi_ev_io_space_region_setup (
144 * 144 *
145 * FUNCTION: acpi_ev_pci_config_region_setup 145 * FUNCTION: acpi_ev_pci_config_region_setup
146 * 146 *
147 * PARAMETERS: Handle - Region we are interested in 147 * PARAMETERS: Handle - Region we are interested in
148 * Function - Start or stop 148 * Function - Start or stop
149 * handler_context - Address space handler context 149 * handler_context - Address space handler context
150 * region_context - Region specific context 150 * region_context - Region specific context
151 * 151 *
152 * RETURN: Status 152 * RETURN: Status
153 * 153 *
154 * DESCRIPTION: Do any prep work for region handling 154 * DESCRIPTION: Setup a PCI_Config operation region
155 * 155 *
156 * MUTEX: Assumes namespace is not locked 156 * MUTEX: Assumes namespace is not locked
157 * 157 *
@@ -324,7 +324,7 @@ acpi_ev_pci_config_region_setup (
324 * 324 *
325 * RETURN: Status 325 * RETURN: Status
326 * 326 *
327 * DESCRIPTION: Do any prep work for region handling 327 * DESCRIPTION: Setup a pci_bAR operation region
328 * 328 *
329 * MUTEX: Assumes namespace is not locked 329 * MUTEX: Assumes namespace is not locked
330 * 330 *
@@ -355,7 +355,7 @@ acpi_ev_pci_bar_region_setup (
355 * 355 *
356 * RETURN: Status 356 * RETURN: Status
357 * 357 *
358 * DESCRIPTION: Do any prep work for region handling 358 * DESCRIPTION: Setup a CMOS operation region
359 * 359 *
360 * MUTEX: Assumes namespace is not locked 360 * MUTEX: Assumes namespace is not locked
361 * 361 *
@@ -386,7 +386,7 @@ acpi_ev_cmos_region_setup (
386 * 386 *
387 * RETURN: Status 387 * RETURN: Status
388 * 388 *
389 * DESCRIPTION: Do any prep work for region handling 389 * DESCRIPTION: Default region initialization
390 * 390 *
391 ******************************************************************************/ 391 ******************************************************************************/
392 392
diff --git a/drivers/acpi/events/evsci.c b/drivers/acpi/events/evsci.c
index 46b31995c827..f3123c26ae98 100644
--- a/drivers/acpi/events/evsci.c
+++ b/drivers/acpi/events/evsci.c
@@ -49,6 +49,12 @@
49#define _COMPONENT ACPI_EVENTS 49#define _COMPONENT ACPI_EVENTS
50 ACPI_MODULE_NAME ("evsci") 50 ACPI_MODULE_NAME ("evsci")
51 51
52/* Local prototypes */
53
54static u32 ACPI_SYSTEM_XFACE
55acpi_ev_sci_xrupt_handler (
56 void *context);
57
52 58
53/******************************************************************************* 59/*******************************************************************************
54 * 60 *
@@ -146,7 +152,8 @@ acpi_ev_gpe_xrupt_handler (
146 ******************************************************************************/ 152 ******************************************************************************/
147 153
148u32 154u32
149acpi_ev_install_sci_handler (void) 155acpi_ev_install_sci_handler (
156 void)
150{ 157{
151 u32 status = AE_OK; 158 u32 status = AE_OK;
152 159
@@ -180,7 +187,8 @@ acpi_ev_install_sci_handler (void)
180 ******************************************************************************/ 187 ******************************************************************************/
181 188
182acpi_status 189acpi_status
183acpi_ev_remove_sci_handler (void) 190acpi_ev_remove_sci_handler (
191 void)
184{ 192{
185 acpi_status status; 193 acpi_status status;
186 194
diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c
index 0bfec10a5f1e..4092d47f6758 100644
--- a/drivers/acpi/events/evxface.c
+++ b/drivers/acpi/events/evxface.c
@@ -64,6 +64,7 @@
64 * DESCRIPTION: Saves the pointer to the handler function 64 * DESCRIPTION: Saves the pointer to the handler function
65 * 65 *
66 ******************************************************************************/ 66 ******************************************************************************/
67
67#ifdef ACPI_FUTURE_USAGE 68#ifdef ACPI_FUTURE_USAGE
68acpi_status 69acpi_status
69acpi_install_exception_handler ( 70acpi_install_exception_handler (
@@ -457,7 +458,8 @@ acpi_remove_notify_handler (
457 /* Root Object */ 458 /* Root Object */
458 459
459 if (device == ACPI_ROOT_OBJECT) { 460 if (device == ACPI_ROOT_OBJECT) {
460 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Removing notify handler for ROOT object.\n")); 461 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
462 "Removing notify handler for ROOT object.\n"));
461 463
462 if (((handler_type & ACPI_SYSTEM_NOTIFY) && 464 if (((handler_type & ACPI_SYSTEM_NOTIFY) &&
463 !acpi_gbl_system_notify.handler) || 465 !acpi_gbl_system_notify.handler) ||
@@ -564,8 +566,9 @@ EXPORT_SYMBOL(acpi_remove_notify_handler);
564 * 566 *
565 * FUNCTION: acpi_install_gpe_handler 567 * FUNCTION: acpi_install_gpe_handler
566 * 568 *
567 * PARAMETERS: gpe_number - The GPE number within the GPE block 569 * PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT
568 * gpe_block - GPE block (NULL == FADT GPEs) 570 * defined GPEs)
571 * gpe_number - The GPE number within the GPE block
569 * Type - Whether this GPE should be treated as an 572 * Type - Whether this GPE should be treated as an
570 * edge- or level-triggered interrupt. 573 * edge- or level-triggered interrupt.
571 * Address - Address of the handler 574 * Address - Address of the handler
@@ -662,8 +665,9 @@ EXPORT_SYMBOL(acpi_install_gpe_handler);
662 * 665 *
663 * FUNCTION: acpi_remove_gpe_handler 666 * FUNCTION: acpi_remove_gpe_handler
664 * 667 *
665 * PARAMETERS: gpe_number - The event to remove a handler 668 * PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT
666 * gpe_block - GPE block (NULL == FADT GPEs) 669 * defined GPEs)
670 * gpe_number - The event to remove a handler
667 * Address - Address of the handler 671 * Address - Address of the handler
668 * 672 *
669 * RETURN: Status 673 * RETURN: Status
@@ -766,7 +770,8 @@ EXPORT_SYMBOL(acpi_remove_gpe_handler);
766 * FUNCTION: acpi_acquire_global_lock 770 * FUNCTION: acpi_acquire_global_lock
767 * 771 *
768 * PARAMETERS: Timeout - How long the caller is willing to wait 772 * PARAMETERS: Timeout - How long the caller is willing to wait
769 * out_handle - A handle to the lock if acquired 773 * Handle - Where the handle to the lock is returned
774 * (if acquired)
770 * 775 *
771 * RETURN: Status 776 * RETURN: Status
772 * 777 *
@@ -812,7 +817,7 @@ EXPORT_SYMBOL(acpi_acquire_global_lock);
812 * 817 *
813 * RETURN: Status 818 * RETURN: Status
814 * 819 *
815 * DESCRIPTION: Release the ACPI Global Lock 820 * DESCRIPTION: Release the ACPI Global Lock. The handle must be valid.
816 * 821 *
817 ******************************************************************************/ 822 ******************************************************************************/
818 823
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
index fa8d5f25be62..f337dc2cc569 100644
--- a/drivers/acpi/events/evxfevnt.c
+++ b/drivers/acpi/events/evxfevnt.c
@@ -64,7 +64,8 @@
64 ******************************************************************************/ 64 ******************************************************************************/
65 65
66acpi_status 66acpi_status
67acpi_enable (void) 67acpi_enable (
68 void)
68{ 69{
69 acpi_status status = AE_OK; 70 acpi_status status = AE_OK;
70 71
@@ -91,7 +92,8 @@ acpi_enable (void)
91 return_ACPI_STATUS (status); 92 return_ACPI_STATUS (status);
92 } 93 }
93 94
94 ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "Transition to ACPI mode successful\n")); 95 ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
96 "Transition to ACPI mode successful\n"));
95 } 97 }
96 98
97 return_ACPI_STATUS (status); 99 return_ACPI_STATUS (status);
@@ -106,12 +108,13 @@ acpi_enable (void)
106 * 108 *
107 * RETURN: Status 109 * RETURN: Status
108 * 110 *
109 * DESCRIPTION: Transfers the system into LEGACY mode. 111 * DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode.
110 * 112 *
111 ******************************************************************************/ 113 ******************************************************************************/
112 114
113acpi_status 115acpi_status
114acpi_disable (void) 116acpi_disable (
117 void)
115{ 118{
116 acpi_status status = AE_OK; 119 acpi_status status = AE_OK;
117 120
@@ -125,7 +128,8 @@ acpi_disable (void)
125 } 128 }
126 129
127 if (acpi_hw_get_mode() == ACPI_SYS_MODE_LEGACY) { 130 if (acpi_hw_get_mode() == ACPI_SYS_MODE_LEGACY) {
128 ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "System is already in legacy (non-ACPI) mode\n")); 131 ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
132 "System is already in legacy (non-ACPI) mode\n"));
129 } 133 }
130 else { 134 else {
131 /* Transition to LEGACY mode */ 135 /* Transition to LEGACY mode */
@@ -133,7 +137,8 @@ acpi_disable (void)
133 status = acpi_hw_set_mode (ACPI_SYS_MODE_LEGACY); 137 status = acpi_hw_set_mode (ACPI_SYS_MODE_LEGACY);
134 138
135 if (ACPI_FAILURE (status)) { 139 if (ACPI_FAILURE (status)) {
136 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not exit ACPI mode to legacy mode")); 140 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
141 "Could not exit ACPI mode to legacy mode"));
137 return_ACPI_STATUS (status); 142 return_ACPI_STATUS (status);
138 } 143 }
139 144
@@ -214,7 +219,7 @@ EXPORT_SYMBOL(acpi_enable_event);
214 * 219 *
215 * RETURN: Status 220 * RETURN: Status
216 * 221 *
217 * DESCRIPTION: Enable an ACPI event (general purpose) 222 * DESCRIPTION: Set the type of an individual GPE
218 * 223 *
219 ******************************************************************************/ 224 ******************************************************************************/
220 225
@@ -519,13 +524,12 @@ unlock_and_exit:
519 524
520 525
521#ifdef ACPI_FUTURE_USAGE 526#ifdef ACPI_FUTURE_USAGE
522
523/******************************************************************************* 527/*******************************************************************************
524 * 528 *
525 * FUNCTION: acpi_get_event_status 529 * FUNCTION: acpi_get_event_status
526 * 530 *
527 * PARAMETERS: Event - The fixed event 531 * PARAMETERS: Event - The fixed event
528 * Event Status - Where the current status of the event will 532 * event_status - Where the current status of the event will
529 * be returned 533 * be returned
530 * 534 *
531 * RETURN: Status 535 * RETURN: Status
@@ -571,7 +575,7 @@ acpi_get_event_status (
571 * PARAMETERS: gpe_device - Parent GPE Device 575 * PARAMETERS: gpe_device - Parent GPE Device
572 * gpe_number - GPE level within the GPE block 576 * gpe_number - GPE level within the GPE block
573 * Flags - Called from an ISR or not 577 * Flags - Called from an ISR or not
574 * Event Status - Where the current status of the event will 578 * event_status - Where the current status of the event will
575 * be returned 579 * be returned
576 * 580 *
577 * RETURN: Status 581 * RETURN: Status
@@ -775,4 +779,5 @@ unlock_and_exit:
775 (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE); 779 (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
776 return_ACPI_STATUS (status); 780 return_ACPI_STATUS (status);
777} 781}
782
778EXPORT_SYMBOL(acpi_remove_gpe_block); 783EXPORT_SYMBOL(acpi_remove_gpe_block);