aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/namespace
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-06-24 00:00:00 -0400
committerLen Brown <len.brown@intel.com>2005-07-13 23:45:36 -0400
commit73459f73e5d1602c59ebec114fc45185521353c1 (patch)
tree56c2183e345784d2be09c2f5d2530cf36221c55e /drivers/acpi/namespace
parent88ac00f5a841dcfc5c682000f4a6add0add8caac (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 'drivers/acpi/namespace')
-rw-r--r--drivers/acpi/namespace/nsaccess.c2
-rw-r--r--drivers/acpi/namespace/nsalloc.c6
-rw-r--r--drivers/acpi/namespace/nsdump.c30
3 files changed, 21 insertions, 17 deletions
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c
index ece7a9dedd5c..9df0a64ba9e9 100644
--- a/drivers/acpi/namespace/nsaccess.c
+++ b/drivers/acpi/namespace/nsaccess.c
@@ -159,7 +159,7 @@ acpi_ns_root_initialize (
159 obj_desc->method.param_count = (u8) ACPI_TO_INTEGER (val); 159 obj_desc->method.param_count = (u8) ACPI_TO_INTEGER (val);
160 obj_desc->common.flags |= AOPOBJ_DATA_VALID; 160 obj_desc->common.flags |= AOPOBJ_DATA_VALID;
161 161
162#if defined (_ACPI_ASL_COMPILER) || defined (_ACPI_DUMP_App) 162#if defined (ACPI_ASL_COMPILER) || defined (ACPI_DUMP_App)
163 163
164 /* 164 /*
165 * i_aSL Compiler cheats by putting parameter count 165 * i_aSL Compiler cheats by putting parameter count
diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c
index 5653a19d7172..3f94b0806ecf 100644
--- a/drivers/acpi/namespace/nsalloc.c
+++ b/drivers/acpi/namespace/nsalloc.c
@@ -83,7 +83,7 @@ acpi_ns_create_node (
83 return_PTR (NULL); 83 return_PTR (NULL);
84 } 84 }
85 85
86 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].total_allocated++); 86 ACPI_MEM_TRACKING (acpi_gbl_ns_node_list->total_allocated++);
87 87
88 node->name.integer = name; 88 node->name.integer = name;
89 node->reference_count = 1; 89 node->reference_count = 1;
@@ -151,7 +151,7 @@ acpi_ns_delete_node (
151 } 151 }
152 } 152 }
153 153
154 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].total_freed++); 154 ACPI_MEM_TRACKING (acpi_gbl_ns_node_list->total_freed++);
155 155
156 /* 156 /*
157 * Detach an object if there is one then delete the node 157 * Detach an object if there is one then delete the node
@@ -362,7 +362,7 @@ acpi_ns_delete_children (
362 362
363 /* Now we can free this child object */ 363 /* Now we can free this child object */
364 364
365 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].total_freed++); 365 ACPI_MEM_TRACKING (acpi_gbl_ns_node_list->total_freed++);
366 366
367 ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Object %p, Remaining %X\n", 367 ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Object %p, Remaining %X\n",
368 child_node, acpi_gbl_current_node_count)); 368 child_node, acpi_gbl_current_node_count));
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c
index 05af95322a62..c9f35dd7a431 100644
--- a/drivers/acpi/namespace/nsdump.c
+++ b/drivers/acpi/namespace/nsdump.c
@@ -208,33 +208,37 @@ acpi_ns_dump_one_object (
208 return (AE_OK); 208 return (AE_OK);
209 } 209 }
210 210
211 /* Indent the object according to the level */ 211 if (!(info->display_type & ACPI_DISPLAY_SHORT)) {
212 /* Indent the object according to the level */
212 213
213 acpi_os_printf ("%2d%*s", (u32) level - 1, (int) level * 2, " "); 214 acpi_os_printf ("%2d%*s", (u32) level - 1, (int) level * 2, " ");
214 215
215 /* Check the node type and name */ 216 /* Check the node type and name */
216 217
217 if (type > ACPI_TYPE_LOCAL_MAX) { 218 if (type > ACPI_TYPE_LOCAL_MAX) {
218 ACPI_REPORT_WARNING (("Invalid ACPI Type %08X\n", type)); 219 ACPI_REPORT_WARNING (("Invalid ACPI Type %08X\n", type));
219 } 220 }
221
222 if (!acpi_ut_valid_acpi_name (this_node->name.integer)) {
223 ACPI_REPORT_WARNING (("Invalid ACPI Name %08X\n",
224 this_node->name.integer));
225 }
220 226
221 if (!acpi_ut_valid_acpi_name (this_node->name.integer)) { 227 acpi_os_printf ("%4.4s", acpi_ut_get_node_name (this_node));
222 ACPI_REPORT_WARNING (("Invalid ACPI Name %08X\n",
223 this_node->name.integer));
224 } 228 }
225 229
226 /* 230 /*
227 * Now we can print out the pertinent information 231 * Now we can print out the pertinent information
228 */ 232 */
229 acpi_os_printf ("%4.4s %-12s %p ", 233 acpi_os_printf (" %-12s %p ",
230 acpi_ut_get_node_name (this_node), acpi_ut_get_type_name (type), this_node); 234 acpi_ut_get_type_name (type), this_node);
231 235
232 dbg_level = acpi_dbg_level; 236 dbg_level = acpi_dbg_level;
233 acpi_dbg_level = 0; 237 acpi_dbg_level = 0;
234 obj_desc = acpi_ns_get_attached_object (this_node); 238 obj_desc = acpi_ns_get_attached_object (this_node);
235 acpi_dbg_level = dbg_level; 239 acpi_dbg_level = dbg_level;
236 240
237 switch (info->display_type) { 241 switch (info->display_type & ACPI_DISPLAY_MASK) {
238 case ACPI_DISPLAY_SUMMARY: 242 case ACPI_DISPLAY_SUMMARY:
239 243
240 if (!obj_desc) { 244 if (!obj_desc) {
@@ -646,7 +650,7 @@ acpi_ns_dump_entry (
646} 650}
647 651
648 652
649#ifdef _ACPI_ASL_COMPILER 653#ifdef ACPI_ASL_COMPILER
650/******************************************************************************* 654/*******************************************************************************
651 * 655 *
652 * FUNCTION: acpi_ns_dump_tables 656 * FUNCTION: acpi_ns_dump_tables