aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/actypes.h
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-07-08 00:00:00 -0400
committerLen Brown <len.brown@intel.com>2005-07-14 00:42:23 -0400
commitf9f4601f331aa1226d7a798a01950efbb388f07f (patch)
tree62e079a9275749d16a4a0da56a427be201e15d27 /include/acpi/actypes.h
parent[ACPI] revert R40 workaround (diff)
downloadlinux-dev-f9f4601f331aa1226d7a798a01950efbb388f07f.tar.xz
linux-dev-f9f4601f331aa1226d7a798a01950efbb388f07f.zip
ACPICA 20050708 from Bob Moore <robert.moore@intel.com>
The use of the CPU stack in the debug version of the subsystem has been considerably reduced. Previously, a debug structure was declared in every function that used the debug macros. This structure has been removed in favor of declaring the individual elements as parameters to the debug functions. This reduces the cumulative stack use during nested execution of ACPI function calls at the cost of a small increase in the code size of the debug version of the subsystem. With assistance from Alexey Starikovskiy and Len Brown. Added the ACPI_GET_FUNCTION_NAME macro to enable the compiler-dependent headers to define a macro that will return the current function name at runtime (such as __FUNCTION__ or _func_, etc.) The function name is used by the debug trace output. If ACPI_GET_FUNCTION_NAME is not defined in the compiler-dependent header, the function name is saved on the CPU stack (one pointer per function.) This mechanism is used because apparently there exists no standard ANSI-C defined macro that that returns the function name. Alexey Starikovskiy redesigned and reimplemented the "Owner ID" mechanism used to track namespace objects created/deleted by ACPI tables and control method execution. A bitmap is now used to allocate and free the IDs, thus solving the wraparound problem present in the previous implementation. The size of the namespace node descriptor was reduced by 2 bytes as a result. Removed the UINT32_BIT and UINT16_BIT types that were used for the bitfield flag definitions within the headers for the predefined ACPI tables. These have been replaced by UINT8_BIT in order to increase the code portability of the subsystem. If the use of UINT8 remains a problem, we may be forced to eliminate bitfields entirely because of a lack of portability. Alexey Starikovksiy enhanced the performance of acpi_ut_update_object_reference. This is a frequently used function and this improvement increases the performance of the entire subsystem. Alexey Starikovskiy fixed several possible memory leaks and the inverse - premature object deletion. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/actypes.h')
-rw-r--r--include/acpi/actypes.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 8cd774a20c67..1895b862ce0d 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -205,10 +205,11 @@ typedef u32 acpi_size;
/*
- * Miscellaneous common types
+ * This type is used for bitfields in ACPI tables. The only type that is
+ * even remotely portable is u8. Anything else is not portable, so
+ * do not add any more bitfield types.
*/
-typedef u16 UINT16_BIT;
-typedef u32 UINT32_BIT;
+typedef u8 UINT8_BIT;
typedef acpi_native_uint ACPI_PTRDIFF;
/*
@@ -243,10 +244,13 @@ struct acpi_pointer
#define ACPI_LOGMODE_PHYSPTR ACPI_LOGICAL_ADDRESSING | ACPI_PHYSICAL_POINTER
#define ACPI_LOGMODE_LOGPTR ACPI_LOGICAL_ADDRESSING | ACPI_LOGICAL_POINTER
-/* Types for the OS interface layer (OSL) */
-
-#ifdef ACPI_USE_LOCAL_CACHE
-#define acpi_cache_t struct acpi_memory_list
+/*
+ * If acpi_cache_t was not defined in the OS-dependent header,
+ * define it now. This is typically the case where the local cache
+ * manager implementation is to be used (ACPI_USE_LOCAL_CACHE)
+ */
+#ifndef acpi_cache_t
+#define acpi_cache_t struct acpi_memory_list
#endif
/*