diff options
author | Robert Moore <robert.moore@intel.com> | 2005-06-24 00:00:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-07-13 23:45:36 -0400 |
commit | 73459f73e5d1602c59ebec114fc45185521353c1 (patch) | |
tree | 56c2183e345784d2be09c2f5d2530cf36221c55e /include | |
parent | 88ac00f5a841dcfc5c682000f4a6add0add8caac (diff) |
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acconfig.h | 9 | ||||
-rw-r--r-- | include/acpi/acdebug.h | 6 | ||||
-rw-r--r-- | include/acpi/acdisasm.h | 1 | ||||
-rw-r--r-- | include/acpi/acdispat.h | 6 | ||||
-rw-r--r-- | include/acpi/acevents.h | 3 | ||||
-rw-r--r-- | include/acpi/acglobal.h | 26 | ||||
-rw-r--r-- | include/acpi/achware.h | 6 | ||||
-rw-r--r-- | include/acpi/aclocal.h | 24 | ||||
-rw-r--r-- | include/acpi/acparser.h | 26 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 35 | ||||
-rw-r--r-- | include/acpi/acstruct.h | 3 | ||||
-rw-r--r-- | include/acpi/actypes.h | 5 | ||||
-rw-r--r-- | include/acpi/acutils.h | 63 | ||||
-rw-r--r-- | include/acpi/amlcode.h | 4 | ||||
-rw-r--r-- | include/acpi/platform/acenv.h | 19 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 11 |
16 files changed, 155 insertions, 92 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 6babcb104930..dd9b70cc9634 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -64,7 +64,7 @@ | |||
64 | 64 | ||
65 | /* Version string */ | 65 | /* Version string */ |
66 | 66 | ||
67 | #define ACPI_CA_VERSION 0x20050526 | 67 | #define ACPI_CA_VERSION 0x20050624 |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | 70 | * OS name, used for the _OS object. The _OS object is essentially obsolete, |
@@ -78,11 +78,10 @@ | |||
78 | 78 | ||
79 | /* Maximum objects in the various object caches */ | 79 | /* Maximum objects in the various object caches */ |
80 | 80 | ||
81 | #define ACPI_MAX_STATE_CACHE_DEPTH 64 /* State objects */ | 81 | #define ACPI_MAX_STATE_CACHE_DEPTH 96 /* State objects */ |
82 | #define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ | 82 | #define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ |
83 | #define ACPI_MAX_EXTPARSE_CACHE_DEPTH 64 /* Parse tree objects */ | 83 | #define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */ |
84 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */ | 84 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ |
85 | #define ACPI_MAX_WALK_CACHE_DEPTH 4 /* Objects for parse tree walks */ | ||
86 | 85 | ||
87 | /* | 86 | /* |
88 | * Should the subystem abort the loading of an ACPI table if the | 87 | * Should the subystem abort the loading of an ACPI table if the |
diff --git a/include/acpi/acdebug.h b/include/acpi/acdebug.h index 8ba372b0f245..f8fa2227583d 100644 --- a/include/acpi/acdebug.h +++ b/include/acpi/acdebug.h | |||
@@ -114,6 +114,10 @@ acpi_db_set_method_call_breakpoint ( | |||
114 | union acpi_parse_object *op); | 114 | union acpi_parse_object *op); |
115 | 115 | ||
116 | void | 116 | void |
117 | acpi_db_get_bus_info ( | ||
118 | void); | ||
119 | |||
120 | void | ||
117 | acpi_db_disassemble_aml ( | 121 | acpi_db_disassemble_aml ( |
118 | char *statements, | 122 | char *statements, |
119 | union acpi_parse_object *op); | 123 | union acpi_parse_object *op); |
@@ -327,7 +331,7 @@ acpi_db_set_output_destination ( | |||
327 | u32 where); | 331 | u32 where); |
328 | 332 | ||
329 | void | 333 | void |
330 | acpi_db_dump_object ( | 334 | acpi_db_dump_external_object ( |
331 | union acpi_object *obj_desc, | 335 | union acpi_object *obj_desc, |
332 | u32 level); | 336 | u32 level); |
333 | 337 | ||
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index dbfa877121ba..fcc2d507faca 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h | |||
@@ -90,6 +90,7 @@ struct acpi_op_walk_info | |||
90 | { | 90 | { |
91 | u32 level; | 91 | u32 level; |
92 | u32 bit_offset; | 92 | u32 bit_offset; |
93 | struct acpi_walk_state *walk_state; | ||
93 | }; | 94 | }; |
94 | 95 | ||
95 | typedef | 96 | typedef |
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h index 8f5f2f71b1de..fde6aa9fcd02 100644 --- a/include/acpi/acdispat.h +++ b/include/acpi/acdispat.h | |||
@@ -450,10 +450,4 @@ acpi_ds_result_pop_from_bottom ( | |||
450 | union acpi_operand_object **object, | 450 | union acpi_operand_object **object, |
451 | struct acpi_walk_state *walk_state); | 451 | struct acpi_walk_state *walk_state); |
452 | 452 | ||
453 | #ifdef ACPI_ENABLE_OBJECT_CACHE | ||
454 | void | ||
455 | acpi_ds_delete_walk_state_cache ( | ||
456 | void); | ||
457 | #endif | ||
458 | |||
459 | #endif /* _ACDISPAT_H_ */ | 453 | #endif /* _ACDISPAT_H_ */ |
diff --git a/include/acpi/acevents.h b/include/acpi/acevents.h index 301c5cce6660..33ae2ca997b7 100644 --- a/include/acpi/acevents.h +++ b/include/acpi/acevents.h | |||
@@ -122,8 +122,7 @@ acpi_ev_valid_gpe_event ( | |||
122 | 122 | ||
123 | acpi_status | 123 | acpi_status |
124 | acpi_ev_walk_gpe_list ( | 124 | acpi_ev_walk_gpe_list ( |
125 | ACPI_GPE_CALLBACK gpe_walk_callback, | 125 | ACPI_GPE_CALLBACK gpe_walk_callback); |
126 | u32 flags); | ||
127 | 126 | ||
128 | acpi_status | 127 | acpi_status |
129 | acpi_ev_delete_gpe_handlers ( | 128 | acpi_ev_delete_gpe_handlers ( |
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index 4946696088c3..8d5a397abd6b 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h | |||
@@ -151,6 +151,13 @@ ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS; | |||
151 | */ | 151 | */ |
152 | 152 | ||
153 | 153 | ||
154 | /* The root table can be either an RSDT or an XSDT */ | ||
155 | |||
156 | ACPI_EXTERN u8 acpi_gbl_root_table_type; | ||
157 | #define ACPI_TABLE_TYPE_RSDT 'R' | ||
158 | #define ACPI_TABLE_TYPE_XSDT 'X' | ||
159 | |||
160 | |||
154 | /* | 161 | /* |
155 | * Handle both ACPI 1.0 and ACPI 2.0 Integer widths: | 162 | * Handle both ACPI 1.0 and ACPI 2.0 Integer widths: |
156 | * If we are executing a method that exists in a 32-bit ACPI table, | 163 | * If we are executing a method that exists in a 32-bit ACPI table, |
@@ -180,8 +187,23 @@ ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[NUM_MUTEX]; | |||
180 | * | 187 | * |
181 | ****************************************************************************/ | 188 | ****************************************************************************/ |
182 | 189 | ||
190 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | ||
191 | |||
192 | /* Lists for tracking memory allocations */ | ||
193 | |||
194 | ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list; | ||
195 | ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; | ||
196 | #endif | ||
197 | |||
198 | /* Object caches */ | ||
199 | |||
200 | ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache; | ||
201 | ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache; | ||
202 | ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache; | ||
203 | ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache; | ||
204 | |||
205 | /* Global handlers */ | ||
183 | 206 | ||
184 | ACPI_EXTERN struct acpi_memory_list acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS]; | ||
185 | ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify; | 207 | ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify; |
186 | ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify; | 208 | ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify; |
187 | ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; | 209 | ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; |
@@ -189,6 +211,8 @@ ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; | |||
189 | ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; | 211 | ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; |
190 | ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore; | 212 | ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore; |
191 | 213 | ||
214 | /* Misc */ | ||
215 | |||
192 | ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count; | 216 | ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count; |
193 | ACPI_EXTERN u32 acpi_gbl_original_mode; | 217 | ACPI_EXTERN u32 acpi_gbl_original_mode; |
194 | ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; | 218 | ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; |
diff --git a/include/acpi/achware.h b/include/acpi/achware.h index 9d63641b8e7d..cf5de4625a71 100644 --- a/include/acpi/achware.h +++ b/include/acpi/achware.h | |||
@@ -143,15 +143,15 @@ acpi_hw_get_gpe_status ( | |||
143 | 143 | ||
144 | acpi_status | 144 | acpi_status |
145 | acpi_hw_disable_all_gpes ( | 145 | acpi_hw_disable_all_gpes ( |
146 | u32 flags); | 146 | void); |
147 | 147 | ||
148 | acpi_status | 148 | acpi_status |
149 | acpi_hw_enable_all_runtime_gpes ( | 149 | acpi_hw_enable_all_runtime_gpes ( |
150 | u32 flags); | 150 | void); |
151 | 151 | ||
152 | acpi_status | 152 | acpi_status |
153 | acpi_hw_enable_all_wakeup_gpes ( | 153 | acpi_hw_enable_all_wakeup_gpes ( |
154 | u32 flags); | 154 | void); |
155 | 155 | ||
156 | acpi_status | 156 | acpi_status |
157 | acpi_hw_enable_runtime_gpe_block ( | 157 | acpi_hw_enable_runtime_gpe_block ( |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 52c6a2025860..58f9ba1a34e7 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -953,24 +953,18 @@ struct acpi_debug_mem_block | |||
953 | 953 | ||
954 | #define ACPI_MEM_LIST_GLOBAL 0 | 954 | #define ACPI_MEM_LIST_GLOBAL 0 |
955 | #define ACPI_MEM_LIST_NSNODE 1 | 955 | #define ACPI_MEM_LIST_NSNODE 1 |
956 | 956 | #define ACPI_MEM_LIST_MAX 1 | |
957 | #define ACPI_MEM_LIST_FIRST_CACHE_LIST 2 | 957 | #define ACPI_NUM_MEM_LISTS 2 |
958 | #define ACPI_MEM_LIST_STATE 2 | ||
959 | #define ACPI_MEM_LIST_PSNODE 3 | ||
960 | #define ACPI_MEM_LIST_PSNODE_EXT 4 | ||
961 | #define ACPI_MEM_LIST_OPERAND 5 | ||
962 | #define ACPI_MEM_LIST_WALK 6 | ||
963 | #define ACPI_MEM_LIST_MAX 6 | ||
964 | #define ACPI_NUM_MEM_LISTS 7 | ||
965 | 958 | ||
966 | 959 | ||
967 | struct acpi_memory_list | 960 | struct acpi_memory_list |
968 | { | 961 | { |
962 | char *list_name; | ||
969 | void *list_head; | 963 | void *list_head; |
970 | u16 link_offset; | ||
971 | u16 max_cache_depth; | ||
972 | u16 cache_depth; | ||
973 | u16 object_size; | 964 | u16 object_size; |
965 | u16 max_depth; | ||
966 | u16 current_depth; | ||
967 | u16 link_offset; | ||
974 | 968 | ||
975 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | 969 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS |
976 | 970 | ||
@@ -979,11 +973,9 @@ struct acpi_memory_list | |||
979 | u32 total_allocated; | 973 | u32 total_allocated; |
980 | u32 total_freed; | 974 | u32 total_freed; |
981 | u32 current_total_size; | 975 | u32 current_total_size; |
982 | u32 cache_requests; | 976 | u32 requests; |
983 | u32 cache_hits; | 977 | u32 hits; |
984 | char *list_name; | ||
985 | #endif | 978 | #endif |
986 | }; | 979 | }; |
987 | 980 | ||
988 | |||
989 | #endif /* __ACLOCAL_H__ */ | 981 | #endif /* __ACLOCAL_H__ */ |
diff --git a/include/acpi/acparser.h b/include/acpi/acparser.h index 698276571818..ba9548f94dea 100644 --- a/include/acpi/acparser.h +++ b/include/acpi/acparser.h | |||
@@ -63,6 +63,7 @@ | |||
63 | #define ACPI_PARSE_MODE_MASK 0x0030 | 63 | #define ACPI_PARSE_MODE_MASK 0x0030 |
64 | 64 | ||
65 | #define ACPI_PARSE_DEFERRED_OP 0x0100 | 65 | #define ACPI_PARSE_DEFERRED_OP 0x0100 |
66 | #define ACPI_PARSE_DISASSEMBLE 0x0200 | ||
66 | 67 | ||
67 | 68 | ||
68 | /****************************************************************************** | 69 | /****************************************************************************** |
@@ -158,6 +159,25 @@ u16 | |||
158 | acpi_ps_peek_opcode ( | 159 | acpi_ps_peek_opcode ( |
159 | struct acpi_parse_state *state); | 160 | struct acpi_parse_state *state); |
160 | 161 | ||
162 | acpi_status | ||
163 | acpi_ps_complete_this_op ( | ||
164 | struct acpi_walk_state *walk_state, | ||
165 | union acpi_parse_object *op); | ||
166 | |||
167 | acpi_status | ||
168 | acpi_ps_next_parse_state ( | ||
169 | struct acpi_walk_state *walk_state, | ||
170 | union acpi_parse_object *op, | ||
171 | acpi_status callback_status); | ||
172 | |||
173 | |||
174 | /* | ||
175 | * psloop - main parse loop | ||
176 | */ | ||
177 | acpi_status | ||
178 | acpi_ps_parse_loop ( | ||
179 | struct acpi_walk_state *walk_state); | ||
180 | |||
161 | 181 | ||
162 | /* | 182 | /* |
163 | * psscope - Scope stack management routines | 183 | * psscope - Scope stack management routines |
@@ -291,12 +311,6 @@ acpi_ps_set_name( | |||
291 | union acpi_parse_object *op, | 311 | union acpi_parse_object *op, |
292 | u32 name); | 312 | u32 name); |
293 | 313 | ||
294 | #ifdef ACPI_ENABLE_OBJECT_CACHE | ||
295 | void | ||
296 | acpi_ps_delete_parse_cache ( | ||
297 | void); | ||
298 | #endif | ||
299 | |||
300 | 314 | ||
301 | /* | 315 | /* |
302 | * psdump - display parser tree | 316 | * psdump - display parser tree |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index ea489f235216..819a53f83cfa 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -139,15 +139,14 @@ void | |||
139 | acpi_os_delete_lock ( | 139 | acpi_os_delete_lock ( |
140 | acpi_handle handle); | 140 | acpi_handle handle); |
141 | 141 | ||
142 | void | 142 | unsigned long |
143 | acpi_os_acquire_lock ( | 143 | acpi_os_acquire_lock ( |
144 | acpi_handle handle, | 144 | acpi_handle handle); |
145 | u32 flags); | ||
146 | 145 | ||
147 | void | 146 | void |
148 | acpi_os_release_lock ( | 147 | acpi_os_release_lock ( |
149 | acpi_handle handle, | 148 | acpi_handle handle, |
150 | u32 flags); | 149 | unsigned long flags); |
151 | 150 | ||
152 | 151 | ||
153 | /* | 152 | /* |
@@ -180,6 +179,34 @@ acpi_os_get_physical_address ( | |||
180 | #endif | 179 | #endif |
181 | 180 | ||
182 | 181 | ||
182 | |||
183 | /* | ||
184 | * Memory/Object Cache | ||
185 | */ | ||
186 | acpi_status | ||
187 | acpi_os_create_cache ( | ||
188 | char *cache_name, | ||
189 | u16 object_size, | ||
190 | u16 max_depth, | ||
191 | acpi_cache_t **return_cache); | ||
192 | |||
193 | acpi_status | ||
194 | acpi_os_delete_cache ( | ||
195 | acpi_cache_t *cache); | ||
196 | |||
197 | acpi_status | ||
198 | acpi_os_purge_cache ( | ||
199 | acpi_cache_t *cache); | ||
200 | |||
201 | void * | ||
202 | acpi_os_acquire_object ( | ||
203 | acpi_cache_t *cache); | ||
204 | |||
205 | acpi_status | ||
206 | acpi_os_release_object ( | ||
207 | acpi_cache_t *cache, | ||
208 | void *object); | ||
209 | |||
183 | /* | 210 | /* |
184 | * Interrupt handlers | 211 | * Interrupt handlers |
185 | */ | 212 | */ |
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h index 4e926457bd2f..a2025a8da008 100644 --- a/include/acpi/acstruct.h +++ b/include/acpi/acstruct.h | |||
@@ -162,6 +162,9 @@ struct acpi_walk_info | |||
162 | 162 | ||
163 | #define ACPI_DISPLAY_SUMMARY 0 | 163 | #define ACPI_DISPLAY_SUMMARY 0 |
164 | #define ACPI_DISPLAY_OBJECTS 1 | 164 | #define ACPI_DISPLAY_OBJECTS 1 |
165 | #define ACPI_DISPLAY_MASK 1 | ||
166 | |||
167 | #define ACPI_DISPLAY_SHORT 2 | ||
165 | 168 | ||
166 | struct acpi_get_devices_info | 169 | struct acpi_get_devices_info |
167 | { | 170 | { |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 3a451dc48ac8..8cd774a20c67 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -243,6 +243,11 @@ struct acpi_pointer | |||
243 | #define ACPI_LOGMODE_PHYSPTR ACPI_LOGICAL_ADDRESSING | ACPI_PHYSICAL_POINTER | 243 | #define ACPI_LOGMODE_PHYSPTR ACPI_LOGICAL_ADDRESSING | ACPI_PHYSICAL_POINTER |
244 | #define ACPI_LOGMODE_LOGPTR ACPI_LOGICAL_ADDRESSING | ACPI_LOGICAL_POINTER | 244 | #define ACPI_LOGMODE_LOGPTR ACPI_LOGICAL_ADDRESSING | ACPI_LOGICAL_POINTER |
245 | 245 | ||
246 | /* Types for the OS interface layer (OSL) */ | ||
247 | |||
248 | #ifdef ACPI_USE_LOCAL_CACHE | ||
249 | #define acpi_cache_t struct acpi_memory_list | ||
250 | #endif | ||
246 | 251 | ||
247 | /* | 252 | /* |
248 | * Useful defines | 253 | * Useful defines |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 192d0bea3884..e9c1584dd785 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -557,16 +557,6 @@ void | |||
557 | acpi_ut_delete_generic_state ( | 557 | acpi_ut_delete_generic_state ( |
558 | union acpi_generic_state *state); | 558 | union acpi_generic_state *state); |
559 | 559 | ||
560 | #ifdef ACPI_ENABLE_OBJECT_CACHE | ||
561 | void | ||
562 | acpi_ut_delete_generic_state_cache ( | ||
563 | void); | ||
564 | |||
565 | void | ||
566 | acpi_ut_delete_object_cache ( | ||
567 | void); | ||
568 | #endif | ||
569 | |||
570 | 560 | ||
571 | /* | 561 | /* |
572 | * utmath | 562 | * utmath |
@@ -622,22 +612,6 @@ acpi_ut_strtoul64 ( | |||
622 | 612 | ||
623 | #define ACPI_ANY_BASE 0 | 613 | #define ACPI_ANY_BASE 0 |
624 | 614 | ||
625 | acpi_status | ||
626 | acpi_ut_mutex_initialize ( | ||
627 | void); | ||
628 | |||
629 | void | ||
630 | acpi_ut_mutex_terminate ( | ||
631 | void); | ||
632 | |||
633 | acpi_status | ||
634 | acpi_ut_acquire_mutex ( | ||
635 | acpi_mutex_handle mutex_id); | ||
636 | |||
637 | acpi_status | ||
638 | acpi_ut_release_mutex ( | ||
639 | acpi_mutex_handle mutex_id); | ||
640 | |||
641 | u8 * | 615 | u8 * |
642 | acpi_ut_get_resource_end_tag ( | 616 | acpi_ut_get_resource_end_tag ( |
643 | union acpi_operand_object *obj_desc); | 617 | union acpi_operand_object *obj_desc); |
@@ -666,22 +640,35 @@ acpi_ut_display_init_pathname ( | |||
666 | 640 | ||
667 | 641 | ||
668 | /* | 642 | /* |
669 | * utalloc - memory allocation and object caching | 643 | * utmutex - mutex support |
670 | */ | 644 | */ |
671 | void * | 645 | acpi_status |
672 | acpi_ut_acquire_from_cache ( | 646 | acpi_ut_mutex_initialize ( |
673 | u32 list_id); | 647 | void); |
674 | 648 | ||
675 | void | 649 | void |
676 | acpi_ut_release_to_cache ( | 650 | acpi_ut_mutex_terminate ( |
677 | u32 list_id, | 651 | void); |
678 | void *object); | ||
679 | 652 | ||
680 | #ifdef ACPI_ENABLE_OBJECT_CACHE | 653 | acpi_status |
681 | void | 654 | acpi_ut_acquire_mutex ( |
682 | acpi_ut_delete_generic_cache ( | 655 | acpi_mutex_handle mutex_id); |
683 | u32 list_id); | 656 | |
684 | #endif | 657 | acpi_status |
658 | acpi_ut_release_mutex ( | ||
659 | acpi_mutex_handle mutex_id); | ||
660 | |||
661 | |||
662 | /* | ||
663 | * utalloc - memory allocation and object caching | ||
664 | */ | ||
665 | acpi_status | ||
666 | acpi_ut_create_caches ( | ||
667 | void); | ||
668 | |||
669 | acpi_status | ||
670 | acpi_ut_delete_caches ( | ||
671 | void); | ||
685 | 672 | ||
686 | acpi_status | 673 | acpi_status |
687 | acpi_ut_validate_buffer ( | 674 | acpi_ut_validate_buffer ( |
diff --git a/include/acpi/amlcode.h b/include/acpi/amlcode.h index 55e97ed29190..50a088901196 100644 --- a/include/acpi/amlcode.h +++ b/include/acpi/amlcode.h | |||
@@ -69,7 +69,7 @@ | |||
69 | #define AML_MULTI_NAME_PREFIX_OP (u16) 0x2f | 69 | #define AML_MULTI_NAME_PREFIX_OP (u16) 0x2f |
70 | #define AML_NAME_CHAR_SUBSEQ (u16) 0x30 | 70 | #define AML_NAME_CHAR_SUBSEQ (u16) 0x30 |
71 | #define AML_NAME_CHAR_FIRST (u16) 0x41 | 71 | #define AML_NAME_CHAR_FIRST (u16) 0x41 |
72 | #define AML_OP_PREFIX (u16) 0x5b | 72 | #define AML_EXTENDED_OP_PREFIX (u16) 0x5b |
73 | #define AML_ROOT_PREFIX (u16) 0x5c | 73 | #define AML_ROOT_PREFIX (u16) 0x5c |
74 | #define AML_PARENT_PREFIX (u16) 0x5e | 74 | #define AML_PARENT_PREFIX (u16) 0x5e |
75 | #define AML_LOCAL_OP (u16) 0x60 | 75 | #define AML_LOCAL_OP (u16) 0x60 |
@@ -146,7 +146,7 @@ | |||
146 | 146 | ||
147 | /* prefixed opcodes */ | 147 | /* prefixed opcodes */ |
148 | 148 | ||
149 | #define AML_EXTOP (u16) 0x005b /* prefix for 2-byte opcodes */ | 149 | #define AML_EXTENDED_OPCODE (u16) 0x5b00 /* prefix for 2-byte opcodes */ |
150 | 150 | ||
151 | #define AML_MUTEX_OP (u16) 0x5b01 | 151 | #define AML_MUTEX_OP (u16) 0x5b01 |
152 | #define AML_EVENT_OP (u16) 0x5b02 | 152 | #define AML_EVENT_OP (u16) 0x5b02 |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index adf969efa510..aa63202e8d5d 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -49,35 +49,38 @@ | |||
49 | * Configuration for ACPI tools and utilities | 49 | * Configuration for ACPI tools and utilities |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #ifdef _ACPI_DUMP_APP | 52 | #ifdef ACPI_LIBRARY |
53 | #define ACPI_USE_LOCAL_CACHE | ||
54 | #endif | ||
55 | |||
56 | #ifdef ACPI_DUMP_APP | ||
53 | #ifndef MSDOS | 57 | #ifndef MSDOS |
54 | #define ACPI_DEBUG_OUTPUT | 58 | #define ACPI_DEBUG_OUTPUT |
55 | #endif | 59 | #endif |
56 | #define ACPI_APPLICATION | 60 | #define ACPI_APPLICATION |
57 | #define ACPI_DISASSEMBLER | 61 | #define ACPI_DISASSEMBLER |
58 | #define ACPI_NO_METHOD_EXECUTION | 62 | #define ACPI_NO_METHOD_EXECUTION |
59 | #define ACPI_USE_SYSTEM_CLIBRARY | ||
60 | #define ACPI_ENABLE_OBJECT_CACHE | ||
61 | #endif | 63 | #endif |
62 | 64 | ||
63 | #ifdef _ACPI_EXEC_APP | 65 | #ifdef ACPI_EXEC_APP |
64 | #undef DEBUGGER_THREADING | 66 | #undef DEBUGGER_THREADING |
65 | #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED | 67 | #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED |
66 | #define ACPI_DEBUG_OUTPUT | 68 | #define ACPI_DEBUG_OUTPUT |
67 | #define ACPI_APPLICATION | 69 | #define ACPI_APPLICATION |
68 | #define ACPI_DEBUGGER | 70 | #define ACPI_DEBUGGER |
69 | #define ACPI_DISASSEMBLER | 71 | #define ACPI_DISASSEMBLER |
70 | #define ACPI_USE_SYSTEM_CLIBRARY | ||
71 | #define ACPI_ENABLE_OBJECT_CACHE | ||
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | #ifdef _ACPI_ASL_COMPILER | 74 | #ifdef ACPI_ASL_COMPILER |
75 | #define ACPI_DEBUG_OUTPUT | 75 | #define ACPI_DEBUG_OUTPUT |
76 | #define ACPI_APPLICATION | 76 | #define ACPI_APPLICATION |
77 | #define ACPI_DISASSEMBLER | 77 | #define ACPI_DISASSEMBLER |
78 | #define ACPI_CONSTANT_EVAL_ONLY | 78 | #define ACPI_CONSTANT_EVAL_ONLY |
79 | #endif | ||
80 | |||
81 | #ifdef ACPI_APPLICATION | ||
79 | #define ACPI_USE_SYSTEM_CLIBRARY | 82 | #define ACPI_USE_SYSTEM_CLIBRARY |
80 | #define ACPI_ENABLE_OBJECT_CACHE | 83 | #define ACPI_USE_LOCAL_CACHE |
81 | #endif | 84 | #endif |
82 | 85 | ||
83 | /* | 86 | /* |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index a3de0db85694..4fbc0fd52a27 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -62,6 +62,17 @@ | |||
62 | 62 | ||
63 | #define ACPI_MACHINE_WIDTH BITS_PER_LONG | 63 | #define ACPI_MACHINE_WIDTH BITS_PER_LONG |
64 | 64 | ||
65 | /* Type(s) for the OSL */ | ||
66 | |||
67 | #ifdef ACPI_USE_LOCAL_CACHE | ||
68 | #define acpi_cache_t struct acpi_memory_list | ||
69 | #else | ||
70 | #include <linux/slab.h> | ||
71 | #define acpi_cache_t kmem_cache_t | ||
72 | #endif | ||
73 | |||
74 | |||
75 | |||
65 | #else /* !__KERNEL__ */ | 76 | #else /* !__KERNEL__ */ |
66 | 77 | ||
67 | #include <stdarg.h> | 78 | #include <stdarg.h> |