diff options
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/acapps.h | 1 | ||||
-rw-r--r-- | source/include/acconfig.h | 15 | ||||
-rw-r--r-- | source/include/acexcep.h | 2 | ||||
-rw-r--r-- | source/include/acglobal.h | 2 | ||||
-rw-r--r-- | source/include/aclocal.h | 4 | ||||
-rw-r--r-- | source/include/acmacros.h | 2 | ||||
-rw-r--r-- | source/include/acnames.h | 3 | ||||
-rw-r--r-- | source/include/acobject.h | 5 | ||||
-rw-r--r-- | source/include/acopcode.h | 6 | ||||
-rw-r--r-- | source/include/acpiosxf.h | 5 | ||||
-rw-r--r-- | source/include/acpixf.h | 3 | ||||
-rw-r--r-- | source/include/acrestyp.h | 1 | ||||
-rw-r--r-- | source/include/acstruct.h | 2 | ||||
-rw-r--r-- | source/include/actbl2.h | 1 | ||||
-rw-r--r-- | source/include/actbl3.h | 22 | ||||
-rw-r--r-- | source/include/actypes.h | 32 | ||||
-rw-r--r-- | source/include/acutils.h | 18 | ||||
-rw-r--r-- | source/include/amlresrc.h | 2 | ||||
-rw-r--r-- | source/include/platform/acenv.h | 2 | ||||
-rw-r--r-- | source/include/platform/aclinux.h | 37 |
20 files changed, 94 insertions, 71 deletions
diff --git a/source/include/acapps.h b/source/include/acapps.h index 0382ca85475c..c0b171bb94b4 100644 --- a/source/include/acapps.h +++ b/source/include/acapps.h @@ -214,4 +214,3 @@ AdWriteTable ( char *OemTableId); #endif /* _ACAPPS */ - diff --git a/source/include/acconfig.h b/source/include/acconfig.h index 7880516e4755..b414383b496b 100644 --- a/source/include/acconfig.h +++ b/source/include/acconfig.h @@ -53,8 +53,8 @@ /* * ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the - * ACPI subsystem. This includes the DEBUG_PRINT output - * statements. When disabled, all DEBUG_PRINT + * ACPI subsystem. This includes the DEBUG_PRINT output + * statements. When disabled, all DEBUG_PRINT * statements are compiled out. * * ACPI_APPLICATION - Use this switch if the subsystem is going to be run @@ -63,12 +63,12 @@ */ /* - * OS name, used for the _OS object. The _OS object is essentially obsolete, + * OS name, used for the _OS object. The _OS object is essentially obsolete, * but there is a large base of ASL/AML code in existing machines that check - * for the string below. The use of this string usually guarantees that - * the ASL will execute down the most tested code path. Also, there is some + * for the string below. The use of this string usually guarantees that + * the ASL will execute down the most tested code path. Also, there is some * code that will not execute the _OSI method unless _OS matches the string - * below. Therefore, change this string at your own risk. + * below. Therefore, change this string at your own risk. */ #define ACPI_OS_NAME "Microsoft Windows NT" @@ -195,7 +195,7 @@ #define ACPI_MAX_ADDRESS_SPACE 255 -/* Array sizes. Used for range checking also */ +/* Array sizes. Used for range checking also */ #define ACPI_MAX_MATCH_OPCODE 5 @@ -230,4 +230,3 @@ #endif /* _ACCONFIG_H */ - diff --git a/source/include/acexcep.h b/source/include/acexcep.h index 856a359845ce..072ddf923855 100644 --- a/source/include/acexcep.h +++ b/source/include/acexcep.h @@ -127,7 +127,7 @@ /* - * AML exceptions. These are caused by problems with + * AML exceptions. These are caused by problems with * the actual AML byte stream */ #define AE_AML_BAD_OPCODE (ACPI_STATUS) (0x0001 | AE_CODE_AML) diff --git a/source/include/acglobal.h b/source/include/acglobal.h index 1fc2bc6bae41..42c623457dae 100644 --- a/source/include/acglobal.h +++ b/source/include/acglobal.h @@ -72,7 +72,7 @@ /* * Enable "slack" in the AML interpreter? Default is FALSE, and the - * interpreter strictly follows the ACPI specification. Setting to TRUE + * interpreter strictly follows the ACPI specification. Setting to TRUE * allows the interpreter to ignore certain errors and/or bad AML constructs. * * Currently, these features are enabled by this flag: diff --git a/source/include/aclocal.h b/source/include/aclocal.h index 8a3514772f9c..d54455fd8fde 100644 --- a/source/include/aclocal.h +++ b/source/include/aclocal.h @@ -305,7 +305,7 @@ ACPI_STATUS (*ACPI_INTERNAL_METHOD) ( /* - * Bitmapped ACPI types. Used internally only + * Bitmapped ACPI types. Used internally only */ #define ACPI_BTYPE_ANY 0x00000000 #define ACPI_BTYPE_INTEGER 0x00000001 @@ -689,7 +689,7 @@ typedef struct acpi_pscope_state /* - * Thread state - one per thread across multiple walk states. Multiple walk + * Thread state - one per thread across multiple walk states. Multiple walk * states are created when there are nested control methods executing. */ typedef struct acpi_thread_state diff --git a/source/include/acmacros.h b/source/include/acmacros.h index 92cd7a25e800..8a0e3842a1a9 100644 --- a/source/include/acmacros.h +++ b/source/include/acmacros.h @@ -464,7 +464,7 @@ #define ACPI_DUMP_OPERANDS(a, b ,c) AcpiExDumpOperands(a, b, c) #define ACPI_DUMP_ENTRY(a, b) AcpiNsDumpEntry (a, b) #define ACPI_DUMP_PATHNAME(a, b, c, d) AcpiNsDumpPathname(a, b, c, d) -#define ACPI_DUMP_BUFFER(a, b) AcpiUtDumpBuffer((UINT8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT) +#define ACPI_DUMP_BUFFER(a, b) AcpiUtDebugDumpBuffer((UINT8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT) #else /* diff --git a/source/include/acnames.h b/source/include/acnames.h index e56f3cdf93d9..1987b169efc7 100644 --- a/source/include/acnames.h +++ b/source/include/acnames.h @@ -50,6 +50,7 @@ #define METHOD_NAME__HID "_HID" #define METHOD_NAME__CID "_CID" #define METHOD_NAME__UID "_UID" +#define METHOD_NAME__SUB "_SUB" #define METHOD_NAME__ADR "_ADR" #define METHOD_NAME__INI "_INI" #define METHOD_NAME__STA "_STA" @@ -81,5 +82,3 @@ #define ACPI_NS_ROOT_PATH "\\" #endif /* __ACNAMES_H__ */ - - diff --git a/source/include/acobject.h b/source/include/acobject.h index daf1afffb832..2f173755fea4 100644 --- a/source/include/acobject.h +++ b/source/include/acobject.h @@ -1,4 +1,3 @@ - /****************************************************************************** * * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) @@ -238,7 +237,7 @@ typedef struct acpi_object_method /****************************************************************************** * - * Objects that can be notified. All share a common NotifyInfo area. + * Objects that can be notified. All share a common NotifyInfo area. * *****************************************************************************/ @@ -301,7 +300,7 @@ typedef struct acpi_object_thermal_zone /****************************************************************************** * - * Fields. All share a common header/info field. + * Fields. All share a common header/info field. * *****************************************************************************/ diff --git a/source/include/acopcode.h b/source/include/acopcode.h index e182a07e6197..edd134986f50 100644 --- a/source/include/acopcode.h +++ b/source/include/acopcode.h @@ -54,7 +54,7 @@ #define _UNK 0x6B /* - * Reserved ASCII characters. Do not use any of these for + * Reserved ASCII characters. Do not use any of these for * internal opcodes, since they are used to differentiate * name strings from AML opcodes */ @@ -64,7 +64,7 @@ /* - * All AML opcodes and the parse-time arguments for each. Used by the AML + * All AML opcodes and the parse-time arguments for each. Used by the AML * parser Each list is compressed into a 32-bit number and stored in the * master opcode table (in psopcode.c). */ @@ -195,7 +195,7 @@ /* - * All AML opcodes and the runtime arguments for each. Used by the AML + * All AML opcodes and the runtime arguments for each. Used by the AML * interpreter Each list is compressed into a 32-bit number and stored * in the master opcode table (in psopcode.c). * diff --git a/source/include/acpiosxf.h b/source/include/acpiosxf.h index fc9c8f0d7a54..6fcda9e53b84 100644 --- a/source/include/acpiosxf.h +++ b/source/include/acpiosxf.h @@ -1,7 +1,6 @@ - /****************************************************************************** * - * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These + * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These * interfaces must be implemented by OSL to interface the * ACPI components to the host operating system. * @@ -122,9 +121,11 @@ AcpiOsPhysicalTableOverride ( /* * Spinlock primitives */ +#ifndef AcpiOsCreateLock ACPI_STATUS AcpiOsCreateLock ( ACPI_SPINLOCK *OutHandle); +#endif void AcpiOsDeleteLock ( diff --git a/source/include/acpixf.h b/source/include/acpixf.h index cd04e260acee..dfc3165c57da 100644 --- a/source/include/acpixf.h +++ b/source/include/acpixf.h @@ -1,4 +1,3 @@ - /****************************************************************************** * * Name: acpixf.h - External interfaces to the ACPI subsystem @@ -48,7 +47,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20120913 +#define ACPI_CA_VERSION 0x20121018 #include "acconfig.h" #include "actypes.h" diff --git a/source/include/acrestyp.h b/source/include/acrestyp.h index b927c9c58eb4..c2ce4f08b886 100644 --- a/source/include/acrestyp.h +++ b/source/include/acrestyp.h @@ -689,4 +689,3 @@ typedef struct acpi_pci_routing_table } ACPI_PCI_ROUTING_TABLE; #endif /* __ACRESTYP_H__ */ - diff --git a/source/include/acstruct.h b/source/include/acstruct.h index b3927caa41fa..ff01e864a32b 100644 --- a/source/include/acstruct.h +++ b/source/include/acstruct.h @@ -54,7 +54,7 @@ /* - * Walk state - current state of a parse tree walk. Used for both a leisurely + * Walk state - current state of a parse tree walk. Used for both a leisurely * stroll through the tree (for whatever reason), and for control method * execution. */ diff --git a/source/include/actbl2.h b/source/include/actbl2.h index 44f7de321b58..2d2d5caceab8 100644 --- a/source/include/actbl2.h +++ b/source/include/actbl2.h @@ -1334,4 +1334,3 @@ typedef struct acpi_table_wdrt #pragma pack() #endif /* __ACTBL2_H__ */ - diff --git a/source/include/actbl3.h b/source/include/actbl3.h index ce0b1581bfe4..874e348e9ea1 100644 --- a/source/include/actbl3.h +++ b/source/include/actbl3.h @@ -319,10 +319,10 @@ typedef struct acpi_table_gtdt ******************************************************************************/ #define ACPI_MPST_CHANNEL_INFO \ - UINT16 Reserved1; \ UINT8 ChannelId; \ - UINT8 Reserved2; \ - UINT16 PowerNodeCount; + UINT8 Reserved1[3]; \ + UINT16 PowerNodeCount; \ + UINT16 Reserved2; /* Main table */ @@ -353,9 +353,8 @@ typedef struct acpi_mpst_power_node UINT32 Length; UINT64 RangeAddress; UINT64 RangeLength; - UINT8 NumPowerStates; - UINT8 NumPhysicalComponents; - UINT16 Reserved2; + UINT32 NumPowerStates; + UINT32 NumPhysicalComponents; } ACPI_MPST_POWER_NODE; @@ -390,12 +389,13 @@ typedef struct acpi_mpst_component typedef struct acpi_mpst_data_hdr { UINT16 CharacteristicsCount; + UINT16 Reserved; } ACPI_MPST_DATA_HDR; typedef struct acpi_mpst_power_data { - UINT8 Revision; + UINT8 StructureId; UINT8 Flags; UINT16 Reserved1; UINT32 AveragePower; @@ -419,10 +419,10 @@ typedef struct acpi_mpst_shared UINT32 Signature; UINT16 PccCommand; UINT16 PccStatus; - UINT16 CommandRegister; - UINT16 StatusRegister; - UINT16 PowerStateId; - UINT16 PowerNodeId; + UINT32 CommandRegister; + UINT32 StatusRegister; + UINT32 PowerStateId; + UINT32 PowerNodeId; UINT64 EnergyConsumed; UINT64 AveragePower; diff --git a/source/include/actypes.h b/source/include/actypes.h index eef510acd484..611c41836af4 100644 --- a/source/include/actypes.h +++ b/source/include/actypes.h @@ -454,10 +454,14 @@ typedef UINT64 ACPI_INTEGER; #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) +/* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */ + #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED #define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) +#define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) #else #define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) +#define ACPI_MOVE_NAME(dest,src) (ACPI_STRNCPY (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE)) #endif @@ -1105,22 +1109,22 @@ UINT32 (*ACPI_INTERFACE_HANDLER) ( #define ACPI_UUID_LENGTH 16 -/* Structures used for device/processor HID, UID, CID */ +/* Structures used for device/processor HID, UID, CID, and SUB */ -typedef struct acpi_device_id +typedef struct acpi_pnp_device_id { UINT32 Length; /* Length of string + null */ char *String; -} ACPI_DEVICE_ID; +} ACPI_PNP_DEVICE_ID; -typedef struct acpi_device_id_list +typedef struct acpi_pnp_device_id_list { UINT32 Count; /* Number of IDs in Ids array */ UINT32 ListSize; /* Size of list, including ID strings */ - ACPI_DEVICE_ID Ids[1]; /* ID array */ + ACPI_PNP_DEVICE_ID Ids[1]; /* ID array */ -} ACPI_DEVICE_ID_LIST; +} ACPI_PNP_DEVICE_ID_LIST; /* * Structure returned from AcpiGetObjectInfo. @@ -1138,9 +1142,10 @@ typedef struct acpi_device_info UINT8 LowestDstates[5]; /* _SxW values: 0xFF indicates not valid */ UINT32 CurrentStatus; /* _STA value */ UINT64 Address; /* _ADR value */ - ACPI_DEVICE_ID HardwareId; /* _HID value */ - ACPI_DEVICE_ID UniqueId; /* _UID value */ - ACPI_DEVICE_ID_LIST CompatibleIdList; /* _CID list <must be last> */ + ACPI_PNP_DEVICE_ID HardwareId; /* _HID value */ + ACPI_PNP_DEVICE_ID UniqueId; /* _UID value */ + ACPI_PNP_DEVICE_ID SubsystemId; /* _SUB value */ + ACPI_PNP_DEVICE_ID_LIST CompatibleIdList; /* _CID list <must be last> */ } ACPI_DEVICE_INFO; @@ -1154,11 +1159,12 @@ typedef struct acpi_device_info #define ACPI_VALID_ADR 0x02 #define ACPI_VALID_HID 0x04 #define ACPI_VALID_UID 0x08 -#define ACPI_VALID_CID 0x10 -#define ACPI_VALID_SXDS 0x20 -#define ACPI_VALID_SXWS 0x40 +#define ACPI_VALID_SUB 0x10 +#define ACPI_VALID_CID 0x20 +#define ACPI_VALID_SXDS 0x40 +#define ACPI_VALID_SXWS 0x80 -/* Flags for _STA method */ +/* Flags for _STA return value (CurrentStatus above) */ #define ACPI_STA_DEVICE_PRESENT 0x01 #define ACPI_STA_DEVICE_ENABLED 0x02 diff --git a/source/include/acutils.h b/source/include/acutils.h index d720fcc92a1f..239126075200 100644 --- a/source/include/acutils.h +++ b/source/include/acutils.h @@ -425,17 +425,18 @@ AcpiUtPtrExit ( UINT8 *Ptr); void -AcpiUtDumpBuffer ( +AcpiUtDebugDumpBuffer ( UINT8 *Buffer, UINT32 Count, UINT32 Display, UINT32 ComponentId); void -AcpiUtDumpBuffer2 ( +AcpiUtDumpBuffer ( UINT8 *Buffer, UINT32 Count, - UINT32 Display); + UINT32 Display, + UINT32 Offset); void AcpiUtReportError ( @@ -511,17 +512,22 @@ AcpiUtExecutePowerMethods ( ACPI_STATUS AcpiUtExecute_HID ( ACPI_NAMESPACE_NODE *DeviceNode, - ACPI_DEVICE_ID **ReturnId); + ACPI_PNP_DEVICE_ID **ReturnId); ACPI_STATUS AcpiUtExecute_UID ( ACPI_NAMESPACE_NODE *DeviceNode, - ACPI_DEVICE_ID **ReturnId); + ACPI_PNP_DEVICE_ID **ReturnId); + +ACPI_STATUS +AcpiUtExecute_SUB ( + ACPI_NAMESPACE_NODE *DeviceNode, + ACPI_PNP_DEVICE_ID **ReturnId); ACPI_STATUS AcpiUtExecute_CID ( ACPI_NAMESPACE_NODE *DeviceNode, - ACPI_DEVICE_ID_LIST **ReturnCidList); + ACPI_PNP_DEVICE_ID_LIST **ReturnCidList); /* diff --git a/source/include/amlresrc.h b/source/include/amlresrc.h index 6d85b8a2d05b..2202bb97361f 100644 --- a/source/include/amlresrc.h +++ b/source/include/amlresrc.h @@ -1,4 +1,3 @@ - /****************************************************************************** * * Module Name: amlresrc.h - AML resource descriptors @@ -576,4 +575,3 @@ typedef union aml_resource } AML_RESOURCE; #endif - diff --git a/source/include/platform/acenv.h b/source/include/platform/acenv.h index 8dfc143f8976..dc18e8651f8c 100644 --- a/source/include/platform/acenv.h +++ b/source/include/platform/acenv.h @@ -367,7 +367,7 @@ typedef char *va_list; #define _Bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd))) #define va_arg(ap, T) (*(T *)(((ap) += (_Bnd (T, _AUPBND))) - (_Bnd (T,_ADNBND)))) -#define va_end(ap) (void) 0 +#define va_end(ap) (ap = (va_list) NULL) #define va_start(ap, A) (void) ((ap) = (((char *) &(A)) + (_Bnd (A,_AUPBND)))) #endif /* va_arg */ diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h index edfff150ed58..45c73f427734 100644 --- a/source/include/platform/aclinux.h +++ b/source/include/platform/aclinux.h @@ -55,11 +55,9 @@ #include <linux/string.h> #include <linux/kernel.h> -#include <linux/module.h> #include <linux/ctype.h> #include <linux/sched.h> -#include <asm/system.h> -#include <asm/atomic.h> +#include <linux/atomic.h> #include <asm/div64.h> #include <asm/acpi.h> #include <linux/slab.h> @@ -87,18 +85,17 @@ /* Host-dependent types and defines for user-space ACPICA */ #define ACPI_FLUSH_CPU_CACHE() +#define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) (pthread)) #if defined(__ia64__) || defined(__x86_64__) #define ACPI_MACHINE_WIDTH 64 #define COMPILER_DEPENDENT_INT64 long #define COMPILER_DEPENDENT_UINT64 unsigned long -#define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) (pthread)) #else #define ACPI_MACHINE_WIDTH 32 #define COMPILER_DEPENDENT_INT64 long long #define COMPILER_DEPENDENT_UINT64 unsigned long long #define ACPI_USE_NATIVE_DIVIDE -#define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) (UINT32) (void *) (pthread)) #endif #ifndef __cdecl @@ -113,12 +110,13 @@ #ifdef __KERNEL__ +#include <acpi/actypes.h> /* * Overrides for in-kernel ACPICA */ static inline acpi_thread_id acpi_os_get_thread_id(void) { - return current; + return (ACPI_THREAD_ID) (unsigned long) current; } /* @@ -127,7 +125,6 @@ static inline acpi_thread_id acpi_os_get_thread_id(void) * However, boot has (system_state != SYSTEM_RUNNING) * to quiet __might_sleep() in kmalloc() and resume does not. */ -#include <acpi/actypes.h> static inline void *acpi_os_allocate(acpi_size size) { return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); @@ -148,13 +145,35 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache) #define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a) #define ACPI_FREE(a) kfree(a) -/* Used within ACPICA to show where it is safe to preempt execution */ - +#ifndef CONFIG_PREEMPT +/* + * Used within ACPICA to show where it is safe to preempt execution + * when CONFIG_PREEMPT=n + */ #define ACPI_PREEMPTION_POINT() \ do { \ if (!irqs_disabled()) \ cond_resched(); \ } while (0) +#endif + +/* + * When lockdep is enabled, the spin_lock_init() macro stringifies it's + * argument and uses that as a name for the lock in debugging. + * By executing spin_lock_init() in a macro the key changes from "lock" for + * all locks to the name of the argument of acpi_os_create_lock(), which + * prevents lockdep from reporting false positives for ACPICA locks. + */ +#define AcpiOsCreateLock(__handle) \ +({ \ + spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \ + \ + if (lock) { \ + *(__handle) = lock; \ + spin_lock_init(*(__handle)); \ + } \ + lock ? AE_OK : AE_NO_MEMORY; \ +}) #endif /* __KERNEL__ */ |