From 8313524a0d466f451a62709aaedf988d8257b21c Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Tue, 3 Oct 2006 00:00:00 -0400 Subject: ACPI: ACPICA 20060310 Tagged all external interfaces to the subsystem with the new ACPI_EXPORT_SYMBOL macro. This macro can be defined as necessary to assist kernel integration. For Linux, the macro resolves to the EXPORT_SYMBOL macro. The default definition is NULL. Added the ACPI_THREAD_ID type for the return value from acpi_os_get_thread_id(). This allows the host to define this as necessary to simplify kernel integration. The default definition is ACPI_NATIVE_UINT. Valery Podrezov fixed two interpreter problems related to error processing, the deletion of objects, and placing invalid pointers onto the internal operator result stack. http://bugzilla.kernel.org/show_bug.cgi?id=6028 http://bugzilla.kernel.org/show_bug.cgi?id=6151 Increased the reference count threshold where a warning is emitted for large reference counts in order to eliminate unnecessary warnings on systems with large namespaces (especially 64-bit.) Increased the value from 0x400 to 0x800. Due to universal disagreement as to the meaning of the 'c' in the calloc() function, the ACPI_MEM_CALLOCATE macro has been renamed to ACPI_ALLOCATE_ZEROED so that the purpose of the interface is 'clear'. ACPI_MEM_ALLOCATE and ACPI_MEM_FREE are renamed to ACPI_ALLOCATE and ACPI_FREE. Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/platform/acenv.h | 6 ++++-- include/acpi/platform/aclinux.h | 19 +++++++------------ 2 files changed, 11 insertions(+), 14 deletions(-) (limited to 'include/acpi/platform') diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 223ec646710..d5a7f566c01 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -59,6 +59,7 @@ #define ACPI_APPLICATION #define ACPI_DISASSEMBLER #define ACPI_NO_METHOD_EXECUTION +#define ACPI_LARGE_NAMESPACE_NODE #endif #ifdef ACPI_EXEC_APP @@ -76,6 +77,7 @@ #define ACPI_APPLICATION #define ACPI_DISASSEMBLER #define ACPI_CONSTANT_EVAL_ONLY +#define ACPI_LARGE_NAMESPACE_NODE #endif #ifdef ACPI_APPLICATION @@ -271,8 +273,8 @@ typedef char *va_list; /* * Storage alignment properties */ -#define _AUPBND (sizeof (acpi_native_uint) - 1) -#define _ADNBND (sizeof (acpi_native_uint) - 1) +#define _AUPBND (sizeof (acpi_native_int) - 1) +#define _ADNBND (sizeof (acpi_native_int) - 1) /* * Variable argument list macro definitions diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 2e6d54569ee..2f5bb5bd76b 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -52,27 +52,22 @@ #include #include #include +#include #include #include #include #include #include +#include -#define strtoul simple_strtoul - -#define ACPI_MACHINE_WIDTH BITS_PER_LONG +/* Host-dependent types and defines */ -/* Type(s) for the OSL */ - -#ifdef ACPI_USE_LOCAL_CACHE -#define acpi_cache_t struct acpi_memory_list -#else -#include -#define acpi_cache_t kmem_cache_t -#endif +#define ACPI_MACHINE_WIDTH BITS_PER_LONG +#define acpi_cache_t kmem_cache_t +#define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); +#define strtoul simple_strtoul /* Full namespace pathname length limit - arbitrary */ - #define ACPI_PATHNAME_MAX 256 #else /* !__KERNEL__ */ -- cgit v1.2.3 From ec7381d6bfd3e7b8d2880dd5e9d03b131b0603f6 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Sat, 1 Apr 2006 05:12:23 -0500 Subject: ACPI: inline trivial acpi_os_get_thread_id() acpi_os_get_thread_id() is used only for debugging code that is not enabled on Linux, so stub it out. Signed-off-by: Len Brown --- include/acpi/platform/aclinux.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/acpi/platform') diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 2f5bb5bd76b..b5655a665ba 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -99,4 +99,8 @@ #define acpi_cpu_flags unsigned long +#define acpi_thread_id u32 + +static inline acpi_thread_id acpi_os_get_thread_id(void) { return 0; } + #endif /* __ACLINUX_H__ */ -- cgit v1.2.3 From 61686124f47d7c4b78610346c5f8f9d8a6d46bb5 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 17 Mar 2006 16:44:00 -0500 Subject: [ACPI] ACPICA 20060317 Implemented the use of a cache object for all internal namespace nodes. Since there are about 1000 static nodes in a typical system, this will decrease memory use for cache implementations that minimize per-allocation overhead (such as a slab allocator.) Removed the reference count mechanism for internal namespace nodes, since it was deemed unnecessary. This reduces the size of each namespace node by about 5%-10% on all platforms. Nodes are now 20 bytes for the 32-bit case, and 32 bytes for the 64-bit case. Optimized several internal data structures to reduce object size on 64-bit platforms by packing data within the 64-bit alignment. This includes the frequently used ACPI_OPERAND_OBJECT, of which there can be ~1000 static instances corresponding to the namespace objects. Added two new strings for the predefined _OSI method: "Windows 2001.1 SP1" and "Windows 2006". Split the allocation tracking mechanism out to a separate file, from utalloc.c to uttrack.c. This mechanism appears to be only useful for application-level code. Kernels may wish to not include uttrack.c in distributions. Removed all remnants of the obsolete ACPI_REPORT_* macros and the associated code. (These macros have been replaced by the ACPI_ERROR and ACPI_WARNING macros.) Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/platform/acenv.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'include/acpi/platform') diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index d5a7f566c01..2270bdd5e53 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -70,6 +70,7 @@ #define ACPI_DEBUGGER #define ACPI_DISASSEMBLER #define ACPI_MUTEX_DEBUG +#define ACPI_DBG_TRACK_ALLOCATIONS #endif #ifdef ACPI_ASL_COMPILER @@ -165,17 +166,6 @@ #endif -/* - * Memory allocation tracking. Used only if - * 1) This is the debug version - * 2) This is NOT a 16-bit version of the code (not enough real-mode memory) - */ -#ifdef ACPI_DEBUG_OUTPUT -#if ACPI_MACHINE_WIDTH != 16 -#define ACPI_DBG_TRACK_ALLOCATIONS -#endif -#endif - /*! [End] no source code translation !*/ /* -- cgit v1.2.3 From 793c2388cae3fd023b3b5166354931752d42353c Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 31 Mar 2006 00:00:00 -0500 Subject: ACPI: ACPICA 20060331 Implemented header file support for the following additional ACPI tables: ASF!, BOOT, CPEP, DBGP, MCFG, SPCR, SPMI, TCPA, and WDRT. With this support, all current and known ACPI tables are now defined in the ACPICA headers and are available for use by device drivers and other software. Implemented support to allow tables that contain ACPI names with invalid characters to be loaded. Previously, this would cause the table load to fail, but since there are several known cases of such tables on existing machines, this change was made to enable ACPI support for them. Also, this matches the behavior of the Microsoft ACPI implementation. https://bugzilla.novell.com/show_bug.cgi?id=147621 Fixed a couple regressions introduced during the memory optimization in the 20060317 release. The namespace node definition required additional reorganization and an internal datatype that had been changed to 8-bit was restored to 32-bit. (Valery Podrezov) Fixed a problem where a null pointer passed to acpi_ut_delete_generic_state() could be passed through to acpi_os_release_object which is unexpected. Such null pointers are now trapped and ignored, matching the behavior of the previous implementation before the deployment of acpi_os_release_object(). (Valery Podrezov, Fiodor Suietov) Fixed a memory mapping leak during the deletion of a SystemMemory operation region where a cached memory mapping was not deleted. This became a noticeable problem for operation regions that are defined within frequently used control methods. (Dana Meyers) Reorganized the ACPI table header files into two main files: one for the ACPI tables consumed by the ACPICA core, and another for the miscellaneous ACPI tables that are consumed by the drivers and other software. The various FADT definitions were merged into one common section and three different tables (ACPI 1.0, 1.0+, and 2.0) Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/platform/acenv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/acpi/platform') diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 2270bdd5e53..fd189d425c7 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -60,6 +60,7 @@ #define ACPI_DISASSEMBLER #define ACPI_NO_METHOD_EXECUTION #define ACPI_LARGE_NAMESPACE_NODE +#define ACPI_DATA_TABLE_DISASSEMBLY #endif #ifdef ACPI_EXEC_APP @@ -79,6 +80,7 @@ #define ACPI_DISASSEMBLER #define ACPI_CONSTANT_EVAL_ONLY #define ACPI_LARGE_NAMESPACE_NODE +#define ACPI_DATA_TABLE_DISASSEMBLY #endif #ifdef ACPI_APPLICATION @@ -140,7 +142,7 @@ #elif defined(MSDOS) /* Must appear after WIN32 and WIN64 check */ #include "acdos16.h" -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include "acfreebsd.h" #elif defined(__NetBSD__) -- cgit v1.2.3 From b229cf92eee616c7cb5ad8cdb35a19b119f00bc8 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 21 Apr 2006 17:15:00 -0400 Subject: ACPI: ACPICA 20060421 Removed a device initialization optimization introduced in 20051216 where the _STA method was not run unless an _INI was also present for the same device. This optimization could cause problems because it could allow _INI methods to be run within a not-present device subtree (If a not-present device had no _INI, _STA would not be run, the not-present status would not be discovered, and the children of the device would be incorrectly traversed.) Implemented a new _STA optimization where namespace subtrees that do not contain _INI are identified and ignored during device initialization. Selectively running _STA can significantly improve boot time on large machines (with assistance from Len Brown.) Implemented support for the device initialization case where the returned _STA flags indicate a device not-present but functioning. In this case, _INI is not run, but the device children are examined for presence, as per the ACPI specification. Implemented an additional change to the IndexField support in order to conform to MS behavior. The value written to the Index Register is not simply a byte offset, it is a byte offset in units of the access width of the parent Index Field. (Fiodor Suietov) Defined and deployed a new OSL interface, acpi_os_validate_address(). This interface is called during the creation of all AML operation regions, and allows the host OS to exert control over what addresses it will allow the AML code to access. Operation Regions whose addresses are disallowed will cause a runtime exception when they are actually accessed (will not affect or abort table loading.) Defined and deployed a new OSL interface, acpi_os_validate_interface(). This interface allows the host OS to match the various "optional" interface/behavior strings for the _OSI predefined control method as appropriate (with assistance from Bjorn Helgaas.) Restructured and corrected various problems in the exception handling code paths within DsCallControlMethod and DsTerminateControlMethod in dsmethod (with assistance from Takayoshi Kochi.) Modified the Linux source converter to ignore quoted string literals while converting identifiers from mixed to lower case. This will correct problems with the disassembler and other areas where such strings must not be modified. The ACPI_FUNCTION_* macros no longer require quotes around the function name. This allows the Linux source converter to convert the names, now that the converter ignores quoted strings. Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/platform/acenv.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'include/acpi/platform') diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index fd189d425c7..453a469fd39 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -49,16 +49,18 @@ */ #ifdef ACPI_LIBRARY +/* + * Note: The non-debug version of the acpi_library does not contain any + * debug support, for minimimal size. The debug version uses ACPI_FULL_DEBUG + */ #define ACPI_USE_LOCAL_CACHE #endif -#ifdef ACPI_DUMP_APP -#ifndef MSDOS +#ifdef ACPI_ASL_COMPILER #define ACPI_DEBUG_OUTPUT -#endif #define ACPI_APPLICATION #define ACPI_DISASSEMBLER -#define ACPI_NO_METHOD_EXECUTION +#define ACPI_CONSTANT_EVAL_ONLY #define ACPI_LARGE_NAMESPACE_NODE #define ACPI_DATA_TABLE_DISASSEMBLY #endif @@ -66,19 +68,20 @@ #ifdef ACPI_EXEC_APP #undef DEBUGGER_THREADING #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED -#define ACPI_DEBUG_OUTPUT +#define ACPI_FULL_DEBUG #define ACPI_APPLICATION #define ACPI_DEBUGGER -#define ACPI_DISASSEMBLER #define ACPI_MUTEX_DEBUG #define ACPI_DBG_TRACK_ALLOCATIONS #endif -#ifdef ACPI_ASL_COMPILER +#ifdef ACPI_DASM_APP +#ifndef MSDOS #define ACPI_DEBUG_OUTPUT +#endif #define ACPI_APPLICATION #define ACPI_DISASSEMBLER -#define ACPI_CONSTANT_EVAL_ONLY +#define ACPI_NO_METHOD_EXECUTION #define ACPI_LARGE_NAMESPACE_NODE #define ACPI_DATA_TABLE_DISASSEMBLY #endif @@ -88,6 +91,12 @@ #define ACPI_USE_LOCAL_CACHE #endif +#ifdef ACPI_FULL_DEBUG +#define ACPI_DEBUGGER +#define ACPI_DEBUG_OUTPUT +#define ACPI_DISASSEMBLER +#endif + /* * Environment configuration. The purpose of this file is to interface to the * local generation environment. -- cgit v1.2.3