diff options
author | Bob Moore <robert.moore@intel.com> | 2012-02-14 05:14:27 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-03-22 01:44:49 -0400 |
commit | 33620c5419e8a11814dd11e02a80e6ef77a43407 (patch) | |
tree | 8643dbb1e332dd9ece6fb92f22000413e8d8fdc7 /drivers | |
parent | d08310fe0d6bd8c82da94e8d8ef48bdbe14d2bd1 (diff) |
ACPICA: Support for custom ACPICA build for ACPI 5 reduced hardware
Add ACPI_REDUCED_HARDWARE flag that removes all hardware-related
code (about 10% code, 5% static data).
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
27 files changed, 361 insertions, 479 deletions
diff --git a/drivers/acpi/acpica/accommon.h b/drivers/acpi/acpica/accommon.h index a44bd424f9f4..8a7d51bfb3b3 100644 --- a/drivers/acpi/acpica/accommon.h +++ b/drivers/acpi/acpica/accommon.h | |||
@@ -51,7 +51,6 @@ | |||
51 | * | 51 | * |
52 | * Note: The order of these include files is important. | 52 | * Note: The order of these include files is important. |
53 | */ | 53 | */ |
54 | #include "acconfig.h" /* Global configuration constants */ | ||
55 | #include "acmacros.h" /* C macros */ | 54 | #include "acmacros.h" /* C macros */ |
56 | #include "aclocal.h" /* Internal data types */ | 55 | #include "aclocal.h" /* Internal data types */ |
57 | #include "acobject.h" /* ACPI internal object */ | 56 | #include "acobject.h" /* ACPI internal object */ |
diff --git a/drivers/acpi/acpica/acconfig.h b/drivers/acpi/acpica/acconfig.h deleted file mode 100644 index 3748f1a09851..000000000000 --- a/drivers/acpi/acpica/acconfig.h +++ /dev/null | |||
@@ -1,231 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Name: acconfig.h - Global configuration constants | ||
4 | * | ||
5 | *****************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Copyright (C) 2000 - 2012, Intel Corp. | ||
9 | * All rights reserved. | ||
10 | * | ||
11 | * Redistribution and use in source and binary forms, with or without | ||
12 | * modification, are permitted provided that the following conditions | ||
13 | * are met: | ||
14 | * 1. Redistributions of source code must retain the above copyright | ||
15 | * notice, this list of conditions, and the following disclaimer, | ||
16 | * without modification. | ||
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
20 | * including a substantially similar Disclaimer requirement for further | ||
21 | * binary redistribution. | ||
22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
23 | * of any contributors may be used to endorse or promote products derived | ||
24 | * from this software without specific prior written permission. | ||
25 | * | ||
26 | * Alternatively, this software may be distributed under the terms of the | ||
27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
28 | * Software Foundation. | ||
29 | * | ||
30 | * NO WARRANTY | ||
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
41 | * POSSIBILITY OF SUCH DAMAGES. | ||
42 | */ | ||
43 | |||
44 | #ifndef _ACCONFIG_H | ||
45 | #define _ACCONFIG_H | ||
46 | |||
47 | /****************************************************************************** | ||
48 | * | ||
49 | * Configuration options | ||
50 | * | ||
51 | *****************************************************************************/ | ||
52 | |||
53 | /* | ||
54 | * ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the | ||
55 | * ACPI subsystem. This includes the DEBUG_PRINT output | ||
56 | * statements. When disabled, all DEBUG_PRINT | ||
57 | * statements are compiled out. | ||
58 | * | ||
59 | * ACPI_APPLICATION - Use this switch if the subsystem is going to be run | ||
60 | * at the application level. | ||
61 | * | ||
62 | */ | ||
63 | |||
64 | /* | ||
65 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | ||
66 | * but there is a large base of ASL/AML code in existing machines that check | ||
67 | * for the string below. The use of this string usually guarantees that | ||
68 | * the ASL will execute down the most tested code path. Also, there is some | ||
69 | * code that will not execute the _OSI method unless _OS matches the string | ||
70 | * below. Therefore, change this string at your own risk. | ||
71 | */ | ||
72 | #define ACPI_OS_NAME "Microsoft Windows NT" | ||
73 | |||
74 | /* Maximum objects in the various object caches */ | ||
75 | |||
76 | #define ACPI_MAX_STATE_CACHE_DEPTH 96 /* State objects */ | ||
77 | #define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ | ||
78 | #define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */ | ||
79 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ | ||
80 | #define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */ | ||
81 | |||
82 | /* | ||
83 | * Should the subsystem abort the loading of an ACPI table if the | ||
84 | * table checksum is incorrect? | ||
85 | */ | ||
86 | #define ACPI_CHECKSUM_ABORT FALSE | ||
87 | |||
88 | /****************************************************************************** | ||
89 | * | ||
90 | * Subsystem Constants | ||
91 | * | ||
92 | *****************************************************************************/ | ||
93 | |||
94 | /* Version of ACPI supported */ | ||
95 | |||
96 | #define ACPI_CA_SUPPORT_LEVEL 5 | ||
97 | |||
98 | /* Maximum count for a semaphore object */ | ||
99 | |||
100 | #define ACPI_MAX_SEMAPHORE_COUNT 256 | ||
101 | |||
102 | /* Maximum object reference count (detects object deletion issues) */ | ||
103 | |||
104 | #define ACPI_MAX_REFERENCE_COUNT 0x1000 | ||
105 | |||
106 | /* Default page size for use in mapping memory for operation regions */ | ||
107 | |||
108 | #define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */ | ||
109 | |||
110 | /* owner_id tracking. 8 entries allows for 255 owner_ids */ | ||
111 | |||
112 | #define ACPI_NUM_OWNERID_MASKS 8 | ||
113 | |||
114 | /* Size of the root table array is increased by this increment */ | ||
115 | |||
116 | #define ACPI_ROOT_TABLE_SIZE_INCREMENT 4 | ||
117 | |||
118 | /* Maximum number of While() loop iterations before forced abort */ | ||
119 | |||
120 | #define ACPI_MAX_LOOP_ITERATIONS 0xFFFF | ||
121 | |||
122 | /* Maximum sleep allowed via Sleep() operator */ | ||
123 | |||
124 | #define ACPI_MAX_SLEEP 2000 /* Two seconds */ | ||
125 | |||
126 | /* Address Range lists are per-space_id (Memory and I/O only) */ | ||
127 | |||
128 | #define ACPI_ADDRESS_RANGE_MAX 2 | ||
129 | |||
130 | /****************************************************************************** | ||
131 | * | ||
132 | * ACPI Specification constants (Do not change unless the specification changes) | ||
133 | * | ||
134 | *****************************************************************************/ | ||
135 | |||
136 | /* Number of distinct GPE register blocks and register width */ | ||
137 | |||
138 | #define ACPI_MAX_GPE_BLOCKS 2 | ||
139 | #define ACPI_GPE_REGISTER_WIDTH 8 | ||
140 | |||
141 | /* Method info (in WALK_STATE), containing local variables and argumetns */ | ||
142 | |||
143 | #define ACPI_METHOD_NUM_LOCALS 8 | ||
144 | #define ACPI_METHOD_MAX_LOCAL 7 | ||
145 | |||
146 | #define ACPI_METHOD_NUM_ARGS 7 | ||
147 | #define ACPI_METHOD_MAX_ARG 6 | ||
148 | |||
149 | /* Length of _HID, _UID, _CID, and UUID values */ | ||
150 | |||
151 | #define ACPI_DEVICE_ID_LENGTH 0x09 | ||
152 | #define ACPI_MAX_CID_LENGTH 48 | ||
153 | #define ACPI_UUID_LENGTH 16 | ||
154 | |||
155 | /* | ||
156 | * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG | ||
157 | */ | ||
158 | #define ACPI_OBJ_NUM_OPERANDS 8 | ||
159 | #define ACPI_OBJ_MAX_OPERAND 7 | ||
160 | |||
161 | /* Number of elements in the Result Stack frame, can be an arbitrary value */ | ||
162 | |||
163 | #define ACPI_RESULTS_FRAME_OBJ_NUM 8 | ||
164 | |||
165 | /* | ||
166 | * Maximal number of elements the Result Stack can contain, | ||
167 | * it may be an arbitray value not exceeding the types of | ||
168 | * result_size and result_count (now u8). | ||
169 | */ | ||
170 | #define ACPI_RESULTS_OBJ_NUM_MAX 255 | ||
171 | |||
172 | /* Names within the namespace are 4 bytes long */ | ||
173 | |||
174 | #define ACPI_NAME_SIZE 4 | ||
175 | #define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ | ||
176 | #define ACPI_PATH_SEPARATOR '.' | ||
177 | |||
178 | /* Sizes for ACPI table headers */ | ||
179 | |||
180 | #define ACPI_OEM_ID_SIZE 6 | ||
181 | #define ACPI_OEM_TABLE_ID_SIZE 8 | ||
182 | |||
183 | /* Constants used in searching for the RSDP in low memory */ | ||
184 | |||
185 | #define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */ | ||
186 | #define ACPI_EBDA_PTR_LENGTH 2 | ||
187 | #define ACPI_EBDA_WINDOW_SIZE 1024 | ||
188 | #define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */ | ||
189 | #define ACPI_HI_RSDP_WINDOW_SIZE 0x00020000 | ||
190 | #define ACPI_RSDP_SCAN_STEP 16 | ||
191 | |||
192 | /* Operation regions */ | ||
193 | |||
194 | #define ACPI_USER_REGION_BEGIN 0x80 | ||
195 | |||
196 | /* Maximum space_ids for Operation Regions */ | ||
197 | |||
198 | #define ACPI_MAX_ADDRESS_SPACE 255 | ||
199 | |||
200 | /* Array sizes. Used for range checking also */ | ||
201 | |||
202 | #define ACPI_MAX_MATCH_OPCODE 5 | ||
203 | |||
204 | /* RSDP checksums */ | ||
205 | |||
206 | #define ACPI_RSDP_CHECKSUM_LENGTH 20 | ||
207 | #define ACPI_RSDP_XCHECKSUM_LENGTH 36 | ||
208 | |||
209 | /* SMBus, GSBus and IPMI bidirectional buffer size */ | ||
210 | |||
211 | #define ACPI_SMBUS_BUFFER_SIZE 34 | ||
212 | #define ACPI_GSBUS_BUFFER_SIZE 34 | ||
213 | #define ACPI_IPMI_BUFFER_SIZE 66 | ||
214 | |||
215 | /* _sx_d and _sx_w control methods */ | ||
216 | |||
217 | #define ACPI_NUM_sx_d_METHODS 4 | ||
218 | #define ACPI_NUM_sx_w_METHODS 5 | ||
219 | |||
220 | /****************************************************************************** | ||
221 | * | ||
222 | * ACPI AML Debugger | ||
223 | * | ||
224 | *****************************************************************************/ | ||
225 | |||
226 | #define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */ | ||
227 | |||
228 | #define ACPI_DEBUGGER_COMMAND_PROMPT '-' | ||
229 | #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' | ||
230 | |||
231 | #endif /* _ACCONFIG_H */ | ||
diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h index deaa81979561..5e8abb07724f 100644 --- a/drivers/acpi/acpica/acdebug.h +++ b/drivers/acpi/acpica/acdebug.h | |||
@@ -111,7 +111,7 @@ acpi_status acpi_db_find_name_in_namespace(char *name_arg); | |||
111 | 111 | ||
112 | void acpi_db_set_scope(char *name); | 112 | void acpi_db_set_scope(char *name); |
113 | 113 | ||
114 | acpi_status acpi_db_sleep(char *object_arg); | 114 | ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_db_sleep(char *object_arg)) |
115 | 115 | ||
116 | void acpi_db_find_references(char *object_arg); | 116 | void acpi_db_find_references(char *object_arg); |
117 | 117 | ||
@@ -119,11 +119,13 @@ void acpi_db_display_locks(void); | |||
119 | 119 | ||
120 | void acpi_db_display_resources(char *object_arg); | 120 | void acpi_db_display_resources(char *object_arg); |
121 | 121 | ||
122 | void acpi_db_display_gpes(void); | 122 | ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_display_gpes(void)) |
123 | 123 | ||
124 | void acpi_db_check_integrity(void); | 124 | void acpi_db_check_integrity(void); |
125 | 125 | ||
126 | void acpi_db_generate_gpe(char *gpe_arg, char *block_arg); | 126 | ACPI_HW_DEPENDENT_RETURN_VOID(void |
127 | acpi_db_generate_gpe(char *gpe_arg, | ||
128 | char *block_arg)) | ||
127 | 129 | ||
128 | void acpi_db_check_predefined_names(void); | 130 | void acpi_db_check_predefined_names(void); |
129 | 131 | ||
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h index c53caa521a30..d700f63e4701 100644 --- a/drivers/acpi/acpica/acevents.h +++ b/drivers/acpi/acpica/acevents.h | |||
@@ -69,11 +69,10 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node *node, | |||
69 | */ | 69 | */ |
70 | acpi_status acpi_ev_init_global_lock_handler(void); | 70 | acpi_status acpi_ev_init_global_lock_handler(void); |
71 | 71 | ||
72 | acpi_status acpi_ev_acquire_global_lock(u16 timeout); | 72 | ACPI_HW_DEPENDENT_RETURN_OK(acpi_status |
73 | 73 | acpi_ev_acquire_global_lock(u16 timeout)) | |
74 | acpi_status acpi_ev_release_global_lock(void); | 74 | ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_release_global_lock(void)) |
75 | 75 | acpi_status acpi_ev_remove_global_lock_handler(void); | |
76 | acpi_status acpi_ev_remove_global_lock_handler(void); | ||
77 | 76 | ||
78 | /* | 77 | /* |
79 | * evgpe - Low-level GPE support | 78 | * evgpe - Low-level GPE support |
@@ -114,7 +113,9 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
114 | struct acpi_gpe_block_info *gpe_block, | 113 | struct acpi_gpe_block_info *gpe_block, |
115 | void *context); | 114 | void *context); |
116 | 115 | ||
117 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); | 116 | ACPI_HW_DEPENDENT_RETURN_OK(acpi_status |
117 | acpi_ev_delete_gpe_block(struct acpi_gpe_block_info | ||
118 | *gpe_block)) | ||
118 | 119 | ||
119 | u32 | 120 | u32 |
120 | acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, | 121 | acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, |
@@ -126,9 +127,10 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, | |||
126 | */ | 127 | */ |
127 | acpi_status acpi_ev_gpe_initialize(void); | 128 | acpi_status acpi_ev_gpe_initialize(void); |
128 | 129 | ||
129 | void acpi_ev_update_gpes(acpi_owner_id table_owner_id); | 130 | ACPI_HW_DEPENDENT_RETURN_VOID(void |
131 | acpi_ev_update_gpes(acpi_owner_id table_owner_id)) | ||
130 | 132 | ||
131 | acpi_status | 133 | acpi_status |
132 | acpi_ev_match_gpe_method(acpi_handle obj_handle, | 134 | acpi_ev_match_gpe_method(acpi_handle obj_handle, |
133 | u32 level, void *context, void **return_value); | 135 | u32 level, void *context, void **return_value); |
134 | 136 | ||
@@ -237,6 +239,5 @@ acpi_status acpi_ev_remove_sci_handler(void); | |||
237 | 239 | ||
238 | u32 acpi_ev_initialize_sCI(u32 program_sCI); | 240 | u32 acpi_ev_initialize_sCI(u32 program_sCI); |
239 | 241 | ||
240 | void acpi_ev_terminate(void); | 242 | ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_ev_terminate(void)) |
241 | |||
242 | #endif /* __ACEVENTS_H__ */ | 243 | #endif /* __ACEVENTS_H__ */ |
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 2853f7673f3b..4f7d3f57d05c 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h | |||
@@ -147,7 +147,7 @@ u8 acpi_gbl_system_awake_and_running; | |||
147 | */ | 147 | */ |
148 | u8 acpi_gbl_reduced_hardware; | 148 | u8 acpi_gbl_reduced_hardware; |
149 | 149 | ||
150 | #endif | 150 | #endif /* DEFINE_ACPI_GLOBALS */ |
151 | 151 | ||
152 | /* Do not disassemble buffers to resource descriptors */ | 152 | /* Do not disassemble buffers to resource descriptors */ |
153 | 153 | ||
@@ -184,8 +184,12 @@ ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer; | |||
184 | * found in the RSDT/XSDT. | 184 | * found in the RSDT/XSDT. |
185 | */ | 185 | */ |
186 | ACPI_EXTERN struct acpi_table_list acpi_gbl_root_table_list; | 186 | ACPI_EXTERN struct acpi_table_list acpi_gbl_root_table_list; |
187 | |||
188 | #if (!ACPI_REDUCED_HARDWARE) | ||
187 | ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS; | 189 | ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS; |
188 | 190 | ||
191 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
192 | |||
189 | /* These addresses are calculated from the FADT Event Block addresses */ | 193 | /* These addresses are calculated from the FADT Event Block addresses */ |
190 | 194 | ||
191 | ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_status; | 195 | ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_status; |
@@ -397,10 +401,15 @@ ACPI_EXTERN struct acpi_fixed_event_handler | |||
397 | ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; | 401 | ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; |
398 | ACPI_EXTERN struct acpi_gpe_block_info | 402 | ACPI_EXTERN struct acpi_gpe_block_info |
399 | *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; | 403 | *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; |
404 | |||
405 | #if (!ACPI_REDUCED_HARDWARE) | ||
406 | |||
400 | ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized; | 407 | ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized; |
401 | ACPI_EXTERN ACPI_GBL_EVENT_HANDLER acpi_gbl_global_event_handler; | 408 | ACPI_EXTERN ACPI_GBL_EVENT_HANDLER acpi_gbl_global_event_handler; |
402 | ACPI_EXTERN void *acpi_gbl_global_event_handler_context; | 409 | ACPI_EXTERN void *acpi_gbl_global_event_handler_context; |
403 | 410 | ||
411 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
412 | |||
404 | /***************************************************************************** | 413 | /***************************************************************************** |
405 | * | 414 | * |
406 | * Debugger globals | 415 | * Debugger globals |
diff --git a/drivers/acpi/acpica/evevent.c b/drivers/acpi/acpica/evevent.c index 6729ebe2f1e6..07e4dc44f81c 100644 --- a/drivers/acpi/acpica/evevent.c +++ b/drivers/acpi/acpica/evevent.c | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | #define _COMPONENT ACPI_EVENTS | 48 | #define _COMPONENT ACPI_EVENTS |
49 | ACPI_MODULE_NAME("evevent") | 49 | ACPI_MODULE_NAME("evevent") |
50 | 50 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | |
51 | /* Local prototypes */ | 51 | /* Local prototypes */ |
52 | static acpi_status acpi_ev_fixed_event_initialize(void); | 52 | static acpi_status acpi_ev_fixed_event_initialize(void); |
53 | 53 | ||
@@ -291,3 +291,5 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event) | |||
291 | return ((acpi_gbl_fixed_event_handlers[event]. | 291 | return ((acpi_gbl_fixed_event_handlers[event]. |
292 | handler) (acpi_gbl_fixed_event_handlers[event].context)); | 292 | handler) (acpi_gbl_fixed_event_handlers[event].context)); |
293 | } | 293 | } |
294 | |||
295 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evglock.c b/drivers/acpi/acpica/evglock.c index 5e5683cb1f0d..cfeab38795d8 100644 --- a/drivers/acpi/acpica/evglock.c +++ b/drivers/acpi/acpica/evglock.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #define _COMPONENT ACPI_EVENTS | 49 | #define _COMPONENT ACPI_EVENTS |
50 | ACPI_MODULE_NAME("evglock") | 50 | ACPI_MODULE_NAME("evglock") |
51 | 51 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | |
52 | /* Local prototypes */ | 52 | /* Local prototypes */ |
53 | static u32 acpi_ev_global_lock_handler(void *context); | 53 | static u32 acpi_ev_global_lock_handler(void *context); |
54 | 54 | ||
@@ -339,3 +339,5 @@ acpi_status acpi_ev_release_global_lock(void) | |||
339 | acpi_os_release_mutex(acpi_gbl_global_lock_mutex->mutex.os_mutex); | 339 | acpi_os_release_mutex(acpi_gbl_global_lock_mutex->mutex.os_mutex); |
340 | return_ACPI_STATUS(status); | 340 | return_ACPI_STATUS(status); |
341 | } | 341 | } |
342 | |||
343 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 9e88cb6fb25e..8ba0e5f17091 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #define _COMPONENT ACPI_EVENTS | 49 | #define _COMPONENT ACPI_EVENTS |
50 | ACPI_MODULE_NAME("evgpe") | 50 | ACPI_MODULE_NAME("evgpe") |
51 | 51 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | |
52 | /* Local prototypes */ | 52 | /* Local prototypes */ |
53 | static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context); | 53 | static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context); |
54 | 54 | ||
@@ -766,3 +766,5 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, | |||
766 | 766 | ||
767 | return_UINT32(ACPI_INTERRUPT_HANDLED); | 767 | return_UINT32(ACPI_INTERRUPT_HANDLED); |
768 | } | 768 | } |
769 | |||
770 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c index be75339cd5dd..23a3ca86b2eb 100644 --- a/drivers/acpi/acpica/evgpeblk.c +++ b/drivers/acpi/acpica/evgpeblk.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #define _COMPONENT ACPI_EVENTS | 49 | #define _COMPONENT ACPI_EVENTS |
50 | ACPI_MODULE_NAME("evgpeblk") | 50 | ACPI_MODULE_NAME("evgpeblk") |
51 | 51 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | |
52 | /* Local prototypes */ | 52 | /* Local prototypes */ |
53 | static acpi_status | 53 | static acpi_status |
54 | acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block, | 54 | acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block, |
@@ -504,3 +504,5 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
504 | 504 | ||
505 | return_ACPI_STATUS(AE_OK); | 505 | return_ACPI_STATUS(AE_OK); |
506 | } | 506 | } |
507 | |||
508 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evgpeinit.c b/drivers/acpi/acpica/evgpeinit.c index adf7494da9db..da0add858f81 100644 --- a/drivers/acpi/acpica/evgpeinit.c +++ b/drivers/acpi/acpica/evgpeinit.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #define _COMPONENT ACPI_EVENTS | 49 | #define _COMPONENT ACPI_EVENTS |
50 | ACPI_MODULE_NAME("evgpeinit") | 50 | ACPI_MODULE_NAME("evgpeinit") |
51 | 51 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | |
52 | /* | 52 | /* |
53 | * Note: History of _PRW support in ACPICA | 53 | * Note: History of _PRW support in ACPICA |
54 | * | 54 | * |
@@ -440,3 +440,5 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle, | |||
440 | name, gpe_number)); | 440 | name, gpe_number)); |
441 | return_ACPI_STATUS(AE_OK); | 441 | return_ACPI_STATUS(AE_OK); |
442 | } | 442 | } |
443 | |||
444 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c index 25073932aa10..3c43796b8361 100644 --- a/drivers/acpi/acpica/evgpeutil.c +++ b/drivers/acpi/acpica/evgpeutil.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #define _COMPONENT ACPI_EVENTS | 48 | #define _COMPONENT ACPI_EVENTS |
49 | ACPI_MODULE_NAME("evgpeutil") | 49 | ACPI_MODULE_NAME("evgpeutil") |
50 | 50 | ||
51 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | ||
51 | /******************************************************************************* | 52 | /******************************************************************************* |
52 | * | 53 | * |
53 | * FUNCTION: acpi_ev_walk_gpe_list | 54 | * FUNCTION: acpi_ev_walk_gpe_list |
@@ -374,3 +375,5 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
374 | 375 | ||
375 | return_ACPI_STATUS(AE_OK); | 376 | return_ACPI_STATUS(AE_OK); |
376 | } | 377 | } |
378 | |||
379 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c index 84966f416463..0912f62f05a0 100644 --- a/drivers/acpi/acpica/evmisc.c +++ b/drivers/acpi/acpica/evmisc.c | |||
@@ -270,6 +270,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context) | |||
270 | acpi_ut_delete_generic_state(notify_info); | 270 | acpi_ut_delete_generic_state(notify_info); |
271 | } | 271 | } |
272 | 272 | ||
273 | #if (!ACPI_REDUCED_HARDWARE) | ||
273 | /****************************************************************************** | 274 | /****************************************************************************** |
274 | * | 275 | * |
275 | * FUNCTION: acpi_ev_terminate | 276 | * FUNCTION: acpi_ev_terminate |
@@ -338,3 +339,5 @@ void acpi_ev_terminate(void) | |||
338 | } | 339 | } |
339 | return_VOID; | 340 | return_VOID; |
340 | } | 341 | } |
342 | |||
343 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evsci.c b/drivers/acpi/acpica/evsci.c index 26065c612e76..6a57aa2d70d1 100644 --- a/drivers/acpi/acpica/evsci.c +++ b/drivers/acpi/acpica/evsci.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #define _COMPONENT ACPI_EVENTS | 49 | #define _COMPONENT ACPI_EVENTS |
50 | ACPI_MODULE_NAME("evsci") | 50 | ACPI_MODULE_NAME("evsci") |
51 | 51 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | |
52 | /* Local prototypes */ | 52 | /* Local prototypes */ |
53 | static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context); | 53 | static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context); |
54 | 54 | ||
@@ -181,3 +181,5 @@ acpi_status acpi_ev_remove_sci_handler(void) | |||
181 | 181 | ||
182 | return_ACPI_STATUS(status); | 182 | return_ACPI_STATUS(status); |
183 | } | 183 | } |
184 | |||
185 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index 61944e89565a..44bef5744ebb 100644 --- a/drivers/acpi/acpica/evxface.c +++ b/drivers/acpi/acpica/evxface.c | |||
@@ -51,222 +51,6 @@ | |||
51 | #define _COMPONENT ACPI_EVENTS | 51 | #define _COMPONENT ACPI_EVENTS |
52 | ACPI_MODULE_NAME("evxface") | 52 | ACPI_MODULE_NAME("evxface") |
53 | 53 | ||
54 | /******************************************************************************* | ||
55 | * | ||
56 | * FUNCTION: acpi_install_exception_handler | ||
57 | * | ||
58 | * PARAMETERS: Handler - Pointer to the handler function for the | ||
59 | * event | ||
60 | * | ||
61 | * RETURN: Status | ||
62 | * | ||
63 | * DESCRIPTION: Saves the pointer to the handler function | ||
64 | * | ||
65 | ******************************************************************************/ | ||
66 | #ifdef ACPI_FUTURE_USAGE | ||
67 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler) | ||
68 | { | ||
69 | acpi_status status; | ||
70 | |||
71 | ACPI_FUNCTION_TRACE(acpi_install_exception_handler); | ||
72 | |||
73 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
74 | if (ACPI_FAILURE(status)) { | ||
75 | return_ACPI_STATUS(status); | ||
76 | } | ||
77 | |||
78 | /* Don't allow two handlers. */ | ||
79 | |||
80 | if (acpi_gbl_exception_handler) { | ||
81 | status = AE_ALREADY_EXISTS; | ||
82 | goto cleanup; | ||
83 | } | ||
84 | |||
85 | /* Install the handler */ | ||
86 | |||
87 | acpi_gbl_exception_handler = handler; | ||
88 | |||
89 | cleanup: | ||
90 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
91 | return_ACPI_STATUS(status); | ||
92 | } | ||
93 | |||
94 | ACPI_EXPORT_SYMBOL(acpi_install_exception_handler) | ||
95 | #endif /* ACPI_FUTURE_USAGE */ | ||
96 | |||
97 | /******************************************************************************* | ||
98 | * | ||
99 | * FUNCTION: acpi_install_global_event_handler | ||
100 | * | ||
101 | * PARAMETERS: Handler - Pointer to the global event handler function | ||
102 | * Context - Value passed to the handler on each event | ||
103 | * | ||
104 | * RETURN: Status | ||
105 | * | ||
106 | * DESCRIPTION: Saves the pointer to the handler function. The global handler | ||
107 | * is invoked upon each incoming GPE and Fixed Event. It is | ||
108 | * invoked at interrupt level at the time of the event dispatch. | ||
109 | * Can be used to update event counters, etc. | ||
110 | * | ||
111 | ******************************************************************************/ | ||
112 | acpi_status | ||
113 | acpi_install_global_event_handler(ACPI_GBL_EVENT_HANDLER handler, void *context) | ||
114 | { | ||
115 | acpi_status status; | ||
116 | |||
117 | ACPI_FUNCTION_TRACE(acpi_install_global_event_handler); | ||
118 | |||
119 | /* Parameter validation */ | ||
120 | |||
121 | if (!handler) { | ||
122 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
123 | } | ||
124 | |||
125 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
126 | if (ACPI_FAILURE(status)) { | ||
127 | return_ACPI_STATUS(status); | ||
128 | } | ||
129 | |||
130 | /* Don't allow two handlers. */ | ||
131 | |||
132 | if (acpi_gbl_global_event_handler) { | ||
133 | status = AE_ALREADY_EXISTS; | ||
134 | goto cleanup; | ||
135 | } | ||
136 | |||
137 | acpi_gbl_global_event_handler = handler; | ||
138 | acpi_gbl_global_event_handler_context = context; | ||
139 | |||
140 | cleanup: | ||
141 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
142 | return_ACPI_STATUS(status); | ||
143 | } | ||
144 | |||
145 | ACPI_EXPORT_SYMBOL(acpi_install_global_event_handler) | ||
146 | |||
147 | /******************************************************************************* | ||
148 | * | ||
149 | * FUNCTION: acpi_install_fixed_event_handler | ||
150 | * | ||
151 | * PARAMETERS: Event - Event type to enable. | ||
152 | * Handler - Pointer to the handler function for the | ||
153 | * event | ||
154 | * Context - Value passed to the handler on each GPE | ||
155 | * | ||
156 | * RETURN: Status | ||
157 | * | ||
158 | * DESCRIPTION: Saves the pointer to the handler function and then enables the | ||
159 | * event. | ||
160 | * | ||
161 | ******************************************************************************/ | ||
162 | acpi_status | ||
163 | acpi_install_fixed_event_handler(u32 event, | ||
164 | acpi_event_handler handler, void *context) | ||
165 | { | ||
166 | acpi_status status; | ||
167 | |||
168 | ACPI_FUNCTION_TRACE(acpi_install_fixed_event_handler); | ||
169 | |||
170 | /* Parameter validation */ | ||
171 | |||
172 | if (event > ACPI_EVENT_MAX) { | ||
173 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
174 | } | ||
175 | |||
176 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
177 | if (ACPI_FAILURE(status)) { | ||
178 | return_ACPI_STATUS(status); | ||
179 | } | ||
180 | |||
181 | /* Don't allow two handlers. */ | ||
182 | |||
183 | if (NULL != acpi_gbl_fixed_event_handlers[event].handler) { | ||
184 | status = AE_ALREADY_EXISTS; | ||
185 | goto cleanup; | ||
186 | } | ||
187 | |||
188 | /* Install the handler before enabling the event */ | ||
189 | |||
190 | acpi_gbl_fixed_event_handlers[event].handler = handler; | ||
191 | acpi_gbl_fixed_event_handlers[event].context = context; | ||
192 | |||
193 | status = acpi_clear_event(event); | ||
194 | if (ACPI_SUCCESS(status)) | ||
195 | status = acpi_enable_event(event, 0); | ||
196 | if (ACPI_FAILURE(status)) { | ||
197 | ACPI_WARNING((AE_INFO, "Could not enable fixed event 0x%X", | ||
198 | event)); | ||
199 | |||
200 | /* Remove the handler */ | ||
201 | |||
202 | acpi_gbl_fixed_event_handlers[event].handler = NULL; | ||
203 | acpi_gbl_fixed_event_handlers[event].context = NULL; | ||
204 | } else { | ||
205 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
206 | "Enabled fixed event %X, Handler=%p\n", event, | ||
207 | handler)); | ||
208 | } | ||
209 | |||
210 | cleanup: | ||
211 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
212 | return_ACPI_STATUS(status); | ||
213 | } | ||
214 | |||
215 | ACPI_EXPORT_SYMBOL(acpi_install_fixed_event_handler) | ||
216 | |||
217 | /******************************************************************************* | ||
218 | * | ||
219 | * FUNCTION: acpi_remove_fixed_event_handler | ||
220 | * | ||
221 | * PARAMETERS: Event - Event type to disable. | ||
222 | * Handler - Address of the handler | ||
223 | * | ||
224 | * RETURN: Status | ||
225 | * | ||
226 | * DESCRIPTION: Disables the event and unregisters the event handler. | ||
227 | * | ||
228 | ******************************************************************************/ | ||
229 | acpi_status | ||
230 | acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) | ||
231 | { | ||
232 | acpi_status status = AE_OK; | ||
233 | |||
234 | ACPI_FUNCTION_TRACE(acpi_remove_fixed_event_handler); | ||
235 | |||
236 | /* Parameter validation */ | ||
237 | |||
238 | if (event > ACPI_EVENT_MAX) { | ||
239 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
240 | } | ||
241 | |||
242 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
243 | if (ACPI_FAILURE(status)) { | ||
244 | return_ACPI_STATUS(status); | ||
245 | } | ||
246 | |||
247 | /* Disable the event before removing the handler */ | ||
248 | |||
249 | status = acpi_disable_event(event, 0); | ||
250 | |||
251 | /* Always Remove the handler */ | ||
252 | |||
253 | acpi_gbl_fixed_event_handlers[event].handler = NULL; | ||
254 | acpi_gbl_fixed_event_handlers[event].context = NULL; | ||
255 | |||
256 | if (ACPI_FAILURE(status)) { | ||
257 | ACPI_WARNING((AE_INFO, | ||
258 | "Could not write to fixed event enable register 0x%X", | ||
259 | event)); | ||
260 | } else { | ||
261 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Disabled fixed event %X\n", | ||
262 | event)); | ||
263 | } | ||
264 | |||
265 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
266 | return_ACPI_STATUS(status); | ||
267 | } | ||
268 | |||
269 | ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler) | ||
270 | 54 | ||
271 | /******************************************************************************* | 55 | /******************************************************************************* |
272 | * | 56 | * |
@@ -334,6 +118,7 @@ acpi_add_handler_object(struct acpi_object_notify_handler *parent_obj, | |||
334 | return AE_OK; | 118 | return AE_OK; |
335 | } | 119 | } |
336 | 120 | ||
121 | |||
337 | /******************************************************************************* | 122 | /******************************************************************************* |
338 | * | 123 | * |
339 | * FUNCTION: acpi_install_notify_handler | 124 | * FUNCTION: acpi_install_notify_handler |
@@ -705,6 +490,224 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler) | |||
705 | 490 | ||
706 | /******************************************************************************* | 491 | /******************************************************************************* |
707 | * | 492 | * |
493 | * FUNCTION: acpi_install_exception_handler | ||
494 | * | ||
495 | * PARAMETERS: Handler - Pointer to the handler function for the | ||
496 | * event | ||
497 | * | ||
498 | * RETURN: Status | ||
499 | * | ||
500 | * DESCRIPTION: Saves the pointer to the handler function | ||
501 | * | ||
502 | ******************************************************************************/ | ||
503 | #ifdef ACPI_FUTURE_USAGE | ||
504 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler) | ||
505 | { | ||
506 | acpi_status status; | ||
507 | |||
508 | ACPI_FUNCTION_TRACE(acpi_install_exception_handler); | ||
509 | |||
510 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
511 | if (ACPI_FAILURE(status)) { | ||
512 | return_ACPI_STATUS(status); | ||
513 | } | ||
514 | |||
515 | /* Don't allow two handlers. */ | ||
516 | |||
517 | if (acpi_gbl_exception_handler) { | ||
518 | status = AE_ALREADY_EXISTS; | ||
519 | goto cleanup; | ||
520 | } | ||
521 | |||
522 | /* Install the handler */ | ||
523 | |||
524 | acpi_gbl_exception_handler = handler; | ||
525 | |||
526 | cleanup: | ||
527 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
528 | return_ACPI_STATUS(status); | ||
529 | } | ||
530 | |||
531 | ACPI_EXPORT_SYMBOL(acpi_install_exception_handler) | ||
532 | #endif /* ACPI_FUTURE_USAGE */ | ||
533 | |||
534 | #if (!ACPI_REDUCED_HARDWARE) | ||
535 | /******************************************************************************* | ||
536 | * | ||
537 | * FUNCTION: acpi_install_global_event_handler | ||
538 | * | ||
539 | * PARAMETERS: Handler - Pointer to the global event handler function | ||
540 | * Context - Value passed to the handler on each event | ||
541 | * | ||
542 | * RETURN: Status | ||
543 | * | ||
544 | * DESCRIPTION: Saves the pointer to the handler function. The global handler | ||
545 | * is invoked upon each incoming GPE and Fixed Event. It is | ||
546 | * invoked at interrupt level at the time of the event dispatch. | ||
547 | * Can be used to update event counters, etc. | ||
548 | * | ||
549 | ******************************************************************************/ | ||
550 | acpi_status | ||
551 | acpi_install_global_event_handler(ACPI_GBL_EVENT_HANDLER handler, void *context) | ||
552 | { | ||
553 | acpi_status status; | ||
554 | |||
555 | ACPI_FUNCTION_TRACE(acpi_install_global_event_handler); | ||
556 | |||
557 | /* Parameter validation */ | ||
558 | |||
559 | if (!handler) { | ||
560 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
561 | } | ||
562 | |||
563 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
564 | if (ACPI_FAILURE(status)) { | ||
565 | return_ACPI_STATUS(status); | ||
566 | } | ||
567 | |||
568 | /* Don't allow two handlers. */ | ||
569 | |||
570 | if (acpi_gbl_global_event_handler) { | ||
571 | status = AE_ALREADY_EXISTS; | ||
572 | goto cleanup; | ||
573 | } | ||
574 | |||
575 | acpi_gbl_global_event_handler = handler; | ||
576 | acpi_gbl_global_event_handler_context = context; | ||
577 | |||
578 | cleanup: | ||
579 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
580 | return_ACPI_STATUS(status); | ||
581 | } | ||
582 | |||
583 | ACPI_EXPORT_SYMBOL(acpi_install_global_event_handler) | ||
584 | |||
585 | /******************************************************************************* | ||
586 | * | ||
587 | * FUNCTION: acpi_install_fixed_event_handler | ||
588 | * | ||
589 | * PARAMETERS: Event - Event type to enable. | ||
590 | * Handler - Pointer to the handler function for the | ||
591 | * event | ||
592 | * Context - Value passed to the handler on each GPE | ||
593 | * | ||
594 | * RETURN: Status | ||
595 | * | ||
596 | * DESCRIPTION: Saves the pointer to the handler function and then enables the | ||
597 | * event. | ||
598 | * | ||
599 | ******************************************************************************/ | ||
600 | acpi_status | ||
601 | acpi_install_fixed_event_handler(u32 event, | ||
602 | acpi_event_handler handler, void *context) | ||
603 | { | ||
604 | acpi_status status; | ||
605 | |||
606 | ACPI_FUNCTION_TRACE(acpi_install_fixed_event_handler); | ||
607 | |||
608 | /* Parameter validation */ | ||
609 | |||
610 | if (event > ACPI_EVENT_MAX) { | ||
611 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
612 | } | ||
613 | |||
614 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
615 | if (ACPI_FAILURE(status)) { | ||
616 | return_ACPI_STATUS(status); | ||
617 | } | ||
618 | |||
619 | /* Don't allow two handlers. */ | ||
620 | |||
621 | if (NULL != acpi_gbl_fixed_event_handlers[event].handler) { | ||
622 | status = AE_ALREADY_EXISTS; | ||
623 | goto cleanup; | ||
624 | } | ||
625 | |||
626 | /* Install the handler before enabling the event */ | ||
627 | |||
628 | acpi_gbl_fixed_event_handlers[event].handler = handler; | ||
629 | acpi_gbl_fixed_event_handlers[event].context = context; | ||
630 | |||
631 | status = acpi_clear_event(event); | ||
632 | if (ACPI_SUCCESS(status)) | ||
633 | status = acpi_enable_event(event, 0); | ||
634 | if (ACPI_FAILURE(status)) { | ||
635 | ACPI_WARNING((AE_INFO, "Could not enable fixed event 0x%X", | ||
636 | event)); | ||
637 | |||
638 | /* Remove the handler */ | ||
639 | |||
640 | acpi_gbl_fixed_event_handlers[event].handler = NULL; | ||
641 | acpi_gbl_fixed_event_handlers[event].context = NULL; | ||
642 | } else { | ||
643 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
644 | "Enabled fixed event %X, Handler=%p\n", event, | ||
645 | handler)); | ||
646 | } | ||
647 | |||
648 | cleanup: | ||
649 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
650 | return_ACPI_STATUS(status); | ||
651 | } | ||
652 | |||
653 | ACPI_EXPORT_SYMBOL(acpi_install_fixed_event_handler) | ||
654 | |||
655 | /******************************************************************************* | ||
656 | * | ||
657 | * FUNCTION: acpi_remove_fixed_event_handler | ||
658 | * | ||
659 | * PARAMETERS: Event - Event type to disable. | ||
660 | * Handler - Address of the handler | ||
661 | * | ||
662 | * RETURN: Status | ||
663 | * | ||
664 | * DESCRIPTION: Disables the event and unregisters the event handler. | ||
665 | * | ||
666 | ******************************************************************************/ | ||
667 | acpi_status | ||
668 | acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) | ||
669 | { | ||
670 | acpi_status status = AE_OK; | ||
671 | |||
672 | ACPI_FUNCTION_TRACE(acpi_remove_fixed_event_handler); | ||
673 | |||
674 | /* Parameter validation */ | ||
675 | |||
676 | if (event > ACPI_EVENT_MAX) { | ||
677 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
678 | } | ||
679 | |||
680 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
681 | if (ACPI_FAILURE(status)) { | ||
682 | return_ACPI_STATUS(status); | ||
683 | } | ||
684 | |||
685 | /* Disable the event before removing the handler */ | ||
686 | |||
687 | status = acpi_disable_event(event, 0); | ||
688 | |||
689 | /* Always Remove the handler */ | ||
690 | |||
691 | acpi_gbl_fixed_event_handlers[event].handler = NULL; | ||
692 | acpi_gbl_fixed_event_handlers[event].context = NULL; | ||
693 | |||
694 | if (ACPI_FAILURE(status)) { | ||
695 | ACPI_WARNING((AE_INFO, | ||
696 | "Could not write to fixed event enable register 0x%X", | ||
697 | event)); | ||
698 | } else { | ||
699 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Disabled fixed event %X\n", | ||
700 | event)); | ||
701 | } | ||
702 | |||
703 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
704 | return_ACPI_STATUS(status); | ||
705 | } | ||
706 | |||
707 | ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler) | ||
708 | |||
709 | /******************************************************************************* | ||
710 | * | ||
708 | * FUNCTION: acpi_install_gpe_handler | 711 | * FUNCTION: acpi_install_gpe_handler |
709 | * | 712 | * |
710 | * PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT | 713 | * PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT |
@@ -984,3 +987,4 @@ acpi_status acpi_release_global_lock(u32 handle) | |||
984 | } | 987 | } |
985 | 988 | ||
986 | ACPI_EXPORT_SYMBOL(acpi_release_global_lock) | 989 | ACPI_EXPORT_SYMBOL(acpi_release_global_lock) |
990 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c index 1768bbec1002..77cee5a5e891 100644 --- a/drivers/acpi/acpica/evxfevnt.c +++ b/drivers/acpi/acpica/evxfevnt.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #define _COMPONENT ACPI_EVENTS | 49 | #define _COMPONENT ACPI_EVENTS |
50 | ACPI_MODULE_NAME("evxfevnt") | 50 | ACPI_MODULE_NAME("evxfevnt") |
51 | 51 | ||
52 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | ||
52 | /******************************************************************************* | 53 | /******************************************************************************* |
53 | * | 54 | * |
54 | * FUNCTION: acpi_enable | 55 | * FUNCTION: acpi_enable |
@@ -352,3 +353,4 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) | |||
352 | } | 353 | } |
353 | 354 | ||
354 | ACPI_EXPORT_SYMBOL(acpi_get_event_status) | 355 | ACPI_EXPORT_SYMBOL(acpi_get_event_status) |
356 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index 33388fd69df4..86f9b343ebd4 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #define _COMPONENT ACPI_EVENTS | 50 | #define _COMPONENT ACPI_EVENTS |
51 | ACPI_MODULE_NAME("evxfgpe") | 51 | ACPI_MODULE_NAME("evxfgpe") |
52 | 52 | ||
53 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | ||
53 | /****************************************************************************** | 54 | /****************************************************************************** |
54 | * | 55 | * |
55 | * FUNCTION: acpi_update_all_gpes | 56 | * FUNCTION: acpi_update_all_gpes |
@@ -695,3 +696,4 @@ acpi_get_gpe_device(u32 index, acpi_handle *gpe_device) | |||
695 | } | 696 | } |
696 | 697 | ||
697 | ACPI_EXPORT_SYMBOL(acpi_get_gpe_device) | 698 | ACPI_EXPORT_SYMBOL(acpi_get_gpe_device) |
699 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/hwacpi.c b/drivers/acpi/acpica/hwacpi.c index d21ec5f0b3a9..d0b9ed5df97e 100644 --- a/drivers/acpi/acpica/hwacpi.c +++ b/drivers/acpi/acpica/hwacpi.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #define _COMPONENT ACPI_HARDWARE | 48 | #define _COMPONENT ACPI_HARDWARE |
49 | ACPI_MODULE_NAME("hwacpi") | 49 | ACPI_MODULE_NAME("hwacpi") |
50 | 50 | ||
51 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | ||
51 | /****************************************************************************** | 52 | /****************************************************************************** |
52 | * | 53 | * |
53 | * FUNCTION: acpi_hw_set_mode | 54 | * FUNCTION: acpi_hw_set_mode |
@@ -166,3 +167,5 @@ u32 acpi_hw_get_mode(void) | |||
166 | return_UINT32(ACPI_SYS_MODE_LEGACY); | 167 | return_UINT32(ACPI_SYS_MODE_LEGACY); |
167 | } | 168 | } |
168 | } | 169 | } |
170 | |||
171 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c index 1a6894afef79..25bd28c4ae8d 100644 --- a/drivers/acpi/acpica/hwgpe.c +++ b/drivers/acpi/acpica/hwgpe.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #define _COMPONENT ACPI_HARDWARE | 49 | #define _COMPONENT ACPI_HARDWARE |
50 | ACPI_MODULE_NAME("hwgpe") | 50 | ACPI_MODULE_NAME("hwgpe") |
51 | 51 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | |
52 | /* Local prototypes */ | 52 | /* Local prototypes */ |
53 | static acpi_status | 53 | static acpi_status |
54 | acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | 54 | acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
@@ -479,3 +479,5 @@ acpi_status acpi_hw_enable_all_wakeup_gpes(void) | |||
479 | status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block, NULL); | 479 | status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block, NULL); |
480 | return_ACPI_STATUS(status); | 480 | return_ACPI_STATUS(status); |
481 | } | 481 | } |
482 | |||
483 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c index 4ea4eeb51bfd..17a78e5ef175 100644 --- a/drivers/acpi/acpica/hwregs.c +++ b/drivers/acpi/acpica/hwregs.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #define _COMPONENT ACPI_HARDWARE | 51 | #define _COMPONENT ACPI_HARDWARE |
52 | ACPI_MODULE_NAME("hwregs") | 52 | ACPI_MODULE_NAME("hwregs") |
53 | 53 | ||
54 | #if (!ACPI_REDUCED_HARDWARE) | ||
54 | /* Local Prototypes */ | 55 | /* Local Prototypes */ |
55 | static acpi_status | 56 | static acpi_status |
56 | acpi_hw_read_multiple(u32 *value, | 57 | acpi_hw_read_multiple(u32 *value, |
@@ -62,6 +63,8 @@ acpi_hw_write_multiple(u32 value, | |||
62 | struct acpi_generic_address *register_a, | 63 | struct acpi_generic_address *register_a, |
63 | struct acpi_generic_address *register_b); | 64 | struct acpi_generic_address *register_b); |
64 | 65 | ||
66 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
67 | |||
65 | /****************************************************************************** | 68 | /****************************************************************************** |
66 | * | 69 | * |
67 | * FUNCTION: acpi_hw_validate_register | 70 | * FUNCTION: acpi_hw_validate_register |
@@ -240,6 +243,7 @@ acpi_status acpi_hw_write(u32 value, struct acpi_generic_address *reg) | |||
240 | return (status); | 243 | return (status); |
241 | } | 244 | } |
242 | 245 | ||
246 | #if (!ACPI_REDUCED_HARDWARE) | ||
243 | /******************************************************************************* | 247 | /******************************************************************************* |
244 | * | 248 | * |
245 | * FUNCTION: acpi_hw_clear_acpi_status | 249 | * FUNCTION: acpi_hw_clear_acpi_status |
@@ -285,7 +289,7 @@ exit: | |||
285 | 289 | ||
286 | /******************************************************************************* | 290 | /******************************************************************************* |
287 | * | 291 | * |
288 | * FUNCTION: acpi_hw_get_register_bit_mask | 292 | * FUNCTION: acpi_hw_get_bit_register_info |
289 | * | 293 | * |
290 | * PARAMETERS: register_id - Index of ACPI Register to access | 294 | * PARAMETERS: register_id - Index of ACPI Register to access |
291 | * | 295 | * |
@@ -658,3 +662,5 @@ acpi_hw_write_multiple(u32 value, | |||
658 | 662 | ||
659 | return (status); | 663 | return (status); |
660 | } | 664 | } |
665 | |||
666 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c index 59a2a6b897d4..fa341471c231 100644 --- a/drivers/acpi/acpica/hwsleep.c +++ b/drivers/acpi/acpica/hwsleep.c | |||
@@ -197,6 +197,7 @@ void acpi_hw_execute_SST(u32 indicator_id) | |||
197 | } | 197 | } |
198 | } | 198 | } |
199 | 199 | ||
200 | #if (!ACPI_REDUCED_HARDWARE) | ||
200 | /******************************************************************************* | 201 | /******************************************************************************* |
201 | * | 202 | * |
202 | * FUNCTION: acpi_hw_legacy_sleep | 203 | * FUNCTION: acpi_hw_legacy_sleep |
@@ -512,6 +513,7 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state) | |||
512 | return_ACPI_STATUS(status); | 513 | return_ACPI_STATUS(status); |
513 | } | 514 | } |
514 | 515 | ||
516 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
515 | 517 | ||
516 | /******************************************************************************* | 518 | /******************************************************************************* |
517 | * | 519 | * |
diff --git a/drivers/acpi/acpica/hwtimer.c b/drivers/acpi/acpica/hwtimer.c index d4973d9da9f1..f1b2c3b94cac 100644 --- a/drivers/acpi/acpica/hwtimer.c +++ b/drivers/acpi/acpica/hwtimer.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #define _COMPONENT ACPI_HARDWARE | 49 | #define _COMPONENT ACPI_HARDWARE |
50 | ACPI_MODULE_NAME("hwtimer") | 50 | ACPI_MODULE_NAME("hwtimer") |
51 | 51 | ||
52 | #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ | ||
52 | /****************************************************************************** | 53 | /****************************************************************************** |
53 | * | 54 | * |
54 | * FUNCTION: acpi_get_timer_resolution | 55 | * FUNCTION: acpi_get_timer_resolution |
@@ -187,3 +188,4 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) | |||
187 | } | 188 | } |
188 | 189 | ||
189 | ACPI_EXPORT_SYMBOL(acpi_get_timer_duration) | 190 | ACPI_EXPORT_SYMBOL(acpi_get_timer_duration) |
191 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c index 9d38eb6c0d0b..bb8dba612212 100644 --- a/drivers/acpi/acpica/hwxface.c +++ b/drivers/acpi/acpica/hwxface.c | |||
@@ -286,6 +286,7 @@ acpi_status acpi_write(u64 value, struct acpi_generic_address *reg) | |||
286 | 286 | ||
287 | ACPI_EXPORT_SYMBOL(acpi_write) | 287 | ACPI_EXPORT_SYMBOL(acpi_write) |
288 | 288 | ||
289 | #if (!ACPI_REDUCED_HARDWARE) | ||
289 | /******************************************************************************* | 290 | /******************************************************************************* |
290 | * | 291 | * |
291 | * FUNCTION: acpi_read_bit_register | 292 | * FUNCTION: acpi_read_bit_register |
@@ -453,7 +454,7 @@ unlock_and_exit: | |||
453 | } | 454 | } |
454 | 455 | ||
455 | ACPI_EXPORT_SYMBOL(acpi_write_bit_register) | 456 | ACPI_EXPORT_SYMBOL(acpi_write_bit_register) |
456 | 457 | #endif /* !ACPI_REDUCED_HARDWARE */ | |
457 | /******************************************************************************* | 458 | /******************************************************************************* |
458 | * | 459 | * |
459 | * FUNCTION: acpi_get_sleep_type_data | 460 | * FUNCTION: acpi_get_sleep_type_data |
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c index 29c0fd3810b0..d599961e93c8 100644 --- a/drivers/acpi/acpica/hwxfsleep.c +++ b/drivers/acpi/acpica/hwxfsleep.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #define _COMPONENT ACPI_HARDWARE | 48 | #define _COMPONENT ACPI_HARDWARE |
49 | ACPI_MODULE_NAME("hwxfsleep") | 49 | ACPI_MODULE_NAME("hwxfsleep") |
50 | 50 | ||
51 | #if (!ACPI_REDUCED_HARDWARE) | ||
51 | /******************************************************************************* | 52 | /******************************************************************************* |
52 | * | 53 | * |
53 | * FUNCTION: acpi_set_firmware_waking_vector | 54 | * FUNCTION: acpi_set_firmware_waking_vector |
@@ -189,7 +190,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) | |||
189 | } | 190 | } |
190 | 191 | ||
191 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios) | 192 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios) |
192 | 193 | #endif /* !ACPI_REDUCED_HARDWARE */ | |
193 | /******************************************************************************* | 194 | /******************************************************************************* |
194 | * | 195 | * |
195 | * FUNCTION: acpi_enter_sleep_state_prep | 196 | * FUNCTION: acpi_enter_sleep_state_prep |
@@ -290,6 +291,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) | |||
290 | acpi_gbl_sleep_type_a, acpi_gbl_sleep_type_b)); | 291 | acpi_gbl_sleep_type_a, acpi_gbl_sleep_type_b)); |
291 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 292 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
292 | } | 293 | } |
294 | #if (!ACPI_REDUCED_HARDWARE) | ||
293 | 295 | ||
294 | /* If Hardware Reduced flag is set, must use the extended sleep registers */ | 296 | /* If Hardware Reduced flag is set, must use the extended sleep registers */ |
295 | 297 | ||
@@ -301,6 +303,11 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) | |||
301 | status = acpi_hw_legacy_sleep(sleep_state); | 303 | status = acpi_hw_legacy_sleep(sleep_state); |
302 | } | 304 | } |
303 | 305 | ||
306 | #else | ||
307 | status = acpi_hw_extended_sleep(sleep_state); | ||
308 | |||
309 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
310 | |||
304 | return_ACPI_STATUS(status); | 311 | return_ACPI_STATUS(status); |
305 | } | 312 | } |
306 | 313 | ||
@@ -326,6 +333,8 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) | |||
326 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); | 333 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); |
327 | 334 | ||
328 | 335 | ||
336 | #if (!ACPI_REDUCED_HARDWARE) | ||
337 | |||
329 | /* If Hardware Reduced flag is set, must use the extended sleep registers */ | 338 | /* If Hardware Reduced flag is set, must use the extended sleep registers */ |
330 | 339 | ||
331 | if (acpi_gbl_reduced_hardware || acpi_gbl_FADT.sleep_control.address) { | 340 | if (acpi_gbl_reduced_hardware || acpi_gbl_FADT.sleep_control.address) { |
@@ -335,6 +344,10 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) | |||
335 | 344 | ||
336 | status = acpi_hw_legacy_wake_prep(sleep_state); | 345 | status = acpi_hw_legacy_wake_prep(sleep_state); |
337 | } | 346 | } |
347 | #else | ||
348 | status = acpi_hw_extended_wake_prep(sleep_state); | ||
349 | |||
350 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
338 | 351 | ||
339 | 352 | ||
340 | return_ACPI_STATUS(status); | 353 | return_ACPI_STATUS(status); |
@@ -361,6 +374,8 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
361 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); | 374 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); |
362 | 375 | ||
363 | 376 | ||
377 | #if (!ACPI_REDUCED_HARDWARE) | ||
378 | |||
364 | /* If Hardware Reduced flag is set, must use the extended sleep registers */ | 379 | /* If Hardware Reduced flag is set, must use the extended sleep registers */ |
365 | 380 | ||
366 | if (acpi_gbl_reduced_hardware || acpi_gbl_FADT.sleep_control.address) { | 381 | if (acpi_gbl_reduced_hardware || acpi_gbl_FADT.sleep_control.address) { |
@@ -371,6 +386,11 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
371 | status = acpi_hw_legacy_wake(sleep_state); | 386 | status = acpi_hw_legacy_wake(sleep_state); |
372 | } | 387 | } |
373 | 388 | ||
389 | #else | ||
390 | status = acpi_hw_extended_wake(sleep_state); | ||
391 | |||
392 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
393 | |||
374 | return_ACPI_STATUS(status); | 394 | return_ACPI_STATUS(status); |
375 | } | 395 | } |
376 | 396 | ||
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 09ca39e14337..1347c084fc2b 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c | |||
@@ -118,6 +118,7 @@ acpi_tb_check_xsdt(acpi_physical_address address) | |||
118 | return AE_OK; | 118 | return AE_OK; |
119 | } | 119 | } |
120 | 120 | ||
121 | #if (!ACPI_REDUCED_HARDWARE) | ||
121 | /******************************************************************************* | 122 | /******************************************************************************* |
122 | * | 123 | * |
123 | * FUNCTION: acpi_tb_initialize_facs | 124 | * FUNCTION: acpi_tb_initialize_facs |
@@ -148,6 +149,7 @@ acpi_status acpi_tb_initialize_facs(void) | |||
148 | &acpi_gbl_FACS)); | 149 | &acpi_gbl_FACS)); |
149 | return status; | 150 | return status; |
150 | } | 151 | } |
152 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
151 | 153 | ||
152 | /******************************************************************************* | 154 | /******************************************************************************* |
153 | * | 155 | * |
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c index 4153584cf526..90f53b42eca9 100644 --- a/drivers/acpi/acpica/utglobal.c +++ b/drivers/acpi/acpica/utglobal.c | |||
@@ -140,6 +140,7 @@ const struct acpi_predefined_names acpi_gbl_pre_defined_names[] = { | |||
140 | {NULL, ACPI_TYPE_ANY, NULL} | 140 | {NULL, ACPI_TYPE_ANY, NULL} |
141 | }; | 141 | }; |
142 | 142 | ||
143 | #if (!ACPI_REDUCED_HARDWARE) | ||
143 | /****************************************************************************** | 144 | /****************************************************************************** |
144 | * | 145 | * |
145 | * Event and Hardware globals | 146 | * Event and Hardware globals |
@@ -236,6 +237,7 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] = | |||
236 | ACPI_BITMASK_RT_CLOCK_STATUS, | 237 | ACPI_BITMASK_RT_CLOCK_STATUS, |
237 | ACPI_BITMASK_RT_CLOCK_ENABLE}, | 238 | ACPI_BITMASK_RT_CLOCK_ENABLE}, |
238 | }; | 239 | }; |
240 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
239 | 241 | ||
240 | /******************************************************************************* | 242 | /******************************************************************************* |
241 | * | 243 | * |
@@ -286,6 +288,8 @@ acpi_status acpi_ut_init_globals(void) | |||
286 | 288 | ||
287 | acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; | 289 | acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; |
288 | 290 | ||
291 | #if (!ACPI_REDUCED_HARDWARE) | ||
292 | |||
289 | /* GPE support */ | 293 | /* GPE support */ |
290 | 294 | ||
291 | acpi_gbl_gpe_xrupt_list_head = NULL; | 295 | acpi_gbl_gpe_xrupt_list_head = NULL; |
@@ -294,6 +298,10 @@ acpi_status acpi_ut_init_globals(void) | |||
294 | acpi_current_gpe_count = 0; | 298 | acpi_current_gpe_count = 0; |
295 | acpi_gbl_all_gpes_initialized = FALSE; | 299 | acpi_gbl_all_gpes_initialized = FALSE; |
296 | 300 | ||
301 | acpi_gbl_global_event_handler = NULL; | ||
302 | |||
303 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
304 | |||
297 | /* Global handlers */ | 305 | /* Global handlers */ |
298 | 306 | ||
299 | acpi_gbl_system_notify.handler = NULL; | 307 | acpi_gbl_system_notify.handler = NULL; |
@@ -302,7 +310,6 @@ acpi_status acpi_ut_init_globals(void) | |||
302 | acpi_gbl_init_handler = NULL; | 310 | acpi_gbl_init_handler = NULL; |
303 | acpi_gbl_table_handler = NULL; | 311 | acpi_gbl_table_handler = NULL; |
304 | acpi_gbl_interface_handler = NULL; | 312 | acpi_gbl_interface_handler = NULL; |
305 | acpi_gbl_global_event_handler = NULL; | ||
306 | 313 | ||
307 | /* Global Lock support */ | 314 | /* Global Lock support */ |
308 | 315 | ||
diff --git a/drivers/acpi/acpica/utinit.c b/drivers/acpi/acpica/utinit.c index 8359c0c5dc98..246798e4c938 100644 --- a/drivers/acpi/acpica/utinit.c +++ b/drivers/acpi/acpica/utinit.c | |||
@@ -53,27 +53,35 @@ ACPI_MODULE_NAME("utinit") | |||
53 | /* Local prototypes */ | 53 | /* Local prototypes */ |
54 | static void acpi_ut_terminate(void); | 54 | static void acpi_ut_terminate(void); |
55 | 55 | ||
56 | #if (!ACPI_REDUCED_HARDWARE) | ||
57 | |||
58 | static void acpi_ut_free_gpe_lists(void); | ||
59 | |||
60 | #else | ||
61 | |||
62 | #define acpi_ut_free_gpe_lists() | ||
63 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
64 | |||
65 | #if (!ACPI_REDUCED_HARDWARE) | ||
56 | /****************************************************************************** | 66 | /****************************************************************************** |
57 | * | 67 | * |
58 | * FUNCTION: acpi_ut_terminate | 68 | * FUNCTION: acpi_ut_free_gpe_lists |
59 | * | 69 | * |
60 | * PARAMETERS: none | 70 | * PARAMETERS: none |
61 | * | 71 | * |
62 | * RETURN: none | 72 | * RETURN: none |
63 | * | 73 | * |
64 | * DESCRIPTION: Free global memory | 74 | * DESCRIPTION: Free global GPE lists |
65 | * | 75 | * |
66 | ******************************************************************************/ | 76 | ******************************************************************************/ |
67 | 77 | ||
68 | static void acpi_ut_terminate(void) | 78 | static void acpi_ut_free_gpe_lists(void) |
69 | { | 79 | { |
70 | struct acpi_gpe_block_info *gpe_block; | 80 | struct acpi_gpe_block_info *gpe_block; |
71 | struct acpi_gpe_block_info *next_gpe_block; | 81 | struct acpi_gpe_block_info *next_gpe_block; |
72 | struct acpi_gpe_xrupt_info *gpe_xrupt_info; | 82 | struct acpi_gpe_xrupt_info *gpe_xrupt_info; |
73 | struct acpi_gpe_xrupt_info *next_gpe_xrupt_info; | 83 | struct acpi_gpe_xrupt_info *next_gpe_xrupt_info; |
74 | 84 | ||
75 | ACPI_FUNCTION_TRACE(ut_terminate); | ||
76 | |||
77 | /* Free global GPE blocks and related info structures */ | 85 | /* Free global GPE blocks and related info structures */ |
78 | 86 | ||
79 | gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head; | 87 | gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head; |
@@ -91,7 +99,26 @@ static void acpi_ut_terminate(void) | |||
91 | ACPI_FREE(gpe_xrupt_info); | 99 | ACPI_FREE(gpe_xrupt_info); |
92 | gpe_xrupt_info = next_gpe_xrupt_info; | 100 | gpe_xrupt_info = next_gpe_xrupt_info; |
93 | } | 101 | } |
102 | } | ||
103 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
104 | |||
105 | /****************************************************************************** | ||
106 | * | ||
107 | * FUNCTION: acpi_ut_terminate | ||
108 | * | ||
109 | * PARAMETERS: none | ||
110 | * | ||
111 | * RETURN: none | ||
112 | * | ||
113 | * DESCRIPTION: Free global memory | ||
114 | * | ||
115 | ******************************************************************************/ | ||
116 | |||
117 | static void acpi_ut_terminate(void) | ||
118 | { | ||
119 | ACPI_FUNCTION_TRACE(ut_terminate); | ||
94 | 120 | ||
121 | acpi_ut_free_gpe_lists(); | ||
95 | acpi_ut_delete_address_lists(); | 122 | acpi_ut_delete_address_lists(); |
96 | return_VOID; | 123 | return_VOID; |
97 | } | 124 | } |
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c index 644e8c8ebc4b..afa94f51ff0b 100644 --- a/drivers/acpi/acpica/utxface.c +++ b/drivers/acpi/acpica/utxface.c | |||
@@ -145,6 +145,8 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
145 | 145 | ||
146 | ACPI_FUNCTION_TRACE(acpi_enable_subsystem); | 146 | ACPI_FUNCTION_TRACE(acpi_enable_subsystem); |
147 | 147 | ||
148 | #if (!ACPI_REDUCED_HARDWARE) | ||
149 | |||
148 | /* Enable ACPI mode */ | 150 | /* Enable ACPI mode */ |
149 | 151 | ||
150 | if (!(flags & ACPI_NO_ACPI_ENABLE)) { | 152 | if (!(flags & ACPI_NO_ACPI_ENABLE)) { |
@@ -169,6 +171,7 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
169 | ACPI_WARNING((AE_INFO, "Could not map the FACS table")); | 171 | ACPI_WARNING((AE_INFO, "Could not map the FACS table")); |
170 | return_ACPI_STATUS(status); | 172 | return_ACPI_STATUS(status); |
171 | } | 173 | } |
174 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
172 | 175 | ||
173 | /* | 176 | /* |
174 | * Install the default op_region handlers. These are installed unless | 177 | * Install the default op_region handlers. These are installed unless |
@@ -184,7 +187,7 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
184 | return_ACPI_STATUS(status); | 187 | return_ACPI_STATUS(status); |
185 | } | 188 | } |
186 | } | 189 | } |
187 | 190 | #if (!ACPI_REDUCED_HARDWARE) | |
188 | /* | 191 | /* |
189 | * Initialize ACPI Event handling (Fixed and General Purpose) | 192 | * Initialize ACPI Event handling (Fixed and General Purpose) |
190 | * | 193 | * |
@@ -220,6 +223,7 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
220 | return_ACPI_STATUS(status); | 223 | return_ACPI_STATUS(status); |
221 | } | 224 | } |
222 | } | 225 | } |
226 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
223 | 227 | ||
224 | return_ACPI_STATUS(status); | 228 | return_ACPI_STATUS(status); |
225 | } | 229 | } |