aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:20:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:20:36 -0400
commit765426e8ee4c0ab2bc9d44951f4865b8494cdbd0 (patch)
tree2b46ab8953eff175c8d3474a9754c1ab1394e4de /include
parent36ec891895020f3bc9953c8b11d079c6d77d76bd (diff)
parent898b054f3eec5921320ae8614b5bdd7b07ea5b43 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (123 commits) dock: make dock driver not a module ACPI: fix ia64 build warning ACPI: hack around sysfs warning with link order ACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n intel_menlo: fix build warning panasonic-laptop: fix build ACPICA: Update version to 20080926 ACPICA: Add support for zero-length buffer-to-string conversions ACPICA: New: Validation for predefined ACPI methods/objects ACPICA: Fix for implicit return compatibility ACPICA: Fixed a couple memory leaks associated with "implicit return" ACPICA: Optimize buffer allocation procedure ACPICA: Fix possible memory leak, error exit path ACPICA: Fix fault after mem allocation failure in AML parser ACPICA: Remove unused ACPI register bit definition ACPICA: Update version to 20080829 ACPICA: Fix possible memory leak in acpi_ns_get_external_pathname ACPICA: Cleanup for internal Reference Object ACPICA: Update comments - no functional changes ACPICA: Update for Reference ACPI_OPERAND_OBJECT ...
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/acdebug.h8
-rw-r--r--include/acpi/acdisasm.h4
-rw-r--r--include/acpi/acdispat.h6
-rw-r--r--include/acpi/acexcep.h128
-rw-r--r--include/acpi/aclocal.h77
-rw-r--r--include/acpi/acmacros.h253
-rw-r--r--include/acpi/acnamesp.h16
-rw-r--r--include/acpi/acobject.h37
-rw-r--r--include/acpi/acoutput.h32
-rw-r--r--include/acpi/acpi_bus.h11
-rw-r--r--include/acpi/acpi_drivers.h11
-rw-r--r--include/acpi/acpiosxf.h3
-rw-r--r--include/acpi/acpredef.h371
-rw-r--r--include/acpi/actbl1.h51
-rw-r--r--include/acpi/actypes.h37
-rw-r--r--include/acpi/acutils.h4
-rw-r--r--include/acpi/platform/aclinux.h6
-rw-r--r--include/asm-x86/idle.h1
-rw-r--r--include/linux/acpi.h8
-rw-r--r--include/linux/kernel.h24
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/pnp.h10
23 files changed, 824 insertions, 277 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 4eb75a88795a..29feee27f0ea 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -63,7 +63,7 @@
63 63
64/* Current ACPICA subsystem version in YYYYMMDD format */ 64/* Current ACPICA subsystem version in YYYYMMDD format */
65 65
66#define ACPI_CA_VERSION 0x20080609 66#define ACPI_CA_VERSION 0x20080926
67 67
68/* 68/*
69 * OS name, used for the _OS object. The _OS object is essentially obsolete, 69 * OS name, used for the _OS object. The _OS object is essentially obsolete,
diff --git a/include/acpi/acdebug.h b/include/acpi/acdebug.h
index c5a1b50d8d94..62c59df3b86c 100644
--- a/include/acpi/acdebug.h
+++ b/include/acpi/acdebug.h
@@ -123,6 +123,10 @@ void acpi_db_check_integrity(void);
123 123
124void acpi_db_generate_gpe(char *gpe_arg, char *block_arg); 124void acpi_db_generate_gpe(char *gpe_arg, char *block_arg);
125 125
126void acpi_db_check_predefined_names(void);
127
128void acpi_db_batch_execute(void);
129
126/* 130/*
127 * dbdisply - debug display commands 131 * dbdisply - debug display commands
128 */ 132 */
@@ -150,6 +154,10 @@ void
150acpi_db_display_argument_object(union acpi_operand_object *obj_desc, 154acpi_db_display_argument_object(union acpi_operand_object *obj_desc,
151 struct acpi_walk_state *walk_state); 155 struct acpi_walk_state *walk_state);
152 156
157void acpi_db_check_predefined_names(void);
158
159void acpi_db_batch_execute(void);
160
153/* 161/*
154 * dbexec - debugger control method execution 162 * dbexec - debugger control method execution
155 */ 163 */
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h
index f53faca8ec80..0c1ed387073c 100644
--- a/include/acpi/acdisasm.h
+++ b/include/acpi/acdisasm.h
@@ -186,6 +186,8 @@ extern struct acpi_dmtable_info acpi_dm_table_info_madt5[];
186extern struct acpi_dmtable_info acpi_dm_table_info_madt6[]; 186extern struct acpi_dmtable_info acpi_dm_table_info_madt6[];
187extern struct acpi_dmtable_info acpi_dm_table_info_madt7[]; 187extern struct acpi_dmtable_info acpi_dm_table_info_madt7[];
188extern struct acpi_dmtable_info acpi_dm_table_info_madt8[]; 188extern struct acpi_dmtable_info acpi_dm_table_info_madt8[];
189extern struct acpi_dmtable_info acpi_dm_table_info_madt9[];
190extern struct acpi_dmtable_info acpi_dm_table_info_madt10[];
189extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[]; 191extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[];
190extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[]; 192extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[];
191extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[]; 193extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[];
@@ -197,8 +199,10 @@ extern struct acpi_dmtable_info acpi_dm_table_info_slit[];
197extern struct acpi_dmtable_info acpi_dm_table_info_spcr[]; 199extern struct acpi_dmtable_info acpi_dm_table_info_spcr[];
198extern struct acpi_dmtable_info acpi_dm_table_info_spmi[]; 200extern struct acpi_dmtable_info acpi_dm_table_info_spmi[];
199extern struct acpi_dmtable_info acpi_dm_table_info_srat[]; 201extern struct acpi_dmtable_info acpi_dm_table_info_srat[];
202extern struct acpi_dmtable_info acpi_dm_table_info_srat_hdr[];
200extern struct acpi_dmtable_info acpi_dm_table_info_srat0[]; 203extern struct acpi_dmtable_info acpi_dm_table_info_srat0[];
201extern struct acpi_dmtable_info acpi_dm_table_info_srat1[]; 204extern struct acpi_dmtable_info acpi_dm_table_info_srat1[];
205extern struct acpi_dmtable_info acpi_dm_table_info_srat2[];
202extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[]; 206extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[];
203extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[]; 207extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[];
204 208
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h
index 21a73a105d0a..6291904be01e 100644
--- a/include/acpi/acdispat.h
+++ b/include/acpi/acdispat.h
@@ -157,7 +157,7 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);
157 * dsmthdat - method data (locals/args) 157 * dsmthdat - method data (locals/args)
158 */ 158 */
159acpi_status 159acpi_status
160acpi_ds_store_object_to_local(u16 opcode, 160acpi_ds_store_object_to_local(u8 type,
161 u32 index, 161 u32 index,
162 union acpi_operand_object *src_desc, 162 union acpi_operand_object *src_desc,
163 struct acpi_walk_state *walk_state); 163 struct acpi_walk_state *walk_state);
@@ -173,7 +173,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state);
173u8 acpi_ds_is_method_value(union acpi_operand_object *obj_desc); 173u8 acpi_ds_is_method_value(union acpi_operand_object *obj_desc);
174 174
175acpi_status 175acpi_status
176acpi_ds_method_data_get_value(u16 opcode, 176acpi_ds_method_data_get_value(u8 type,
177 u32 index, 177 u32 index,
178 struct acpi_walk_state *walk_state, 178 struct acpi_walk_state *walk_state,
179 union acpi_operand_object **dest_desc); 179 union acpi_operand_object **dest_desc);
@@ -184,7 +184,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params,
184 struct acpi_walk_state *walk_state); 184 struct acpi_walk_state *walk_state);
185 185
186acpi_status 186acpi_status
187acpi_ds_method_data_get_node(u16 opcode, 187acpi_ds_method_data_get_node(u8 type,
188 u32 index, 188 u32 index,
189 struct acpi_walk_state *walk_state, 189 struct acpi_walk_state *walk_state,
190 struct acpi_namespace_node **node); 190 struct acpi_namespace_node **node);
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index e5a890ffeb02..84f5cb242863 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -76,25 +76,21 @@
76#define AE_STACK_OVERFLOW (acpi_status) (0x000C | AE_CODE_ENVIRONMENTAL) 76#define AE_STACK_OVERFLOW (acpi_status) (0x000C | AE_CODE_ENVIRONMENTAL)
77#define AE_STACK_UNDERFLOW (acpi_status) (0x000D | AE_CODE_ENVIRONMENTAL) 77#define AE_STACK_UNDERFLOW (acpi_status) (0x000D | AE_CODE_ENVIRONMENTAL)
78#define AE_NOT_IMPLEMENTED (acpi_status) (0x000E | AE_CODE_ENVIRONMENTAL) 78#define AE_NOT_IMPLEMENTED (acpi_status) (0x000E | AE_CODE_ENVIRONMENTAL)
79#define AE_VERSION_MISMATCH (acpi_status) (0x000F | AE_CODE_ENVIRONMENTAL) 79#define AE_SUPPORT (acpi_status) (0x000F | AE_CODE_ENVIRONMENTAL)
80#define AE_SUPPORT (acpi_status) (0x0010 | AE_CODE_ENVIRONMENTAL) 80#define AE_LIMIT (acpi_status) (0x0010 | AE_CODE_ENVIRONMENTAL)
81#define AE_SHARE (acpi_status) (0x0011 | AE_CODE_ENVIRONMENTAL) 81#define AE_TIME (acpi_status) (0x0011 | AE_CODE_ENVIRONMENTAL)
82#define AE_LIMIT (acpi_status) (0x0012 | AE_CODE_ENVIRONMENTAL) 82#define AE_ACQUIRE_DEADLOCK (acpi_status) (0x0012 | AE_CODE_ENVIRONMENTAL)
83#define AE_TIME (acpi_status) (0x0013 | AE_CODE_ENVIRONMENTAL) 83#define AE_RELEASE_DEADLOCK (acpi_status) (0x0013 | AE_CODE_ENVIRONMENTAL)
84#define AE_UNKNOWN_STATUS (acpi_status) (0x0014 | AE_CODE_ENVIRONMENTAL) 84#define AE_NOT_ACQUIRED (acpi_status) (0x0014 | AE_CODE_ENVIRONMENTAL)
85#define AE_ACQUIRE_DEADLOCK (acpi_status) (0x0015 | AE_CODE_ENVIRONMENTAL) 85#define AE_ALREADY_ACQUIRED (acpi_status) (0x0015 | AE_CODE_ENVIRONMENTAL)
86#define AE_RELEASE_DEADLOCK (acpi_status) (0x0016 | AE_CODE_ENVIRONMENTAL) 86#define AE_NO_HARDWARE_RESPONSE (acpi_status) (0x0016 | AE_CODE_ENVIRONMENTAL)
87#define AE_NOT_ACQUIRED (acpi_status) (0x0017 | AE_CODE_ENVIRONMENTAL) 87#define AE_NO_GLOBAL_LOCK (acpi_status) (0x0017 | AE_CODE_ENVIRONMENTAL)
88#define AE_ALREADY_ACQUIRED (acpi_status) (0x0018 | AE_CODE_ENVIRONMENTAL) 88#define AE_ABORT_METHOD (acpi_status) (0x0018 | AE_CODE_ENVIRONMENTAL)
89#define AE_NO_HARDWARE_RESPONSE (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL) 89#define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL)
90#define AE_NO_GLOBAL_LOCK (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) 90#define AE_WAKE_ONLY_GPE (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL)
91#define AE_LOGICAL_ADDRESS (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL) 91#define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL)
92#define AE_ABORT_METHOD (acpi_status) (0x001C | AE_CODE_ENVIRONMENTAL)
93#define AE_SAME_HANDLER (acpi_status) (0x001D | AE_CODE_ENVIRONMENTAL)
94#define AE_WAKE_ONLY_GPE (acpi_status) (0x001E | AE_CODE_ENVIRONMENTAL)
95#define AE_OWNER_ID_LIMIT (acpi_status) (0x001F | AE_CODE_ENVIRONMENTAL)
96 92
97#define AE_CODE_ENV_MAX 0x001F 93#define AE_CODE_ENV_MAX 0x001B
98 94
99/* 95/*
100 * Programmer exceptions 96 * Programmer exceptions
@@ -103,14 +99,12 @@
103#define AE_BAD_CHARACTER (acpi_status) (0x0002 | AE_CODE_PROGRAMMER) 99#define AE_BAD_CHARACTER (acpi_status) (0x0002 | AE_CODE_PROGRAMMER)
104#define AE_BAD_PATHNAME (acpi_status) (0x0003 | AE_CODE_PROGRAMMER) 100#define AE_BAD_PATHNAME (acpi_status) (0x0003 | AE_CODE_PROGRAMMER)
105#define AE_BAD_DATA (acpi_status) (0x0004 | AE_CODE_PROGRAMMER) 101#define AE_BAD_DATA (acpi_status) (0x0004 | AE_CODE_PROGRAMMER)
106#define AE_BAD_ADDRESS (acpi_status) (0x0005 | AE_CODE_PROGRAMMER) 102#define AE_BAD_HEX_CONSTANT (acpi_status) (0x0005 | AE_CODE_PROGRAMMER)
107#define AE_ALIGNMENT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER) 103#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER)
108#define AE_BAD_HEX_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER) 104#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER)
109#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0008 | AE_CODE_PROGRAMMER) 105#define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER)
110#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0009 | AE_CODE_PROGRAMMER)
111#define AE_MISSING_ARGUMENTS (acpi_status) (0x000A | AE_CODE_PROGRAMMER)
112 106
113#define AE_CODE_PGM_MAX 0x000A 107#define AE_CODE_PGM_MAX 0x0008
114 108
115/* 109/*
116 * Acpi table exceptions 110 * Acpi table exceptions
@@ -119,51 +113,48 @@
119#define AE_BAD_HEADER (acpi_status) (0x0002 | AE_CODE_ACPI_TABLES) 113#define AE_BAD_HEADER (acpi_status) (0x0002 | AE_CODE_ACPI_TABLES)
120#define AE_BAD_CHECKSUM (acpi_status) (0x0003 | AE_CODE_ACPI_TABLES) 114#define AE_BAD_CHECKSUM (acpi_status) (0x0003 | AE_CODE_ACPI_TABLES)
121#define AE_BAD_VALUE (acpi_status) (0x0004 | AE_CODE_ACPI_TABLES) 115#define AE_BAD_VALUE (acpi_status) (0x0004 | AE_CODE_ACPI_TABLES)
122#define AE_TABLE_NOT_SUPPORTED (acpi_status) (0x0005 | AE_CODE_ACPI_TABLES) 116#define AE_INVALID_TABLE_LENGTH (acpi_status) (0x0005 | AE_CODE_ACPI_TABLES)
123#define AE_INVALID_TABLE_LENGTH (acpi_status) (0x0006 | AE_CODE_ACPI_TABLES)
124 117
125#define AE_CODE_TBL_MAX 0x0006 118#define AE_CODE_TBL_MAX 0x0005
126 119
127/* 120/*
128 * AML exceptions. These are caused by problems with 121 * AML exceptions. These are caused by problems with
129 * the actual AML byte stream 122 * the actual AML byte stream
130 */ 123 */
131#define AE_AML_ERROR (acpi_status) (0x0001 | AE_CODE_AML) 124#define AE_AML_BAD_OPCODE (acpi_status) (0x0001 | AE_CODE_AML)
132#define AE_AML_PARSE (acpi_status) (0x0002 | AE_CODE_AML) 125#define AE_AML_NO_OPERAND (acpi_status) (0x0002 | AE_CODE_AML)
133#define AE_AML_BAD_OPCODE (acpi_status) (0x0003 | AE_CODE_AML) 126#define AE_AML_OPERAND_TYPE (acpi_status) (0x0003 | AE_CODE_AML)
134#define AE_AML_NO_OPERAND (acpi_status) (0x0004 | AE_CODE_AML) 127#define AE_AML_OPERAND_VALUE (acpi_status) (0x0004 | AE_CODE_AML)
135#define AE_AML_OPERAND_TYPE (acpi_status) (0x0005 | AE_CODE_AML) 128#define AE_AML_UNINITIALIZED_LOCAL (acpi_status) (0x0005 | AE_CODE_AML)
136#define AE_AML_OPERAND_VALUE (acpi_status) (0x0006 | AE_CODE_AML) 129#define AE_AML_UNINITIALIZED_ARG (acpi_status) (0x0006 | AE_CODE_AML)
137#define AE_AML_UNINITIALIZED_LOCAL (acpi_status) (0x0007 | AE_CODE_AML) 130#define AE_AML_UNINITIALIZED_ELEMENT (acpi_status) (0x0007 | AE_CODE_AML)
138#define AE_AML_UNINITIALIZED_ARG (acpi_status) (0x0008 | AE_CODE_AML) 131#define AE_AML_NUMERIC_OVERFLOW (acpi_status) (0x0008 | AE_CODE_AML)
139#define AE_AML_UNINITIALIZED_ELEMENT (acpi_status) (0x0009 | AE_CODE_AML) 132#define AE_AML_REGION_LIMIT (acpi_status) (0x0009 | AE_CODE_AML)
140#define AE_AML_NUMERIC_OVERFLOW (acpi_status) (0x000A | AE_CODE_AML) 133#define AE_AML_BUFFER_LIMIT (acpi_status) (0x000A | AE_CODE_AML)
141#define AE_AML_REGION_LIMIT (acpi_status) (0x000B | AE_CODE_AML) 134#define AE_AML_PACKAGE_LIMIT (acpi_status) (0x000B | AE_CODE_AML)
142#define AE_AML_BUFFER_LIMIT (acpi_status) (0x000C | AE_CODE_AML) 135#define AE_AML_DIVIDE_BY_ZERO (acpi_status) (0x000C | AE_CODE_AML)
143#define AE_AML_PACKAGE_LIMIT (acpi_status) (0x000D | AE_CODE_AML) 136#define AE_AML_BAD_NAME (acpi_status) (0x000D | AE_CODE_AML)
144#define AE_AML_DIVIDE_BY_ZERO (acpi_status) (0x000E | AE_CODE_AML) 137#define AE_AML_NAME_NOT_FOUND (acpi_status) (0x000E | AE_CODE_AML)
145#define AE_AML_BAD_NAME (acpi_status) (0x000F | AE_CODE_AML) 138#define AE_AML_INTERNAL (acpi_status) (0x000F | AE_CODE_AML)
146#define AE_AML_NAME_NOT_FOUND (acpi_status) (0x0010 | AE_CODE_AML) 139#define AE_AML_INVALID_SPACE_ID (acpi_status) (0x0010 | AE_CODE_AML)
147#define AE_AML_INTERNAL (acpi_status) (0x0011 | AE_CODE_AML) 140#define AE_AML_STRING_LIMIT (acpi_status) (0x0011 | AE_CODE_AML)
148#define AE_AML_INVALID_SPACE_ID (acpi_status) (0x0012 | AE_CODE_AML) 141#define AE_AML_NO_RETURN_VALUE (acpi_status) (0x0012 | AE_CODE_AML)
149#define AE_AML_STRING_LIMIT (acpi_status) (0x0013 | AE_CODE_AML) 142#define AE_AML_METHOD_LIMIT (acpi_status) (0x0013 | AE_CODE_AML)
150#define AE_AML_NO_RETURN_VALUE (acpi_status) (0x0014 | AE_CODE_AML) 143#define AE_AML_NOT_OWNER (acpi_status) (0x0014 | AE_CODE_AML)
151#define AE_AML_METHOD_LIMIT (acpi_status) (0x0015 | AE_CODE_AML) 144#define AE_AML_MUTEX_ORDER (acpi_status) (0x0015 | AE_CODE_AML)
152#define AE_AML_NOT_OWNER (acpi_status) (0x0016 | AE_CODE_AML) 145#define AE_AML_MUTEX_NOT_ACQUIRED (acpi_status) (0x0016 | AE_CODE_AML)
153#define AE_AML_MUTEX_ORDER (acpi_status) (0x0017 | AE_CODE_AML) 146#define AE_AML_INVALID_RESOURCE_TYPE (acpi_status) (0x0017 | AE_CODE_AML)
154#define AE_AML_MUTEX_NOT_ACQUIRED (acpi_status) (0x0018 | AE_CODE_AML) 147#define AE_AML_INVALID_INDEX (acpi_status) (0x0018 | AE_CODE_AML)
155#define AE_AML_INVALID_RESOURCE_TYPE (acpi_status) (0x0019 | AE_CODE_AML) 148#define AE_AML_REGISTER_LIMIT (acpi_status) (0x0019 | AE_CODE_AML)
156#define AE_AML_INVALID_INDEX (acpi_status) (0x001A | AE_CODE_AML) 149#define AE_AML_NO_WHILE (acpi_status) (0x001A | AE_CODE_AML)
157#define AE_AML_REGISTER_LIMIT (acpi_status) (0x001B | AE_CODE_AML) 150#define AE_AML_ALIGNMENT (acpi_status) (0x001B | AE_CODE_AML)
158#define AE_AML_NO_WHILE (acpi_status) (0x001C | AE_CODE_AML) 151#define AE_AML_NO_RESOURCE_END_TAG (acpi_status) (0x001C | AE_CODE_AML)
159#define AE_AML_ALIGNMENT (acpi_status) (0x001D | AE_CODE_AML) 152#define AE_AML_BAD_RESOURCE_VALUE (acpi_status) (0x001D | AE_CODE_AML)
160#define AE_AML_NO_RESOURCE_END_TAG (acpi_status) (0x001E | AE_CODE_AML) 153#define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x001E | AE_CODE_AML)
161#define AE_AML_BAD_RESOURCE_VALUE (acpi_status) (0x001F | AE_CODE_AML) 154#define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x001F | AE_CODE_AML)
162#define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x0020 | AE_CODE_AML) 155#define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0020 | AE_CODE_AML)
163#define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x0021 | AE_CODE_AML)
164#define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0022 | AE_CODE_AML)
165 156
166#define AE_CODE_AML_MAX 0x0022 157#define AE_CODE_AML_MAX 0x0020
167 158
168/* 159/*
169 * Internal exceptions used for control 160 * Internal exceptions used for control
@@ -206,19 +197,15 @@ char const *acpi_gbl_exception_names_env[] = {
206 "AE_STACK_OVERFLOW", 197 "AE_STACK_OVERFLOW",
207 "AE_STACK_UNDERFLOW", 198 "AE_STACK_UNDERFLOW",
208 "AE_NOT_IMPLEMENTED", 199 "AE_NOT_IMPLEMENTED",
209 "AE_VERSION_MISMATCH",
210 "AE_SUPPORT", 200 "AE_SUPPORT",
211 "AE_SHARE",
212 "AE_LIMIT", 201 "AE_LIMIT",
213 "AE_TIME", 202 "AE_TIME",
214 "AE_UNKNOWN_STATUS",
215 "AE_ACQUIRE_DEADLOCK", 203 "AE_ACQUIRE_DEADLOCK",
216 "AE_RELEASE_DEADLOCK", 204 "AE_RELEASE_DEADLOCK",
217 "AE_NOT_ACQUIRED", 205 "AE_NOT_ACQUIRED",
218 "AE_ALREADY_ACQUIRED", 206 "AE_ALREADY_ACQUIRED",
219 "AE_NO_HARDWARE_RESPONSE", 207 "AE_NO_HARDWARE_RESPONSE",
220 "AE_NO_GLOBAL_LOCK", 208 "AE_NO_GLOBAL_LOCK",
221 "AE_LOGICAL_ADDRESS",
222 "AE_ABORT_METHOD", 209 "AE_ABORT_METHOD",
223 "AE_SAME_HANDLER", 210 "AE_SAME_HANDLER",
224 "AE_WAKE_ONLY_GPE", 211 "AE_WAKE_ONLY_GPE",
@@ -231,8 +218,6 @@ char const *acpi_gbl_exception_names_pgm[] = {
231 "AE_BAD_CHARACTER", 218 "AE_BAD_CHARACTER",
232 "AE_BAD_PATHNAME", 219 "AE_BAD_PATHNAME",
233 "AE_BAD_DATA", 220 "AE_BAD_DATA",
234 "AE_BAD_ADDRESS",
235 "AE_ALIGNMENT",
236 "AE_BAD_HEX_CONSTANT", 221 "AE_BAD_HEX_CONSTANT",
237 "AE_BAD_OCTAL_CONSTANT", 222 "AE_BAD_OCTAL_CONSTANT",
238 "AE_BAD_DECIMAL_CONSTANT", 223 "AE_BAD_DECIMAL_CONSTANT",
@@ -245,14 +230,11 @@ char const *acpi_gbl_exception_names_tbl[] = {
245 "AE_BAD_HEADER", 230 "AE_BAD_HEADER",
246 "AE_BAD_CHECKSUM", 231 "AE_BAD_CHECKSUM",
247 "AE_BAD_VALUE", 232 "AE_BAD_VALUE",
248 "AE_TABLE_NOT_SUPPORTED",
249 "AE_INVALID_TABLE_LENGTH" 233 "AE_INVALID_TABLE_LENGTH"
250}; 234};
251 235
252char const *acpi_gbl_exception_names_aml[] = { 236char const *acpi_gbl_exception_names_aml[] = {
253 NULL, 237 NULL,
254 "AE_AML_ERROR",
255 "AE_AML_PARSE",
256 "AE_AML_BAD_OPCODE", 238 "AE_AML_BAD_OPCODE",
257 "AE_AML_NO_OPERAND", 239 "AE_AML_NO_OPERAND",
258 "AE_AML_OPERAND_TYPE", 240 "AE_AML_OPERAND_TYPE",
@@ -284,7 +266,7 @@ char const *acpi_gbl_exception_names_aml[] = {
284 "AE_AML_BAD_RESOURCE_VALUE", 266 "AE_AML_BAD_RESOURCE_VALUE",
285 "AE_AML_CIRCULAR_REFERENCE", 267 "AE_AML_CIRCULAR_REFERENCE",
286 "AE_AML_BAD_RESOURCE_LENGTH", 268 "AE_AML_BAD_RESOURCE_LENGTH",
287 "AE_AML_ILLEGAL_ADDRESS" 269 "AE_AML_ILLEGAL_ADDRESS",
288}; 270};
289 271
290char const *acpi_gbl_exception_names_ctrl[] = { 272char const *acpi_gbl_exception_names_ctrl[] = {
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index b221c8583ddd..ecab527cf78e 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -208,6 +208,7 @@ struct acpi_namespace_node {
208#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */ 208#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */
209#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ 209#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */
210#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ 210#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */
211#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
211 212
212#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */ 213#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */
213#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */ 214#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */
@@ -340,6 +341,82 @@ acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);
340#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ 341#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */
341#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF 342#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF
342 343
344/*
345 * Information structure for ACPI predefined names.
346 * Each entry in the table contains the following items:
347 *
348 * Name - The ACPI reserved name
349 * param_count - Number of arguments to the method
350 * expected_return_btypes - Allowed type(s) for the return value
351 */
352struct acpi_name_info {
353 char name[ACPI_NAME_SIZE];
354 u8 param_count;
355 u8 expected_btypes;
356};
357
358/*
359 * Secondary information structures for ACPI predefined objects that return
360 * package objects. This structure appears as the next entry in the table
361 * after the NAME_INFO structure above.
362 *
363 * The reason for this is to minimize the size of the predefined name table.
364 */
365
366/*
367 * Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2,
368 * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT
369 */
370struct acpi_package_info {
371 u8 type;
372 u8 object_type1;
373 u8 count1;
374 u8 object_type2;
375 u8 count2;
376 u8 reserved;
377};
378
379/* Used for ACPI_PTYPE2_FIXED */
380
381struct acpi_package_info2 {
382 u8 type;
383 u8 count;
384 u8 object_type[4];
385};
386
387/* Used for ACPI_PTYPE1_OPTION */
388
389struct acpi_package_info3 {
390 u8 type;
391 u8 count;
392 u8 object_type[2];
393 u8 tail_object_type;
394 u8 reserved;
395};
396
397union acpi_predefined_info {
398 struct acpi_name_info info;
399 struct acpi_package_info ret_info;
400 struct acpi_package_info2 ret_info2;
401 struct acpi_package_info3 ret_info3;
402};
403
404/*
405 * Bitmapped return value types
406 * Note: the actual data types must be contiguous, a loop in nspredef.c
407 * depends on this.
408 */
409#define ACPI_RTYPE_ANY 0x00
410#define ACPI_RTYPE_NONE 0x01
411#define ACPI_RTYPE_INTEGER 0x02
412#define ACPI_RTYPE_STRING 0x04
413#define ACPI_RTYPE_BUFFER 0x08
414#define ACPI_RTYPE_PACKAGE 0x10
415#define ACPI_RTYPE_REFERENCE 0x20
416#define ACPI_RTYPE_ALL 0x3F
417
418#define ACPI_NUM_RTYPES 5 /* Number of actual object types */
419
343/***************************************************************************** 420/*****************************************************************************
344 * 421 *
345 * Event typedefs and structs 422 * Event typedefs and structs
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index 74a9617776a8..a597207e2835 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -62,7 +62,7 @@
62#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) 62#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))
63 63
64/* 64/*
65 * Extract data using a pointer. Any more than a byte and we 65 * Extract data using a pointer. Any more than a byte and we
66 * get into potential aligment issues -- see the STORE macros below. 66 * get into potential aligment issues -- see the STORE macros below.
67 * Use with care. 67 * Use with care.
68 */ 68 */
@@ -80,21 +80,21 @@
80 */ 80 */
81#define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p)) 81#define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p))
82#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p)) 82#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p))
83#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_size)(b))) 83#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) + (acpi_size)(b)))
84#define ACPI_PTR_DIFF(a, b) (acpi_size) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b))) 84#define ACPI_PTR_DIFF(a, b) (acpi_size) (ACPI_CAST_PTR (u8, (a)) - ACPI_CAST_PTR (u8, (b)))
85 85
86/* Pointer/Integer type conversions */ 86/* Pointer/Integer type conversions */
87 87
88#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL, (acpi_size) i) 88#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL, (acpi_size) i)
89#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) 89#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) NULL)
90#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) 90#define ACPI_OFFSET(d, f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f), (void *) NULL)
91#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) 91#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
92#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) 92#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
93 93
94#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED 94#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
95#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b))) 95#define ACPI_COMPARE_NAME(a, b) (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b)))
96#else 96#else
97#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE)) 97#define ACPI_COMPARE_NAME(a, b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE))
98#endif 98#endif
99 99
100/* 100/*
@@ -114,7 +114,7 @@ struct acpi_integer_overlay {
114 114
115/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */ 115/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */
116 116
117#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i) 117#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
118 118
119#if ACPI_MACHINE_WIDTH == 64 119#if ACPI_MACHINE_WIDTH == 64
120#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i) 120#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
@@ -132,37 +132,33 @@ struct acpi_integer_overlay {
132 * Macros for big-endian machines 132 * Macros for big-endian machines
133 */ 133 */
134 134
135/* This macro sets a buffer index, starting from the end of the buffer */
136
137#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) ((buf_len) - (((buf_offset)+1) * (byte_gran)))
138
139/* These macros reverse the bytes during the move, converting little-endian to big endian */ 135/* These macros reverse the bytes during the move, converting little-endian to big endian */
140 136
141 /* Big Endian <== Little Endian */ 137 /* Big Endian <== Little Endian */
142 /* Hi...Lo Lo...Hi */ 138 /* Hi...Lo Lo...Hi */
143/* 16-bit source, 16/32/64 destination */ 139/* 16-bit source, 16/32/64 destination */
144 140
145#define ACPI_MOVE_16_TO_16(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[1];\ 141#define ACPI_MOVE_16_TO_16(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[1];\
146 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[0];} 142 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[0];}
147 143
148#define ACPI_MOVE_16_TO_32(d,s) {(*(u32 *)(void *)(d))=0;\ 144#define ACPI_MOVE_16_TO_32(d, s) {(*(u32 *)(void *)(d))=0;\
149 ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\ 145 ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
150 ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];} 146 ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
151 147
152#define ACPI_MOVE_16_TO_64(d,s) {(*(u64 *)(void *)(d))=0;\ 148#define ACPI_MOVE_16_TO_64(d, s) {(*(u64 *)(void *)(d))=0;\
153 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\ 149 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
154 ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];} 150 ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
155 151
156/* 32-bit source, 16/32/64 destination */ 152/* 32-bit source, 16/32/64 destination */
157 153
158#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 154#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
159 155
160#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\ 156#define ACPI_MOVE_32_TO_32(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\
161 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\ 157 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\
162 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\ 158 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
163 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];} 159 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
164 160
165#define ACPI_MOVE_32_TO_64(d,s) {(*(u64 *)(void *)(d))=0;\ 161#define ACPI_MOVE_32_TO_64(d, s) {(*(u64 *)(void *)(d))=0;\
166 ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\ 162 ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\
167 ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\ 163 ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\
168 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\ 164 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
@@ -170,11 +166,11 @@ struct acpi_integer_overlay {
170 166
171/* 64-bit source, 16/32/64 destination */ 167/* 64-bit source, 16/32/64 destination */
172 168
173#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 169#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
174 170
175#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 171#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
176 172
177#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\ 173#define ACPI_MOVE_64_TO_64(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\
178 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\ 174 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\
179 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[5];\ 175 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[5];\
180 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[4];\ 176 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[4];\
@@ -187,63 +183,59 @@ struct acpi_integer_overlay {
187 * Macros for little-endian machines 183 * Macros for little-endian machines
188 */ 184 */
189 185
190/* This macro sets a buffer index, starting from the beginning of the buffer */
191
192#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) (buf_offset)
193
194#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED 186#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
195 187
196/* The hardware supports unaligned transfers, just do the little-endian move */ 188/* The hardware supports unaligned transfers, just do the little-endian move */
197 189
198/* 16-bit source, 16/32/64 destination */ 190/* 16-bit source, 16/32/64 destination */
199 191
200#define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s) 192#define ACPI_MOVE_16_TO_16(d, s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
201#define ACPI_MOVE_16_TO_32(d,s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s) 193#define ACPI_MOVE_16_TO_32(d, s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
202#define ACPI_MOVE_16_TO_64(d,s) *(u64 *)(void *)(d) = *(u16 *)(void *)(s) 194#define ACPI_MOVE_16_TO_64(d, s) *(u64 *)(void *)(d) = *(u16 *)(void *)(s)
203 195
204/* 32-bit source, 16/32/64 destination */ 196/* 32-bit source, 16/32/64 destination */
205 197
206#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 198#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
207#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s) 199#define ACPI_MOVE_32_TO_32(d, s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
208#define ACPI_MOVE_32_TO_64(d,s) *(u64 *)(void *)(d) = *(u32 *)(void *)(s) 200#define ACPI_MOVE_32_TO_64(d, s) *(u64 *)(void *)(d) = *(u32 *)(void *)(s)
209 201
210/* 64-bit source, 16/32/64 destination */ 202/* 64-bit source, 16/32/64 destination */
211 203
212#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 204#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
213#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 205#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
214#define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s) 206#define ACPI_MOVE_64_TO_64(d, s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
215 207
216#else 208#else
217/* 209/*
218 * The hardware does not support unaligned transfers. We must move the 210 * The hardware does not support unaligned transfers. We must move the
219 * data one byte at a time. These macros work whether the source or 211 * data one byte at a time. These macros work whether the source or
220 * the destination (or both) is/are unaligned. (Little-endian move) 212 * the destination (or both) is/are unaligned. (Little-endian move)
221 */ 213 */
222 214
223/* 16-bit source, 16/32/64 destination */ 215/* 16-bit source, 16/32/64 destination */
224 216
225#define ACPI_MOVE_16_TO_16(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ 217#define ACPI_MOVE_16_TO_16(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
226 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];} 218 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];}
227 219
228#define ACPI_MOVE_16_TO_32(d,s) {(*(u32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);} 220#define ACPI_MOVE_16_TO_32(d, s) {(*(u32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
229#define ACPI_MOVE_16_TO_64(d,s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);} 221#define ACPI_MOVE_16_TO_64(d, s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
230 222
231/* 32-bit source, 16/32/64 destination */ 223/* 32-bit source, 16/32/64 destination */
232 224
233#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 225#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
234 226
235#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ 227#define ACPI_MOVE_32_TO_32(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
236 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ 228 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
237 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\ 229 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
238 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];} 230 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];}
239 231
240#define ACPI_MOVE_32_TO_64(d,s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d,s);} 232#define ACPI_MOVE_32_TO_64(d, s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d, s);}
241 233
242/* 64-bit source, 16/32/64 destination */ 234/* 64-bit source, 16/32/64 destination */
243 235
244#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 236#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
245#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 237#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
246#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ 238#define ACPI_MOVE_64_TO_64(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
247 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ 239 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
248 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\ 240 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
249 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\ 241 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\
@@ -257,10 +249,10 @@ struct acpi_integer_overlay {
257/* Macros based on machine integer width */ 249/* Macros based on machine integer width */
258 250
259#if ACPI_MACHINE_WIDTH == 32 251#if ACPI_MACHINE_WIDTH == 32
260#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s) 252#define ACPI_MOVE_SIZE_TO_16(d, s) ACPI_MOVE_32_TO_16(d, s)
261 253
262#elif ACPI_MACHINE_WIDTH == 64 254#elif ACPI_MACHINE_WIDTH == 64
263#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_64_TO_16(d,s) 255#define ACPI_MOVE_SIZE_TO_16(d, s) ACPI_MOVE_64_TO_16(d, s)
264 256
265#else 257#else
266#error unknown ACPI_MACHINE_WIDTH 258#error unknown ACPI_MACHINE_WIDTH
@@ -269,29 +261,29 @@ struct acpi_integer_overlay {
269/* 261/*
270 * Fast power-of-two math macros for non-optimized compilers 262 * Fast power-of-two math macros for non-optimized compilers
271 */ 263 */
272#define _ACPI_DIV(value,power_of2) ((u32) ((value) >> (power_of2))) 264#define _ACPI_DIV(value, power_of2) ((u32) ((value) >> (power_of2)))
273#define _ACPI_MUL(value,power_of2) ((u32) ((value) << (power_of2))) 265#define _ACPI_MUL(value, power_of2) ((u32) ((value) << (power_of2)))
274#define _ACPI_MOD(value,divisor) ((u32) ((value) & ((divisor) -1))) 266#define _ACPI_MOD(value, divisor) ((u32) ((value) & ((divisor) -1)))
275 267
276#define ACPI_DIV_2(a) _ACPI_DIV(a,1) 268#define ACPI_DIV_2(a) _ACPI_DIV(a, 1)
277#define ACPI_MUL_2(a) _ACPI_MUL(a,1) 269#define ACPI_MUL_2(a) _ACPI_MUL(a, 1)
278#define ACPI_MOD_2(a) _ACPI_MOD(a,2) 270#define ACPI_MOD_2(a) _ACPI_MOD(a, 2)
279 271
280#define ACPI_DIV_4(a) _ACPI_DIV(a,2) 272#define ACPI_DIV_4(a) _ACPI_DIV(a, 2)
281#define ACPI_MUL_4(a) _ACPI_MUL(a,2) 273#define ACPI_MUL_4(a) _ACPI_MUL(a, 2)
282#define ACPI_MOD_4(a) _ACPI_MOD(a,4) 274#define ACPI_MOD_4(a) _ACPI_MOD(a, 4)
283 275
284#define ACPI_DIV_8(a) _ACPI_DIV(a,3) 276#define ACPI_DIV_8(a) _ACPI_DIV(a, 3)
285#define ACPI_MUL_8(a) _ACPI_MUL(a,3) 277#define ACPI_MUL_8(a) _ACPI_MUL(a, 3)
286#define ACPI_MOD_8(a) _ACPI_MOD(a,8) 278#define ACPI_MOD_8(a) _ACPI_MOD(a, 8)
287 279
288#define ACPI_DIV_16(a) _ACPI_DIV(a,4) 280#define ACPI_DIV_16(a) _ACPI_DIV(a, 4)
289#define ACPI_MUL_16(a) _ACPI_MUL(a,4) 281#define ACPI_MUL_16(a) _ACPI_MUL(a, 4)
290#define ACPI_MOD_16(a) _ACPI_MOD(a,16) 282#define ACPI_MOD_16(a) _ACPI_MOD(a, 16)
291 283
292#define ACPI_DIV_32(a) _ACPI_DIV(a,5) 284#define ACPI_DIV_32(a) _ACPI_DIV(a, 5)
293#define ACPI_MUL_32(a) _ACPI_MUL(a,5) 285#define ACPI_MUL_32(a) _ACPI_MUL(a, 5)
294#define ACPI_MOD_32(a) _ACPI_MOD(a,32) 286#define ACPI_MOD_32(a) _ACPI_MOD(a, 32)
295 287
296/* 288/*
297 * Rounding macros (Power of two boundaries only) 289 * Rounding macros (Power of two boundaries only)
@@ -305,13 +297,13 @@ struct acpi_integer_overlay {
305 297
306/* Note: sizeof(acpi_size) evaluates to either 4 or 8 (32- vs 64-bit mode) */ 298/* Note: sizeof(acpi_size) evaluates to either 4 or 8 (32- vs 64-bit mode) */
307 299
308#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4) 300#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a, 4)
309#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8) 301#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a, 8)
310#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(acpi_size)) 302#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a, sizeof(acpi_size))
311 303
312#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4) 304#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a, 4)
313#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8) 305#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a, 8)
314#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(acpi_size)) 306#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a, sizeof(acpi_size))
315 307
316#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) 308#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
317#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a)) 309#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
@@ -320,9 +312,9 @@ struct acpi_integer_overlay {
320 312
321/* Generic (non-power-of-two) rounding */ 313/* Generic (non-power-of-two) rounding */
322 314
323#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary)) 315#define ACPI_ROUND_UP_TO(value, boundary) (((value) + ((boundary)-1)) / (boundary))
324 316
325#define ACPI_IS_MISALIGNED(value) (((acpi_size)value) & (sizeof(acpi_size)-1)) 317#define ACPI_IS_MISALIGNED(value) (((acpi_size) value) & (sizeof(acpi_size)-1))
326 318
327/* 319/*
328 * Bitmask creation 320 * Bitmask creation
@@ -333,8 +325,6 @@ struct acpi_integer_overlay {
333#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position)))) 325#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position))))
334#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position))) 326#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position)))
335 327
336#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
337
338/* Bitfields within ACPI registers */ 328/* Bitfields within ACPI registers */
339 329
340#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) 330#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask)
@@ -342,39 +332,29 @@ struct acpi_integer_overlay {
342 332
343#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask)) 333#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask))
344 334
345/* Generate a UUID */
346
347#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
348 (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \
349 (b) & 0xFF, ((b) >> 8) & 0xFF, \
350 (c) & 0xFF, ((c) >> 8) & 0xFF, \
351 (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)
352
353/* 335/*
354 * An struct acpi_namespace_node * can appear in some contexts, 336 * An struct acpi_namespace_node can appear in some contexts
355 * where a pointer to an union acpi_operand_object can also 337 * where a pointer to an union acpi_operand_object can also
356 * appear. This macro is used to distinguish them. 338 * appear. This macro is used to distinguish them.
357 * 339 *
358 * The "Descriptor" field is the first field in both structures. 340 * The "Descriptor" field is the first field in both structures.
359 */ 341 */
360#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type) 342#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type)
361#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t) 343#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t)
362 344
363/* Macro to test the object type */ 345/* Macro to test the object type */
364 346
365#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type) 347#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type)
366 348
367/* Macro to check the table flags for SINGLE or MULTIPLE tables are allowed */
368
369#define ACPI_IS_SINGLE_TABLE(x) (((x) & 0x01) == ACPI_TABLE_SINGLE ? 1 : 0)
370
371/* 349/*
372 * Macros for the master AML opcode table 350 * Macros for the master AML opcode table
373 */ 351 */
374#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT) 352#if defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
375#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {name,(u32)(Pargs),(u32)(Iargs),(u32)(flags),obj_type,class,type} 353#define ACPI_OP(name, Pargs, Iargs, obj_type, class, type, flags) \
354 {name, (u32)(Pargs), (u32)(Iargs), (u32)(flags), obj_type, class, type}
376#else 355#else
377#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {(u32)(Pargs),(u32)(Iargs),(u32)(flags),obj_type,class,type} 356#define ACPI_OP(name, Pargs, Iargs, obj_type, class, type, flags) \
357 {(u32)(Pargs), (u32)(Iargs), (u32)(flags), obj_type, class, type}
378#endif 358#endif
379 359
380#ifdef ACPI_DISASSEMBLER 360#ifdef ACPI_DISASSEMBLER
@@ -392,18 +372,18 @@ struct acpi_integer_overlay {
392#define ARG_6(x) ((u32)(x) << (5 * ARG_TYPE_WIDTH)) 372#define ARG_6(x) ((u32)(x) << (5 * ARG_TYPE_WIDTH))
393 373
394#define ARGI_LIST1(a) (ARG_1(a)) 374#define ARGI_LIST1(a) (ARG_1(a))
395#define ARGI_LIST2(a,b) (ARG_1(b)|ARG_2(a)) 375#define ARGI_LIST2(a, b) (ARG_1(b)|ARG_2(a))
396#define ARGI_LIST3(a,b,c) (ARG_1(c)|ARG_2(b)|ARG_3(a)) 376#define ARGI_LIST3(a, b, c) (ARG_1(c)|ARG_2(b)|ARG_3(a))
397#define ARGI_LIST4(a,b,c,d) (ARG_1(d)|ARG_2(c)|ARG_3(b)|ARG_4(a)) 377#define ARGI_LIST4(a, b, c, d) (ARG_1(d)|ARG_2(c)|ARG_3(b)|ARG_4(a))
398#define ARGI_LIST5(a,b,c,d,e) (ARG_1(e)|ARG_2(d)|ARG_3(c)|ARG_4(b)|ARG_5(a)) 378#define ARGI_LIST5(a, b, c, d, e) (ARG_1(e)|ARG_2(d)|ARG_3(c)|ARG_4(b)|ARG_5(a))
399#define ARGI_LIST6(a,b,c,d,e,f) (ARG_1(f)|ARG_2(e)|ARG_3(d)|ARG_4(c)|ARG_5(b)|ARG_6(a)) 379#define ARGI_LIST6(a, b, c, d, e, f) (ARG_1(f)|ARG_2(e)|ARG_3(d)|ARG_4(c)|ARG_5(b)|ARG_6(a))
400 380
401#define ARGP_LIST1(a) (ARG_1(a)) 381#define ARGP_LIST1(a) (ARG_1(a))
402#define ARGP_LIST2(a,b) (ARG_1(a)|ARG_2(b)) 382#define ARGP_LIST2(a, b) (ARG_1(a)|ARG_2(b))
403#define ARGP_LIST3(a,b,c) (ARG_1(a)|ARG_2(b)|ARG_3(c)) 383#define ARGP_LIST3(a, b, c) (ARG_1(a)|ARG_2(b)|ARG_3(c))
404#define ARGP_LIST4(a,b,c,d) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)) 384#define ARGP_LIST4(a, b, c, d) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d))
405#define ARGP_LIST5(a,b,c,d,e) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e)) 385#define ARGP_LIST5(a, b, c, d, e) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e))
406#define ARGP_LIST6(a,b,c,d,e,f) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e)|ARG_6(f)) 386#define ARGP_LIST6(a, b, c, d, e, f) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e)|ARG_6(f))
407 387
408#define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) 388#define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F))
409#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) 389#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH))
@@ -434,8 +414,8 @@ struct acpi_integer_overlay {
434#define ACPI_WARNING(plist) acpi_ut_warning plist 414#define ACPI_WARNING(plist) acpi_ut_warning plist
435#define ACPI_EXCEPTION(plist) acpi_ut_exception plist 415#define ACPI_EXCEPTION(plist) acpi_ut_exception plist
436#define ACPI_ERROR(plist) acpi_ut_error plist 416#define ACPI_ERROR(plist) acpi_ut_error plist
437#define ACPI_ERROR_NAMESPACE(s,e) acpi_ns_report_error (AE_INFO, s, e); 417#define ACPI_ERROR_NAMESPACE(s, e) acpi_ns_report_error (AE_INFO, s, e);
438#define ACPI_ERROR_METHOD(s,n,p,e) acpi_ns_report_method_error (AE_INFO, s, n, p, e); 418#define ACPI_ERROR_METHOD(s, n, p, e) acpi_ns_report_method_error (AE_INFO, s, n, p, e);
439 419
440#else 420#else
441 421
@@ -445,8 +425,8 @@ struct acpi_integer_overlay {
445#define ACPI_WARNING(plist) 425#define ACPI_WARNING(plist)
446#define ACPI_EXCEPTION(plist) 426#define ACPI_EXCEPTION(plist)
447#define ACPI_ERROR(plist) 427#define ACPI_ERROR(plist)
448#define ACPI_ERROR_NAMESPACE(s,e) 428#define ACPI_ERROR_NAMESPACE(s, e)
449#define ACPI_ERROR_METHOD(s,n,p,e) 429#define ACPI_ERROR_METHOD(s, n, p, e)
450#endif 430#endif
451 431
452/* 432/*
@@ -489,18 +469,18 @@ struct acpi_integer_overlay {
489 469
490#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ 470#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \
491 acpi_ut_trace(ACPI_DEBUG_PARAMETERS) 471 acpi_ut_trace(ACPI_DEBUG_PARAMETERS)
492#define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ 472#define ACPI_FUNCTION_TRACE_PTR(a, b) ACPI_FUNCTION_NAME(a) \
493 acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) 473 acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS, (void *)b)
494#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ 474#define ACPI_FUNCTION_TRACE_U32(a, b) ACPI_FUNCTION_NAME(a) \
495 acpi_ut_trace_u32(ACPI_DEBUG_PARAMETERS,(u32)b) 475 acpi_ut_trace_u32(ACPI_DEBUG_PARAMETERS, (u32)b)
496#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a) \ 476#define ACPI_FUNCTION_TRACE_STR(a, b) ACPI_FUNCTION_NAME(a) \
497 acpi_ut_trace_str(ACPI_DEBUG_PARAMETERS,(char *)b) 477 acpi_ut_trace_str(ACPI_DEBUG_PARAMETERS, (char *)b)
498 478
499#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr() 479#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr()
500 480
501/* 481/*
502 * Function exit tracing. 482 * Function exit tracing.
503 * WARNING: These macros include a return statement. This is usually considered 483 * WARNING: These macros include a return statement. This is usually considered
504 * bad form, but having a separate exit macro is very ugly and difficult to maintain. 484 * bad form, but having a separate exit macro is very ugly and difficult to maintain.
505 * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros 485 * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros
506 * so that "_AcpiFunctionName" is defined. 486 * so that "_AcpiFunctionName" is defined.
@@ -596,13 +576,13 @@ struct acpi_integer_overlay {
596 576
597/* Stack and buffer dumping */ 577/* Stack and buffer dumping */
598 578
599#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a),0) 579#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a), 0)
600#define ACPI_DUMP_OPERANDS(a,b,c) acpi_ex_dump_operands(a,b,c) 580#define ACPI_DUMP_OPERANDS(a, b, c) acpi_ex_dump_operands(a, b, c)
601 581
602#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b) 582#define ACPI_DUMP_ENTRY(a, b) acpi_ns_dump_entry (a, b)
603#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) 583#define ACPI_DUMP_PATHNAME(a, b, c, d) acpi_ns_dump_pathname(a, b, c, d)
604#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) 584#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a)
605#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) 585#define ACPI_DUMP_BUFFER(a, b) acpi_ut_dump_buffer((u8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT)
606 586
607/* 587/*
608 * Master debug print macros 588 * Master debug print macros
@@ -625,20 +605,20 @@ struct acpi_integer_overlay {
625#define ACPI_DEBUG_ONLY_MEMBERS(a) do { } while(0) 605#define ACPI_DEBUG_ONLY_MEMBERS(a) do { } while(0)
626#define ACPI_FUNCTION_NAME(a) do { } while(0) 606#define ACPI_FUNCTION_NAME(a) do { } while(0)
627#define ACPI_FUNCTION_TRACE(a) do { } while(0) 607#define ACPI_FUNCTION_TRACE(a) do { } while(0)
628#define ACPI_FUNCTION_TRACE_PTR(a,b) do { } while(0) 608#define ACPI_FUNCTION_TRACE_PTR(a, b) do { } while(0)
629#define ACPI_FUNCTION_TRACE_U32(a,b) do { } while(0) 609#define ACPI_FUNCTION_TRACE_U32(a, b) do { } while(0)
630#define ACPI_FUNCTION_TRACE_STR(a,b) do { } while(0) 610#define ACPI_FUNCTION_TRACE_STR(a, b) do { } while(0)
631#define ACPI_FUNCTION_EXIT do { } while(0) 611#define ACPI_FUNCTION_EXIT do { } while(0)
632#define ACPI_FUNCTION_STATUS_EXIT(s) do { } while(0) 612#define ACPI_FUNCTION_STATUS_EXIT(s) do { } while(0)
633#define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0) 613#define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0)
634#define ACPI_FUNCTION_ENTRY() do { } while(0) 614#define ACPI_FUNCTION_ENTRY() do { } while(0)
635#define ACPI_DUMP_STACK_ENTRY(a) do { } while(0) 615#define ACPI_DUMP_STACK_ENTRY(a) do { } while(0)
636#define ACPI_DUMP_OPERANDS(a,b,c) do { } while(0) 616#define ACPI_DUMP_OPERANDS(a, b, c) do { } while(0)
637#define ACPI_DUMP_ENTRY(a,b) do { } while(0) 617#define ACPI_DUMP_ENTRY(a, b) do { } while(0)
638#define ACPI_DUMP_TABLES(a,b) do { } while(0) 618#define ACPI_DUMP_TABLES(a, b) do { } while(0)
639#define ACPI_DUMP_PATHNAME(a,b,c,d) do { } while(0) 619#define ACPI_DUMP_PATHNAME(a, b, c, d) do { } while(0)
640#define ACPI_DUMP_RESOURCE_LIST(a) do { } while(0) 620#define ACPI_DUMP_RESOURCE_LIST(a) do { } while(0)
641#define ACPI_DUMP_BUFFER(a,b) do { } while(0) 621#define ACPI_DUMP_BUFFER(a, b) do { } while(0)
642#define ACPI_DEBUG_PRINT(pl) do { } while(0) 622#define ACPI_DEBUG_PRINT(pl) do { } while(0)
643#define ACPI_DEBUG_PRINT_RAW(pl) do { } while(0) 623#define ACPI_DEBUG_PRINT_RAW(pl) do { } while(0)
644 624
@@ -677,15 +657,17 @@ struct acpi_integer_overlay {
677/* 657/*
678 * Memory allocation tracking (DEBUG ONLY) 658 * Memory allocation tracking (DEBUG ONLY)
679 */ 659 */
660#define ACPI_MEM_PARAMETERS _COMPONENT, _acpi_module_name, __LINE__
661
680#ifndef ACPI_DBG_TRACK_ALLOCATIONS 662#ifndef ACPI_DBG_TRACK_ALLOCATIONS
681 663
682/* Memory allocation */ 664/* Memory allocation */
683 665
684#ifndef ACPI_ALLOCATE 666#ifndef ACPI_ALLOCATE
685#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) 667#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a), ACPI_MEM_PARAMETERS)
686#endif 668#endif
687#ifndef ACPI_ALLOCATE_ZEROED 669#ifndef ACPI_ALLOCATE_ZEROED
688#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) 670#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), ACPI_MEM_PARAMETERS)
689#endif 671#endif
690#ifndef ACPI_FREE 672#ifndef ACPI_FREE
691#define ACPI_FREE(a) acpio_os_free(a) 673#define ACPI_FREE(a) acpio_os_free(a)
@@ -696,11 +678,16 @@ struct acpi_integer_overlay {
696 678
697/* Memory allocation */ 679/* Memory allocation */
698 680
699#define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) 681#define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a), ACPI_MEM_PARAMETERS)
700#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) 682#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size)(a), ACPI_MEM_PARAMETERS)
701#define ACPI_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__) 683#define ACPI_FREE(a) acpi_ut_free_and_track(a, ACPI_MEM_PARAMETERS)
702#define ACPI_MEM_TRACKING(a) a 684#define ACPI_MEM_TRACKING(a) a
703 685
704#endif /* ACPI_DBG_TRACK_ALLOCATIONS */ 686#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
705 687
688/* Preemption point */
689#ifndef ACPI_PREEMPTION_POINT
690#define ACPI_PREEMPTION_POINT() /* no preemption */
691#endif
692
706#endif /* ACMACROS_H */ 693#endif /* ACMACROS_H */
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h
index c34008507b69..db4e6f677855 100644
--- a/include/acpi/acnamesp.h
+++ b/include/acpi/acnamesp.h
@@ -178,6 +178,22 @@ acpi_ns_dump_objects(acpi_object_type type,
178acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info); 178acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
179 179
180/* 180/*
181 * nspredef - Support for predefined/reserved names
182 */
183acpi_status
184acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
185 union acpi_operand_object *return_object);
186
187const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct
188 acpi_namespace_node
189 *node);
190
191void
192acpi_ns_check_parameter_count(char *pathname,
193 struct acpi_namespace_node *node,
194 const union acpi_predefined_info *info);
195
196/*
181 * nsnames - Name and Scope manipulation 197 * nsnames - Name and Scope manipulation
182 */ 198 */
183u32 acpi_ns_opens_scope(acpi_object_type type); 199u32 acpi_ns_opens_scope(acpi_object_type type);
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h
index e9657dac69b7..eb6f038b03d9 100644
--- a/include/acpi/acobject.h
+++ b/include/acpi/acobject.h
@@ -308,18 +308,34 @@ struct acpi_object_addr_handler {
308 *****************************************************************************/ 308 *****************************************************************************/
309 309
310/* 310/*
311 * The Reference object type is used for these opcodes: 311 * The Reference object is used for these opcodes:
312 * Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op 312 * Arg[0-6], Local[0-7], index_op, name_op, ref_of_op, load_op, load_table_op, debug_op
313 * The Reference.Class differentiates these types.
313 */ 314 */
314struct acpi_object_reference { 315struct acpi_object_reference {
315 ACPI_OBJECT_COMMON_HEADER u8 target_type; /* Used for index_op */ 316 ACPI_OBJECT_COMMON_HEADER u8 class; /* Reference Class */
316 u16 opcode; 317 u8 target_type; /* Used for Index Op */
318 u8 reserved;
317 void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ 319 void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
318 struct acpi_namespace_node *node; 320 struct acpi_namespace_node *node; /* ref_of or Namepath */
319 union acpi_operand_object **where; 321 union acpi_operand_object **where; /* Target of Index */
320 u32 offset; /* Used for arg_op, local_op, and index_op */ 322 u32 value; /* Used for Local/Arg/Index/ddb_handle */
321}; 323};
322 324
325/* Values for Reference.Class above */
326
327typedef enum {
328 ACPI_REFCLASS_LOCAL = 0, /* Method local */
329 ACPI_REFCLASS_ARG = 1, /* Method argument */
330 ACPI_REFCLASS_REFOF = 2, /* Result of ref_of() TBD: Split to Ref/Node and Ref/operand_obj? */
331 ACPI_REFCLASS_INDEX = 3, /* Result of Index() */
332 ACPI_REFCLASS_TABLE = 4, /* ddb_handle - Load(), load_table() */
333 ACPI_REFCLASS_NAME = 5, /* Reference to a named object */
334 ACPI_REFCLASS_DEBUG = 6, /* Debug object */
335
336 ACPI_REFCLASS_MAX = 6
337} ACPI_REFERENCE_CLASSES;
338
323/* 339/*
324 * Extra object is used as additional storage for types that 340 * Extra object is used as additional storage for types that
325 * have AML code in their declarations (term_args) that must be 341 * have AML code in their declarations (term_args) that must be
@@ -379,6 +395,13 @@ union acpi_operand_object {
379 struct acpi_object_extra extra; 395 struct acpi_object_extra extra;
380 struct acpi_object_data data; 396 struct acpi_object_data data;
381 struct acpi_object_cache_list cache; 397 struct acpi_object_cache_list cache;
398
399 /*
400 * Add namespace node to union in order to simplify code that accepts both
401 * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share
402 * a common descriptor_type field in order to differentiate them.
403 */
404 struct acpi_namespace_node node;
382}; 405};
383 406
384/****************************************************************************** 407/******************************************************************************
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h
index e17873defcec..09d33c7740f0 100644
--- a/include/acpi/acoutput.h
+++ b/include/acpi/acoutput.h
@@ -80,12 +80,10 @@
80/* 80/*
81 * Raw debug output levels, do not use these in the DEBUG_PRINT macros 81 * Raw debug output levels, do not use these in the DEBUG_PRINT macros
82 */ 82 */
83#define ACPI_LV_ERROR 0x00000001 83#define ACPI_LV_INIT 0x00000001
84#define ACPI_LV_WARN 0x00000002 84#define ACPI_LV_DEBUG_OBJECT 0x00000002
85#define ACPI_LV_INIT 0x00000004 85#define ACPI_LV_INFO 0x00000004
86#define ACPI_LV_DEBUG_OBJECT 0x00000008 86#define ACPI_LV_ALL_EXCEPTIONS 0x00000007
87#define ACPI_LV_INFO 0x00000010
88#define ACPI_LV_ALL_EXCEPTIONS 0x0000001F
89 87
90/* Trace verbosity level 1 [Standard Trace Level] */ 88/* Trace verbosity level 1 [Standard Trace Level] */
91 89
@@ -127,7 +125,6 @@
127#define ACPI_LV_VERBOSE_INFO 0x20000000 125#define ACPI_LV_VERBOSE_INFO 0x20000000
128#define ACPI_LV_FULL_TABLES 0x40000000 126#define ACPI_LV_FULL_TABLES 0x40000000
129#define ACPI_LV_EVENTS 0x80000000 127#define ACPI_LV_EVENTS 0x80000000
130
131#define ACPI_LV_VERBOSE 0xF0000000 128#define ACPI_LV_VERBOSE 0xF0000000
132 129
133/* 130/*
@@ -135,21 +132,17 @@
135 */ 132 */
136#define ACPI_DEBUG_LEVEL(dl) (u32) dl,ACPI_DEBUG_PARAMETERS 133#define ACPI_DEBUG_LEVEL(dl) (u32) dl,ACPI_DEBUG_PARAMETERS
137 134
138/* Exception level -- used in the global "DebugLevel" */ 135/*
139 136 * Exception level -- used in the global "DebugLevel"
137 *
138 * Note: For errors, use the ACPI_ERROR or ACPI_EXCEPTION interfaces.
139 * For warnings, use ACPI_WARNING.
140 */
140#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) 141#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
141#define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) 142#define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT)
142#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO) 143#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
143#define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS) 144#define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS)
144 145
145/*
146 * These two levels are essentially obsolete, all instances in the
147 * ACPICA core code have been replaced by ACPI_ERROR and ACPI_WARNING
148 * (Kept here because some drivers may still use them)
149 */
150#define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR)
151#define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN)
152
153/* Trace level -- also used in the global "DebugLevel" */ 146/* Trace level -- also used in the global "DebugLevel" */
154 147
155#define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES) 148#define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES)
@@ -173,13 +166,14 @@
173#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS) 166#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
174#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE) 167#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
175#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX) 168#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
169#define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS)
176 170
177#define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL) 171#define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL)
178 172
179/* Defaults for debug_level, debug and normal */ 173/* Defaults for debug_level, debug and normal */
180 174
181#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR) 175#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT)
182#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR) 176#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT)
183#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL) 177#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
184 178
185#endif /* __ACOUTPUT_H__ */ 179#endif /* __ACOUTPUT_H__ */
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index a5ac0bc7f52e..54a279e44c9a 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -46,7 +46,7 @@ acpi_extract_package(union acpi_object *package,
46acpi_status 46acpi_status
47acpi_evaluate_integer(acpi_handle handle, 47acpi_evaluate_integer(acpi_handle handle,
48 acpi_string pathname, 48 acpi_string pathname,
49 struct acpi_object_list *arguments, unsigned long *data); 49 struct acpi_object_list *arguments, unsigned long long *data);
50acpi_status 50acpi_status
51acpi_evaluate_reference(acpi_handle handle, 51acpi_evaluate_reference(acpi_handle handle,
52 acpi_string pathname, 52 acpi_string pathname,
@@ -300,7 +300,11 @@ struct acpi_device {
300 enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ 300 enum acpi_bus_removal_type removal_type; /* indicate for different removal type */
301}; 301};
302 302
303#define acpi_driver_data(d) ((d)->driver_data) 303static inline void *acpi_driver_data(struct acpi_device *d)
304{
305 return d->driver_data;
306}
307
304#define to_acpi_device(d) container_of(d, struct acpi_device, dev) 308#define to_acpi_device(d) container_of(d, struct acpi_device, dev)
305#define to_acpi_driver(d) container_of(d, struct acpi_driver, drv) 309#define to_acpi_driver(d) container_of(d, struct acpi_driver, drv)
306 310
@@ -327,6 +331,9 @@ int acpi_bus_get_private_data(acpi_handle, void **);
327extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32); 331extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32);
328extern int register_acpi_notifier(struct notifier_block *); 332extern int register_acpi_notifier(struct notifier_block *);
329extern int unregister_acpi_notifier(struct notifier_block *); 333extern int unregister_acpi_notifier(struct notifier_block *);
334
335extern int register_acpi_bus_notifier(struct notifier_block *nb);
336extern void unregister_acpi_bus_notifier(struct notifier_block *nb);
330/* 337/*
331 * External Functions 338 * External Functions
332 */ 339 */
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index e5f38e5ce86f..cf04c6011c2a 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -93,6 +93,7 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state);
93int acpi_disable_wakeup_device_power(struct acpi_device *dev); 93int acpi_disable_wakeup_device_power(struct acpi_device *dev);
94int acpi_power_get_inferred_state(struct acpi_device *device); 94int acpi_power_get_inferred_state(struct acpi_device *device);
95int acpi_power_transition(struct acpi_device *device, int state); 95int acpi_power_transition(struct acpi_device *device, int state);
96extern int acpi_power_nocheck;
96#endif 97#endif
97 98
98/* -------------------------------------------------------------------------- 99/* --------------------------------------------------------------------------
@@ -100,6 +101,7 @@ int acpi_power_transition(struct acpi_device *device, int state);
100 -------------------------------------------------------------------------- */ 101 -------------------------------------------------------------------------- */
101#ifdef CONFIG_ACPI_EC 102#ifdef CONFIG_ACPI_EC
102int acpi_ec_ecdt_probe(void); 103int acpi_ec_ecdt_probe(void);
104int acpi_boot_ec_enable(void);
103#endif 105#endif
104 106
105/* -------------------------------------------------------------------------- 107/* --------------------------------------------------------------------------
@@ -115,12 +117,17 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
115/*-------------------------------------------------------------------------- 117/*--------------------------------------------------------------------------
116 Dock Station 118 Dock Station
117 -------------------------------------------------------------------------- */ 119 -------------------------------------------------------------------------- */
120struct acpi_dock_ops {
121 acpi_notify_handler handler;
122 acpi_notify_handler uevent;
123};
124
118#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE) 125#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
119extern int is_dock_device(acpi_handle handle); 126extern int is_dock_device(acpi_handle handle);
120extern int register_dock_notifier(struct notifier_block *nb); 127extern int register_dock_notifier(struct notifier_block *nb);
121extern void unregister_dock_notifier(struct notifier_block *nb); 128extern void unregister_dock_notifier(struct notifier_block *nb);
122extern int register_hotplug_dock_device(acpi_handle handle, 129extern int register_hotplug_dock_device(acpi_handle handle,
123 acpi_notify_handler handler, 130 struct acpi_dock_ops *ops,
124 void *context); 131 void *context);
125extern void unregister_hotplug_dock_device(acpi_handle handle); 132extern void unregister_hotplug_dock_device(acpi_handle handle);
126#else 133#else
@@ -136,7 +143,7 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
136{ 143{
137} 144}
138static inline int register_hotplug_dock_device(acpi_handle handle, 145static inline int register_hotplug_dock_device(acpi_handle handle,
139 acpi_notify_handler handler, 146 struct acpi_dock_ops *ops,
140 void *context) 147 void *context)
141{ 148{
142 return -ENODEV; 149 return -ENODEV;
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 3f93a6b4e17f..b91440ac0d16 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -193,6 +193,9 @@ acpi_status
193acpi_os_execute(acpi_execute_type type, 193acpi_os_execute(acpi_execute_type type,
194 acpi_osd_exec_callback function, void *context); 194 acpi_osd_exec_callback function, void *context);
195 195
196acpi_status
197acpi_os_hotplug_execute(acpi_osd_exec_callback function, void *context);
198
196void acpi_os_wait_events_complete(void *context); 199void acpi_os_wait_events_complete(void *context);
197 200
198void acpi_os_sleep(acpi_integer milliseconds); 201void acpi_os_sleep(acpi_integer milliseconds);
diff --git a/include/acpi/acpredef.h b/include/acpi/acpredef.h
new file mode 100644
index 000000000000..619fb75f8861
--- /dev/null
+++ b/include/acpi/acpredef.h
@@ -0,0 +1,371 @@
1/******************************************************************************
2 *
3 * Name: acpredef - Information table for ACPI predefined methods and objects
4 * $Revision: 1.1 $
5 *
6 *****************************************************************************/
7
8/*
9 * Copyright (C) 2000 - 2008, Intel Corp.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
30 *
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
43 */
44
45#ifndef __ACPREDEF_H__
46#define __ACPREDEF_H__
47
48/******************************************************************************
49 *
50 * Return Package types
51 *
52 * 1) PTYPE1 packages do not contain sub-packages.
53 *
54 * ACPI_PTYPE1_FIXED: Fixed length, 1 or 2 object types:
55 * object type
56 * count
57 * object type
58 * count
59 *
60 * ACPI_PTYPE1_VAR: Variable length:
61 * object type (Int/Buf/Ref)
62 *
63 * ACPI_PTYPE1_OPTION: Package has some required and some optional elements:
64 * Used for _PRW
65 *
66 *
67 * 2) PTYPE2 packages contain a variable number of sub-packages. Each of the
68 * different types describe the contents of each of the sub-packages.
69 *
70 * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types:
71 * object type
72 * count
73 * object type
74 * count
75 *
76 * ACPI_PTYPE2_COUNT: Each subpackage has a count as first element:
77 * object type
78 *
79 * ACPI_PTYPE2_PKG_COUNT: Count of subpackages at start, 1 or 2 object types:
80 * object type
81 * count
82 * object type
83 * count
84 *
85 * ACPI_PTYPE2_FIXED: Each subpackage is of fixed length:
86 * Used for _PRT
87 *
88 * ACPI_PTYPE2_MIN: Each subpackage has a variable but minimum length
89 * Used for _HPX
90 *
91 *****************************************************************************/
92
93enum acpi_return_package_types {
94 ACPI_PTYPE1_FIXED = 1,
95 ACPI_PTYPE1_VAR = 2,
96 ACPI_PTYPE1_OPTION = 3,
97 ACPI_PTYPE2 = 4,
98 ACPI_PTYPE2_COUNT = 5,
99 ACPI_PTYPE2_PKG_COUNT = 6,
100 ACPI_PTYPE2_FIXED = 7,
101 ACPI_PTYPE2_MIN = 8
102};
103
104/*
105 * Predefined method/object information table.
106 *
107 * These are the names that can actually be evaluated via acpi_evaluate_object.
108 * Not present in this table are the following:
109 *
110 * 1) Predefined/Reserved names that are never evaluated via acpi_evaluate_object:
111 * _Lxx and _Exx GPE methods
112 * _Qxx EC methods
113 * _T_x compiler temporary variables
114 *
115 * 2) Predefined names that never actually exist within the AML code:
116 * Predefined resource descriptor field names
117 *
118 * 3) Predefined names that are implemented within ACPICA:
119 * _OSI
120 *
121 * 4) Some predefined names that are not documented within the ACPI spec.
122 * _WDG, _WED
123 *
124 * The main entries in the table each contain the following items:
125 *
126 * Name - The ACPI reserved name
127 * param_count - Number of arguments to the method
128 * expected_btypes - Allowed type(s) for the return value.
129 * 0 means that no return value is expected.
130 *
131 * For methods that return packages, the next entry in the table contains
132 * information about the expected structure of the package. This information
133 * is saved here (rather than in a separate table) in order to minimize the
134 * overall size of the stored data.
135 */
136static const union acpi_predefined_info predefined_names[] = {
137 {.info = {"_AC0", 0, ACPI_RTYPE_INTEGER}},
138 {.info = {"_AC1", 0, ACPI_RTYPE_INTEGER}},
139 {.info = {"_AC2", 0, ACPI_RTYPE_INTEGER}},
140 {.info = {"_AC3", 0, ACPI_RTYPE_INTEGER}},
141 {.info = {"_AC4", 0, ACPI_RTYPE_INTEGER}},
142 {.info = {"_AC5", 0, ACPI_RTYPE_INTEGER}},
143 {.info = {"_AC6", 0, ACPI_RTYPE_INTEGER}},
144 {.info = {"_AC7", 0, ACPI_RTYPE_INTEGER}},
145 {.info = {"_AC8", 0, ACPI_RTYPE_INTEGER}},
146 {.info = {"_AC9", 0, ACPI_RTYPE_INTEGER}},
147 {.info = {"_ADR", 0, ACPI_RTYPE_INTEGER}},
148 {.info = {"_AL0", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
149 {.info = {"_AL1", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
150 {.info = {"_AL2", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
151 {.info = {"_AL3", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
152 {.info = {"_AL4", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
153 {.info = {"_AL5", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
154 {.info = {"_AL6", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
155 {.info = {"_AL7", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
156 {.info = {"_AL8", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
157 {.info = {"_AL9", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
158 {.info = {"_ALC", 0, ACPI_RTYPE_INTEGER}},
159 {.info = {"_ALI", 0, ACPI_RTYPE_INTEGER}},
160 {.info = {"_ALP", 0, ACPI_RTYPE_INTEGER}},
161 {.info = {"_ALR", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 2, 0, 0, 0}}, /* variable (Pkgs) each 2 (Ints) */
162 {.info = {"_ALT", 0, ACPI_RTYPE_INTEGER}},
163 {.info = {"_BBN", 0, ACPI_RTYPE_INTEGER}},
164 {.info = {"_BCL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Ints) */
165 {.info = {"_BCM", 1, 0}},
166 {.info = {"_BDN", 0, ACPI_RTYPE_INTEGER}},
167 {.info = {"_BFS", 1, 0}},
168 {.info = {"_BIF", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER,
169 9,
170 ACPI_RTYPE_STRING, 4, 0}}, /* fixed (9 Int),(4 Str) */
171 {.info = {"_BLT", 3, 0}},
172 {.info = {"_BMC", 1, 0}},
173 {.info = {"_BMD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* fixed (5 Int) */
174 {.info = {"_BQC", 0, ACPI_RTYPE_INTEGER}},
175 {.info = {"_BST", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0}}, /* fixed (4 Int) */
176 {.info = {"_BTM", 1, ACPI_RTYPE_INTEGER}},
177 {.info = {"_BTP", 1, 0}},
178 {.info = {"_CBA", 0, ACPI_RTYPE_INTEGER}}, /* see PCI firmware spec 3.0 */
179 {.info = {"_CID", 0,
180 ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_PACKAGE}},
181 {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING, 0, 0, 0, 0}}, /* variable (Ints/Strs) */
182 {.info = {"_CRS", 0, ACPI_RTYPE_BUFFER}},
183 {.info = {"_CRT", 0, ACPI_RTYPE_INTEGER}},
184 {.info = {"_CSD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (1 Int(n), n-1 Int) */
185 {.info = {"_CST", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_PKG_COUNT,
186 ACPI_RTYPE_BUFFER, 1,
187 ACPI_RTYPE_INTEGER, 3, 0}}, /* variable (1 Int(n), n Pkg (1 Buf/3 Int) */
188 {.info = {"_DCK", 1, ACPI_RTYPE_INTEGER}},
189 {.info = {"_DCS", 0, ACPI_RTYPE_INTEGER}},
190 {.info = {"_DDC", 1, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER}},
191 {.info = {"_DDN", 0, ACPI_RTYPE_STRING}},
192 {.info = {"_DGS", 0, ACPI_RTYPE_INTEGER}},
193 {.info = {"_DIS", 0, 0}},
194 {.info = {"_DMA", 0, ACPI_RTYPE_BUFFER}},
195 {.info = {"_DOD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Ints) */
196 {.info = {"_DOS", 1, 0}},
197 {.info = {"_DSM", 4, ACPI_RTYPE_ALL}}, /* Must return a type, but it can be of any type */
198 {.info = {"_DSS", 1, 0}},
199 {.info = {"_DSW", 3, 0}},
200 {.info = {"_EC_", 0, ACPI_RTYPE_INTEGER}},
201 {.info = {"_EDL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
202 {.info = {"_EJ0", 1, 0}},
203 {.info = {"_EJ1", 1, 0}},
204 {.info = {"_EJ2", 1, 0}},
205 {.info = {"_EJ3", 1, 0}},
206 {.info = {"_EJ4", 1, 0}},
207 {.info = {"_EJD", 0, ACPI_RTYPE_STRING}},
208 {.info = {"_FDE", 0, ACPI_RTYPE_BUFFER}},
209 {.info = {"_FDI", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16, 0, 0, 0}}, /* fixed (16 Int) */
210 {.info = {"_FDM", 1, 0}},
211 {.info = {"_FIX", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Ints) */
212 {.info = {"_GLK", 0, ACPI_RTYPE_INTEGER}},
213 {.info = {"_GPD", 0, ACPI_RTYPE_INTEGER}},
214 {.info = {"_GPE", 0, ACPI_RTYPE_INTEGER}}, /* _GPE method, not _GPE scope */
215 {.info = {"_GSB", 0, ACPI_RTYPE_INTEGER}},
216 {.info = {"_GTF", 0, ACPI_RTYPE_BUFFER}},
217 {.info = {"_GTM", 0, ACPI_RTYPE_BUFFER}},
218 {.info = {"_GTS", 1, 0}},
219 {.info = {"_HID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING}},
220 {.info = {"_HOT", 0, ACPI_RTYPE_INTEGER}},
221 {.info = {"_HPP", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0}}, /* fixed (4 Int) */
222
223 /*
224 * For _HPX, a single package is returned, containing a variable number of sub-packages.
225 * Each sub-package contains a PCI record setting. There are several different type of
226 * record settings, of different lengths, but all elements of all settings are Integers.
227 */
228 {.info = {"_HPX", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_MIN, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* variable (Pkgs) each (var Ints) */
229 {.info = {"_IFT", 0, ACPI_RTYPE_INTEGER}}, /* see IPMI spec */
230 {.info = {"_INI", 0, 0}},
231 {.info = {"_IRC", 0, 0}},
232 {.info = {"_LCK", 1, 0}},
233 {.info = {"_LID", 0, ACPI_RTYPE_INTEGER}},
234 {.info = {"_MAT", 0, ACPI_RTYPE_BUFFER}},
235 {.info = {"_MLS", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_STRING, 2, 0, 0, 0}}, /* variable (Pkgs) each (2 Str) */
236 {.info = {"_MSG", 1, 0}},
237 {.info = {"_OFF", 0, 0}},
238 {.info = {"_ON_", 0, 0}},
239 {.info = {"_OS_", 0, ACPI_RTYPE_STRING}},
240 {.info = {"_OSC", 4, ACPI_RTYPE_BUFFER}},
241 {.info = {"_OST", 3, 0}},
242 {.info = {"_PCL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
243 {.info = {"_PCT", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER, 2, 0, 0, 0}}, /* fixed (2 Buf) */
244 {.info = {"_PDC", 1, 0}},
245 {.info = {"_PIC", 1, 0}},
246 {.info = {"_PLD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_BUFFER, 0, 0, 0, 0}}, /* variable (Bufs) */
247 {.info = {"_PPC", 0, ACPI_RTYPE_INTEGER}},
248 {.info = {"_PPE", 0, ACPI_RTYPE_INTEGER}}, /* see dig64 spec */
249 {.info = {"_PR0", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
250 {.info = {"_PR1", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
251 {.info = {"_PR2", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
252 {.info = {"_PRS", 0, ACPI_RTYPE_BUFFER}},
253
254 /*
255 * For _PRT, many BIOSs reverse the 2nd and 3rd Package elements. This bug is so prevalent that there
256 * is code in the ACPICA Resource Manager to detect this and switch them back. For now, do not allow
257 * and issue a warning. To allow this and eliminate the warning, add the ACPI_RTYPE_REFERENCE
258 * type to the 2nd element (index 1) in the statement below.
259 */
260 {.info = {"_PRT", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_FIXED, 4,
261 ACPI_RTYPE_INTEGER,
262 ACPI_RTYPE_INTEGER,
263 ACPI_RTYPE_INTEGER | ACPI_RTYPE_REFERENCE, ACPI_RTYPE_INTEGER}}, /* variable (Pkgs) each (4): Int,Int,Int/Ref,Int */
264
265 {.info = {"_PRW", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_OPTION, 2,
266 ACPI_RTYPE_INTEGER |
267 ACPI_RTYPE_PACKAGE,
268 ACPI_RTYPE_INTEGER, ACPI_RTYPE_REFERENCE, 0}}, /* variable (Pkgs) each: Pkg/Int,Int,[variable Refs] (Pkg is Ref/Int) */
269
270 {.info = {"_PS0", 0, 0}},
271 {.info = {"_PS1", 0, 0}},
272 {.info = {"_PS2", 0, 0}},
273 {.info = {"_PS3", 0, 0}},
274 {.info = {"_PSC", 0, ACPI_RTYPE_INTEGER}},
275 {.info = {"_PSD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Pkgs) each (5 Int) with count */
276 {.info = {"_PSL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
277 {.info = {"_PSR", 0, ACPI_RTYPE_INTEGER}},
278 {.info = {"_PSS", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 6, 0, 0, 0}}, /* variable (Pkgs) each (6 Int) */
279 {.info = {"_PSV", 0, ACPI_RTYPE_INTEGER}},
280 {.info = {"_PSW", 1, 0}},
281 {.info = {"_PTC", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER, 2, 0, 0, 0}}, /* fixed (2 Buf) */
282 {.info = {"_PTS", 1, 0}},
283 {.info = {"_PXM", 0, ACPI_RTYPE_INTEGER}},
284 {.info = {"_REG", 2, 0}},
285 {.info = {"_REV", 0, ACPI_RTYPE_INTEGER}},
286 {.info = {"_RMV", 0, ACPI_RTYPE_INTEGER}},
287 {.info = {"_ROM", 2, ACPI_RTYPE_BUFFER}},
288 {.info = {"_RTV", 0, ACPI_RTYPE_INTEGER}},
289
290 /*
291 * For _S0_ through _S5_, the ACPI spec defines a return Package containing 1 Integer,
292 * but most DSDTs have it wrong - 2,3, or 4 integers. Allow this by making the objects "variable length",
293 * but all elements must be Integers.
294 */
295 {.info = {"_S0_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
296 {.info = {"_S1_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
297 {.info = {"_S2_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
298 {.info = {"_S3_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
299 {.info = {"_S4_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
300 {.info = {"_S5_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
301
302 {.info = {"_S1D", 0, ACPI_RTYPE_INTEGER}},
303 {.info = {"_S2D", 0, ACPI_RTYPE_INTEGER}},
304 {.info = {"_S3D", 0, ACPI_RTYPE_INTEGER}},
305 {.info = {"_S4D", 0, ACPI_RTYPE_INTEGER}},
306 {.info = {"_S0W", 0, ACPI_RTYPE_INTEGER}},
307 {.info = {"_S1W", 0, ACPI_RTYPE_INTEGER}},
308 {.info = {"_S2W", 0, ACPI_RTYPE_INTEGER}},
309 {.info = {"_S3W", 0, ACPI_RTYPE_INTEGER}},
310 {.info = {"_S4W", 0, ACPI_RTYPE_INTEGER}},
311 {.info = {"_SBS", 0, ACPI_RTYPE_INTEGER}},
312 {.info = {"_SCP", 0x13, 0}}, /* Acpi 1.0 allowed 1 arg. Acpi 3.0 expanded to 3 args. Allow both. */
313 /* Note: the 3-arg definition may be removed for ACPI 4.0 */
314 {.info = {"_SDD", 1, 0}},
315 {.info = {"_SEG", 0, ACPI_RTYPE_INTEGER}},
316 {.info = {"_SLI", 0, ACPI_RTYPE_BUFFER}},
317 {.info = {"_SPD", 1, ACPI_RTYPE_INTEGER}},
318 {.info = {"_SRS", 1, 0}},
319 {.info = {"_SRV", 0, ACPI_RTYPE_INTEGER}}, /* see IPMI spec */
320 {.info = {"_SST", 1, 0}},
321 {.info = {"_STA", 0, ACPI_RTYPE_INTEGER}},
322 {.info = {"_STM", 3, 0}},
323 {.info = {"_STR", 0, ACPI_RTYPE_BUFFER}},
324 {.info = {"_SUN", 0, ACPI_RTYPE_INTEGER}},
325 {.info = {"_SWS", 0, ACPI_RTYPE_INTEGER}},
326 {.info = {"_TC1", 0, ACPI_RTYPE_INTEGER}},
327 {.info = {"_TC2", 0, ACPI_RTYPE_INTEGER}},
328 {.info = {"_TMP", 0, ACPI_RTYPE_INTEGER}},
329 {.info = {"_TPC", 0, ACPI_RTYPE_INTEGER}},
330 {.info = {"_TPT", 1, 0}},
331 {.info = {"_TRT", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2,
332 ACPI_RTYPE_INTEGER, 6, 0}}, /* variable (Pkgs) each 2_ref/6_int */
333 {.info = {"_TSD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* variable (Pkgs) each 5_int with count */
334 {.info = {"_TSP", 0, ACPI_RTYPE_INTEGER}},
335 {.info = {"_TSS", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* variable (Pkgs) each 5_int */
336 {.info = {"_TST", 0, ACPI_RTYPE_INTEGER}},
337 {.info = {"_TTS", 1, 0}},
338 {.info = {"_TZD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
339 {.info = {"_TZM", 0, ACPI_RTYPE_REFERENCE}},
340 {.info = {"_TZP", 0, ACPI_RTYPE_INTEGER}},
341 {.info = {"_UID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING}},
342 {.info = {"_UPC", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0}}, /* fixed (4 Int) */
343 {.info = {"_UPD", 0, ACPI_RTYPE_INTEGER}},
344 {.info = {"_UPP", 0, ACPI_RTYPE_INTEGER}},
345 {.info = {"_VPO", 0, ACPI_RTYPE_INTEGER}},
346
347 /* Acpi 1.0 defined _WAK with no return value. Later, it was changed to return a package */
348
349 {.info = {"_WAK", 1, ACPI_RTYPE_NONE | ACPI_RTYPE_PACKAGE}},
350 {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, 0, 0, 0}}, /* fixed (2 Int), but is optional */
351 {.ret_info = {0, 0, 0, 0, 0, 0}} /* Table terminator */
352};
353
354#if 0
355 /* Not implemented */
356
357{
358"_WDG", 0, ACPI_RTYPE_BUFFER}, /* MS Extension */
359
360{
361"_WED", 1, ACPI_RTYPE_PACKAGE}, /* MS Extension */
362
363 /* This is an internally implemented control method, no need to check */
364{
365"_OSI", 1, ACPI_RTYPE_INTEGER},
366
367 /* TBD: */
368 _PRT - currently ignore reversed entries.attempt to fix here ?
369 think about code that attempts to fix package elements like _BIF, etc.
370#endif
371#endif
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index d38f9be2f6ee..63f5b4cf4de1 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -908,7 +908,9 @@ enum acpi_madt_type {
908 ACPI_MADT_TYPE_IO_SAPIC = 6, 908 ACPI_MADT_TYPE_IO_SAPIC = 6,
909 ACPI_MADT_TYPE_LOCAL_SAPIC = 7, 909 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
910 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, 910 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
911 ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */ 911 ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
912 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
913 ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */
912}; 914};
913 915
914/* 916/*
@@ -1009,6 +1011,26 @@ struct acpi_madt_interrupt_source {
1009 1011
1010#define ACPI_MADT_CPEI_OVERRIDE (1) 1012#define ACPI_MADT_CPEI_OVERRIDE (1)
1011 1013
1014/* 9: Processor Local X2_APIC (07/2008) */
1015
1016struct acpi_madt_local_x2apic {
1017 struct acpi_subtable_header header;
1018 u16 reserved; /* Reserved - must be zero */
1019 u32 local_apic_id; /* Processor X2_APIC ID */
1020 u32 lapic_flags;
1021 u32 uid; /* Extended X2_APIC processor ID */
1022};
1023
1024/* 10: Local X2APIC NMI (07/2008) */
1025
1026struct acpi_madt_local_x2apic_nmi {
1027 struct acpi_subtable_header header;
1028 u16 inti_flags;
1029 u32 uid; /* Processor X2_APIC ID */
1030 u8 lint; /* LINTn to which NMI is connected */
1031 u8 reserved[3];
1032};
1033
1012/* 1034/*
1013 * Common flags fields for MADT subtables 1035 * Common flags fields for MADT subtables
1014 */ 1036 */
@@ -1150,10 +1172,15 @@ struct acpi_table_srat {
1150enum acpi_srat_type { 1172enum acpi_srat_type {
1151 ACPI_SRAT_TYPE_CPU_AFFINITY = 0, 1173 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1152 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, 1174 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1153 ACPI_SRAT_TYPE_RESERVED = 2 1175 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
1176 ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
1154}; 1177};
1155 1178
1156/* SRAT sub-tables */ 1179/*
1180 * SRAT Sub-tables, correspond to Type in struct acpi_subtable_header
1181 */
1182
1183/* 0: Processor Local APIC/SAPIC Affinity */
1157 1184
1158struct acpi_srat_cpu_affinity { 1185struct acpi_srat_cpu_affinity {
1159 struct acpi_subtable_header header; 1186 struct acpi_subtable_header header;
@@ -1165,9 +1192,7 @@ struct acpi_srat_cpu_affinity {
1165 u32 reserved; /* Reserved, must be zero */ 1192 u32 reserved; /* Reserved, must be zero */
1166}; 1193};
1167 1194
1168/* Flags */ 1195/* 1: Memory Affinity */
1169
1170#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1171 1196
1172struct acpi_srat_mem_affinity { 1197struct acpi_srat_mem_affinity {
1173 struct acpi_subtable_header header; 1198 struct acpi_subtable_header header;
@@ -1186,6 +1211,20 @@ struct acpi_srat_mem_affinity {
1186#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ 1211#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1187#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ 1212#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
1188 1213
1214/* 2: Processor Local X2_APIC Affinity (07/2008) */
1215
1216struct acpi_srat_x2apic_cpu_affinity {
1217 struct acpi_subtable_header header;
1218 u16 reserved; /* Reserved, must be zero */
1219 u32 proximity_domain;
1220 u32 apic_id;
1221 u32 flags;
1222};
1223
1224/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
1225
1226#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1227
1189/******************************************************************************* 1228/*******************************************************************************
1190 * 1229 *
1191 * TCPA - Trusted Computing Platform Alliance table 1230 * TCPA - Trusted Computing Platform Alliance table
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 4ea4f40bf894..e8936ab59627 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -607,8 +607,15 @@ typedef u8 acpi_adr_space_type;
607 607
608/* 608/*
609 * bit_register IDs 609 * bit_register IDs
610 * These are bitfields defined within the full ACPI registers 610 *
611 * These values are intended to be used by the hardware interfaces
612 * and are mapped to individual bitfields defined within the ACPI
613 * registers. See the acpi_gbl_bit_register_info global table in utglobal.c
614 * for this mapping.
611 */ 615 */
616
617/* PM1 Status register */
618
612#define ACPI_BITREG_TIMER_STATUS 0x00 619#define ACPI_BITREG_TIMER_STATUS 0x00
613#define ACPI_BITREG_BUS_MASTER_STATUS 0x01 620#define ACPI_BITREG_BUS_MASTER_STATUS 0x01
614#define ACPI_BITREG_GLOBAL_LOCK_STATUS 0x02 621#define ACPI_BITREG_GLOBAL_LOCK_STATUS 0x02
@@ -618,24 +625,29 @@ typedef u8 acpi_adr_space_type;
618#define ACPI_BITREG_WAKE_STATUS 0x06 625#define ACPI_BITREG_WAKE_STATUS 0x06
619#define ACPI_BITREG_PCIEXP_WAKE_STATUS 0x07 626#define ACPI_BITREG_PCIEXP_WAKE_STATUS 0x07
620 627
628/* PM1 Enable register */
629
621#define ACPI_BITREG_TIMER_ENABLE 0x08 630#define ACPI_BITREG_TIMER_ENABLE 0x08
622#define ACPI_BITREG_GLOBAL_LOCK_ENABLE 0x09 631#define ACPI_BITREG_GLOBAL_LOCK_ENABLE 0x09
623#define ACPI_BITREG_POWER_BUTTON_ENABLE 0x0A 632#define ACPI_BITREG_POWER_BUTTON_ENABLE 0x0A
624#define ACPI_BITREG_SLEEP_BUTTON_ENABLE 0x0B 633#define ACPI_BITREG_SLEEP_BUTTON_ENABLE 0x0B
625#define ACPI_BITREG_RT_CLOCK_ENABLE 0x0C 634#define ACPI_BITREG_RT_CLOCK_ENABLE 0x0C
626#define ACPI_BITREG_WAKE_ENABLE 0x0D 635#define ACPI_BITREG_PCIEXP_WAKE_DISABLE 0x0D
627#define ACPI_BITREG_PCIEXP_WAKE_DISABLE 0x0E 636
637/* PM1 Control register */
638
639#define ACPI_BITREG_SCI_ENABLE 0x0E
640#define ACPI_BITREG_BUS_MASTER_RLD 0x0F
641#define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x10
642#define ACPI_BITREG_SLEEP_TYPE_A 0x11
643#define ACPI_BITREG_SLEEP_TYPE_B 0x12
644#define ACPI_BITREG_SLEEP_ENABLE 0x13
628 645
629#define ACPI_BITREG_SCI_ENABLE 0x0F 646/* PM2 Control register */
630#define ACPI_BITREG_BUS_MASTER_RLD 0x10
631#define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x11
632#define ACPI_BITREG_SLEEP_TYPE_A 0x12
633#define ACPI_BITREG_SLEEP_TYPE_B 0x13
634#define ACPI_BITREG_SLEEP_ENABLE 0x14
635 647
636#define ACPI_BITREG_ARB_DISABLE 0x15 648#define ACPI_BITREG_ARB_DISABLE 0x14
637 649
638#define ACPI_BITREG_MAX 0x15 650#define ACPI_BITREG_MAX 0x14
639#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1 651#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1
640 652
641/* 653/*
@@ -859,6 +871,7 @@ struct acpi_obj_info_header {
859struct acpi_device_info { 871struct acpi_device_info {
860 ACPI_COMMON_OBJ_INFO; 872 ACPI_COMMON_OBJ_INFO;
861 873
874 u32 param_count; /* If a method, required parameter count */
862 u32 valid; /* Indicates which fields below are valid */ 875 u32 valid; /* Indicates which fields below are valid */
863 u32 current_status; /* _STA value */ 876 u32 current_status; /* _STA value */
864 acpi_integer address; /* _ADR value if any */ 877 acpi_integer address; /* _ADR value if any */
@@ -1225,8 +1238,8 @@ struct acpi_resource {
1225 1238
1226#pragma pack() 1239#pragma pack()
1227 1240
1228#define ACPI_RS_SIZE_MIN 12
1229#define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */ 1241#define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */
1242#define ACPI_RS_SIZE_MIN (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
1230#define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type)) 1243#define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
1231 1244
1232#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) 1245#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length)
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h
index 69f8888771ff..d8307b2987e3 100644
--- a/include/acpi/acutils.h
+++ b/include/acpi/acutils.h
@@ -110,7 +110,7 @@ struct acpi_pkg_info {
110/* 110/*
111 * utglobal - Global data structures and procedures 111 * utglobal - Global data structures and procedures
112 */ 112 */
113void acpi_ut_init_globals(void); 113acpi_status acpi_ut_init_globals(void);
114 114
115#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 115#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
116 116
@@ -126,6 +126,8 @@ char *acpi_ut_get_node_name(void *object);
126 126
127char *acpi_ut_get_descriptor_name(void *object); 127char *acpi_ut_get_descriptor_name(void *object);
128 128
129const char *acpi_ut_get_reference_name(union acpi_operand_object *object);
130
129char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc); 131char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);
130 132
131char *acpi_ut_get_region_name(u8 space_id); 133char *acpi_ut_get_region_name(u8 space_id);
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 9af464598682..029c8c06c151 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -53,6 +53,7 @@
53#include <linux/kernel.h> 53#include <linux/kernel.h>
54#include <linux/module.h> 54#include <linux/module.h>
55#include <linux/ctype.h> 55#include <linux/ctype.h>
56#include <linux/sched.h>
56#include <asm/system.h> 57#include <asm/system.h>
57#include <asm/atomic.h> 58#include <asm/atomic.h>
58#include <asm/div64.h> 59#include <asm/div64.h>
@@ -137,4 +138,9 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
137#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a) 138#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a)
138#define ACPI_FREE(a) kfree(a) 139#define ACPI_FREE(a) kfree(a)
139 140
141/*
142 * We need to show where it is safe to preempt execution of ACPICA
143 */
144#define ACPI_PREEMPTION_POINT() cond_resched()
145
140#endif /* __ACLINUX_H__ */ 146#endif /* __ACLINUX_H__ */
diff --git a/include/asm-x86/idle.h b/include/asm-x86/idle.h
index baa3f783d27d..32227f0188dd 100644
--- a/include/asm-x86/idle.h
+++ b/include/asm-x86/idle.h
@@ -6,6 +6,7 @@
6 6
7struct notifier_block; 7struct notifier_block;
8void idle_notifier_register(struct notifier_block *n); 8void idle_notifier_register(struct notifier_block *n);
9void idle_notifier_unregister(struct notifier_block *n);
9 10
10void enter_idle(void); 11void enter_idle(void);
11void exit_idle(void); 12void exit_idle(void);
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 702f79dad16a..fd6a452b0ceb 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -94,18 +94,10 @@ int acpi_parse_mcfg (struct acpi_table_header *header);
94void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); 94void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
95 95
96/* the following four functions are architecture-dependent */ 96/* the following four functions are architecture-dependent */
97#ifdef CONFIG_HAVE_ARCH_PARSE_SRAT
98#define NR_NODE_MEMBLKS MAX_NUMNODES
99#define acpi_numa_slit_init(slit) do {} while (0)
100#define acpi_numa_processor_affinity_init(pa) do {} while (0)
101#define acpi_numa_memory_affinity_init(ma) do {} while (0)
102#define acpi_numa_arch_fixup() do {} while (0)
103#else
104void acpi_numa_slit_init (struct acpi_table_slit *slit); 97void acpi_numa_slit_init (struct acpi_table_slit *slit);
105void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); 98void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
106void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); 99void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma);
107void acpi_numa_arch_fixup(void); 100void acpi_numa_arch_fixup(void);
108#endif
109 101
110#ifdef CONFIG_ACPI_HOTPLUG_CPU 102#ifdef CONFIG_ACPI_HOTPLUG_CPU
111/* Arch dependent functions for cpu hotplug support */ 103/* Arch dependent functions for cpu hotplug support */
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 94d17ff64c5a..396a350b87a6 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -191,6 +191,30 @@ extern int kernel_text_address(unsigned long addr);
191struct pid; 191struct pid;
192extern struct pid *session_of_pgrp(struct pid *pgrp); 192extern struct pid *session_of_pgrp(struct pid *pgrp);
193 193
194/*
195 * FW_BUG
196 * Add this to a message where you are sure the firmware is buggy or behaves
197 * really stupid or out of spec. Be aware that the responsible BIOS developer
198 * should be able to fix this issue or at least get a concrete idea of the
199 * problem by reading your message without the need of looking at the kernel
200 * code.
201 *
202 * Use it for definite and high priority BIOS bugs.
203 *
204 * FW_WARN
205 * Use it for not that clear (e.g. could the kernel messed up things already?)
206 * and medium priority BIOS bugs.
207 *
208 * FW_INFO
209 * Use this one if you want to tell the user or vendor about something
210 * suspicious, but generally harmless related to the firmware.
211 *
212 * Use it for information or very low priority BIOS bugs.
213 */
214#define FW_BUG "[Firmware Bug]: "
215#define FW_WARN "[Firmware Warn]: "
216#define FW_INFO "[Firmware Info]: "
217
194#ifdef CONFIG_PRINTK 218#ifdef CONFIG_PRINTK
195asmlinkage int vprintk(const char *fmt, va_list args) 219asmlinkage int vprintk(const char *fmt, va_list args)
196 __attribute__ ((format (printf, 1, 0))); 220 __attribute__ ((format (printf, 1, 0)));
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 369f44286353..1800f1d6e40d 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2456,6 +2456,7 @@
2456#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a 2456#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a
2457#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e 2457#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e
2458#define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b 2458#define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b
2459#define PCI_DEVICE_ID_INTEL_FBD_CNB 0x360c
2459#define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14 2460#define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14
2460#define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16 2461#define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16
2461#define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18 2462#define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 53b70fd1d9a5..ca3c88773028 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -485,14 +485,4 @@ static inline void pnp_unregister_driver(struct pnp_driver *drv) { }
485 485
486#endif /* CONFIG_PNP */ 486#endif /* CONFIG_PNP */
487 487
488#define pnp_err(format, arg...) printk(KERN_ERR "pnp: " format "\n" , ## arg)
489#define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg)
490#define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg)
491
492#ifdef CONFIG_PNP_DEBUG
493#define pnp_dbg(format, arg...) printk(KERN_DEBUG "pnp: " format "\n" , ## arg)
494#else
495#define pnp_dbg(format, arg...) do {} while (0)
496#endif
497
498#endif /* _LINUX_PNP_H */ 488#endif /* _LINUX_PNP_H */