aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acmacros.h
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-04-21 17:15:00 -0400
committerLen Brown <len.brown@intel.com>2006-06-14 02:30:55 -0400
commitb229cf92eee616c7cb5ad8cdb35a19b119f00bc8 (patch)
tree74b52bec6ec029859c2320aba227290a503af31a /include/acpi/acmacros.h
parent793c2388cae3fd023b3b5166354931752d42353c (diff)
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 <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acmacros.h')
-rw-r--r--include/acpi/acmacros.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index 60ceed4c81bf..b7547aba91b9 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -56,6 +56,10 @@
56#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit)) 56#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit))
57#define ACPI_MIN(a,b) (((a)<(b))?(a):(b)) 57#define ACPI_MIN(a,b) (((a)<(b))?(a):(b))
58 58
59/* Size calculation */
60
61#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))
62
59#if ACPI_MACHINE_WIDTH == 16 63#if ACPI_MACHINE_WIDTH == 16
60 64
61/* 65/*
@@ -143,7 +147,7 @@
143#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED 147#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
144#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b))) 148#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b)))
145#else 149#else
146#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), 4)) 150#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE))
147#endif 151#endif
148 152
149/* 153/*
@@ -522,12 +526,12 @@
522#define ACPI_GET_FUNCTION_NAME _acpi_function_name 526#define ACPI_GET_FUNCTION_NAME _acpi_function_name
523/* 527/*
524 * The Name parameter should be the procedure name as a quoted string. 528 * The Name parameter should be the procedure name as a quoted string.
525 * This is declared as a local string ("my_function_name") so that it can 529 * This is declared as a local string ("MyFunctionName") so that it can
526 * be also used by the function exit macros below. 530 * be also used by the function exit macros below.
527 * Note: (const char) is used to be compatible with the debug interfaces 531 * Note: (const char) is used to be compatible with the debug interfaces
528 * and macros such as __FUNCTION__. 532 * and macros such as __FUNCTION__.
529 */ 533 */
530#define ACPI_FUNCTION_NAME(name) const char *_acpi_function_name = name; 534#define ACPI_FUNCTION_NAME(name) const char *_acpi_function_name = #name;
531 535
532#else 536#else
533/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */ 537/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
@@ -551,7 +555,7 @@
551 * WARNING: These macros include a return statement. This is usually considered 555 * WARNING: These macros include a return statement. This is usually considered
552 * bad form, but having a separate exit macro is very ugly and difficult to maintain. 556 * bad form, but having a separate exit macro is very ugly and difficult to maintain.
553 * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros 557 * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros
554 * so that "_acpi_function_name" is defined. 558 * so that "_AcpiFunctionName" is defined.
555 * 559 *
556 * Note: the DO_WHILE0 macro is used to prevent some compilers from complaining 560 * Note: the DO_WHILE0 macro is used to prevent some compilers from complaining
557 * about these constructs. 561 * about these constructs.