aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-18 07:49:29 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-18 07:49:29 -0500
commita090b22f3fafa9340f903834de87552b50c5f2ba (patch)
treed07b55c9d60d585f8ceed2c8f43e8a04309fc67e /include
parent0b3571274b8ff53c0e08bc667ecd3d8a43bd8714 (diff)
parentb43e1065cab4b5be90c016b2f076086b70cd1556 (diff)
Merge branch 'acpica' into acpi-lpss
The following commits depend on the 'acpica' material.
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acconfig.h25
-rw-r--r--include/acpi/acoutput.h157
-rw-r--r--include/acpi/acpiosxf.h11
-rw-r--r--include/acpi/acpixf.h66
-rw-r--r--include/acpi/acrestyp.h15
-rw-r--r--include/acpi/actbl.h7
-rw-r--r--include/acpi/actbl1.h6
-rw-r--r--include/acpi/actbl2.h23
-rw-r--r--include/acpi/actbl3.h32
-rw-r--r--include/acpi/actypes.h36
-rw-r--r--include/acpi/platform/acenv.h317
-rw-r--r--include/acpi/platform/acgcc.h4
-rw-r--r--include/acpi/platform/aclinux.h1
-rw-r--r--include/linux/acpi.h15
14 files changed, 473 insertions, 242 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 0943457e0fa5..101d5fef6b21 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -138,7 +138,7 @@
138 138
139/* Maximum sleep allowed via Sleep() operator */ 139/* Maximum sleep allowed via Sleep() operator */
140 140
141#define ACPI_MAX_SLEEP 2000 /* Two seconds */ 141#define ACPI_MAX_SLEEP 2000 /* 2000 millisec == two seconds */
142 142
143/* Address Range lists are per-space_id (Memory and I/O only) */ 143/* Address Range lists are per-space_id (Memory and I/O only) */
144 144
@@ -150,11 +150,6 @@
150 * 150 *
151 *****************************************************************************/ 151 *****************************************************************************/
152 152
153/* Number of distinct GPE register blocks and register width */
154
155#define ACPI_MAX_GPE_BLOCKS 2
156#define ACPI_GPE_REGISTER_WIDTH 8
157
158/* Method info (in WALK_STATE), containing local variables and argumetns */ 153/* Method info (in WALK_STATE), containing local variables and argumetns */
159 154
160#define ACPI_METHOD_NUM_LOCALS 8 155#define ACPI_METHOD_NUM_LOCALS 8
@@ -163,12 +158,6 @@
163#define ACPI_METHOD_NUM_ARGS 7 158#define ACPI_METHOD_NUM_ARGS 7
164#define ACPI_METHOD_MAX_ARG 6 159#define ACPI_METHOD_MAX_ARG 6
165 160
166/* Length of _HID, _UID, _CID, and UUID values */
167
168#define ACPI_DEVICE_ID_LENGTH 0x09
169#define ACPI_MAX_CID_LENGTH 48
170#define ACPI_UUID_LENGTH 16
171
172/* 161/*
173 * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG 162 * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
174 */ 163 */
@@ -186,17 +175,6 @@
186 */ 175 */
187#define ACPI_RESULTS_OBJ_NUM_MAX 255 176#define ACPI_RESULTS_OBJ_NUM_MAX 255
188 177
189/* Names within the namespace are 4 bytes long */
190
191#define ACPI_NAME_SIZE 4
192#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
193#define ACPI_PATH_SEPARATOR '.'
194
195/* Sizes for ACPI table headers */
196
197#define ACPI_OEM_ID_SIZE 6
198#define ACPI_OEM_TABLE_ID_SIZE 8
199
200/* Constants used in searching for the RSDP in low memory */ 178/* Constants used in searching for the RSDP in low memory */
201 179
202#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */ 180#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
@@ -213,6 +191,7 @@
213/* Maximum space_ids for Operation Regions */ 191/* Maximum space_ids for Operation Regions */
214 192
215#define ACPI_MAX_ADDRESS_SPACE 255 193#define ACPI_MAX_ADDRESS_SPACE 255
194#define ACPI_NUM_DEFAULT_SPACES 4
216 195
217/* Array sizes. Used for range checking also */ 196/* Array sizes. Used for range checking also */
218 197
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h
index 2457ac849655..b48cb3459778 100644
--- a/include/acpi/acoutput.h
+++ b/include/acpi/acoutput.h
@@ -72,6 +72,7 @@
72#define ACPI_EXAMPLE 0x00004000 72#define ACPI_EXAMPLE 0x00004000
73#define ACPI_DRIVER 0x00008000 73#define ACPI_DRIVER 0x00008000
74#define DT_COMPILER 0x00010000 74#define DT_COMPILER 0x00010000
75#define ASL_PREPROCESSOR 0x00020000
75 76
76#define ACPI_ALL_COMPONENTS 0x0001FFFF 77#define ACPI_ALL_COMPONENTS 0x0001FFFF
77#define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS) 78#define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS)
@@ -262,18 +263,140 @@
262 * Common parameters used for debug output functions: 263 * Common parameters used for debug output functions:
263 * line number, function name, module(file) name, component ID 264 * line number, function name, module(file) name, component ID
264 */ 265 */
265#define ACPI_DEBUG_PARAMETERS __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT 266#define ACPI_DEBUG_PARAMETERS \
267 __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
268
269/* Check if debug output is currently dynamically enabled */
270
271#define ACPI_IS_DEBUG_ENABLED(level, component) \
272 ((level & acpi_dbg_level) && (component & acpi_dbg_layer))
266 273
267/* 274/*
268 * Master debug print macros 275 * Master debug print macros
269 * Print message if and only if: 276 * Print message if and only if:
270 * 1) Debug print for the current component is enabled 277 * 1) Debug print for the current component is enabled
271 * 2) Debug error level or trace level for the print statement is enabled 278 * 2) Debug error level or trace level for the print statement is enabled
279 *
280 * November 2012: Moved the runtime check for whether to actually emit the
281 * debug message outside of the print function itself. This improves overall
282 * performance at a relatively small code cost. Implementation involves the
283 * use of variadic macros supported by C99.
284 *
285 * Note: the ACPI_DO_WHILE0 macro is used to prevent some compilers from
286 * complaining about these constructs. On other compilers the do...while
287 * adds some extra code, so this feature is optional.
272 */ 288 */
273#define ACPI_DEBUG_PRINT(plist) acpi_debug_print plist 289#ifdef ACPI_USE_DO_WHILE_0
274#define ACPI_DEBUG_PRINT_RAW(plist) acpi_debug_print_raw plist 290#define ACPI_DO_WHILE0(a) do a while(0)
275
276#else 291#else
292#define ACPI_DO_WHILE0(a) a
293#endif
294
295/* DEBUG_PRINT functions */
296
297#define ACPI_DEBUG_PRINT(plist) ACPI_ACTUAL_DEBUG plist
298#define ACPI_DEBUG_PRINT_RAW(plist) ACPI_ACTUAL_DEBUG_RAW plist
299
300/* Helper macros for DEBUG_PRINT */
301
302#define ACPI_DO_DEBUG_PRINT(function, level, line, filename, modulename, component, ...) \
303 ACPI_DO_WHILE0 ({ \
304 if (ACPI_IS_DEBUG_ENABLED (level, component)) \
305 { \
306 function (level, line, filename, modulename, component, __VA_ARGS__); \
307 } \
308 })
309
310#define ACPI_ACTUAL_DEBUG(level, line, filename, modulename, component, ...) \
311 ACPI_DO_DEBUG_PRINT (acpi_debug_print, level, line, \
312 filename, modulename, component, __VA_ARGS__)
313
314#define ACPI_ACTUAL_DEBUG_RAW(level, line, filename, modulename, component, ...) \
315 ACPI_DO_DEBUG_PRINT (acpi_debug_print_raw, level, line, \
316 filename, modulename, component, __VA_ARGS__)
317
318/*
319 * Function entry tracing
320 *
321 * The name of the function is emitted as a local variable that is
322 * intended to be used by both the entry trace and the exit trace.
323 */
324
325/* Helper macro */
326
327#define ACPI_TRACE_ENTRY(name, function, cast, param) \
328 ACPI_FUNCTION_NAME (name) \
329 function (ACPI_DEBUG_PARAMETERS, cast (param))
330
331/* The actual entry trace macros */
332
333#define ACPI_FUNCTION_TRACE(name) \
334 ACPI_FUNCTION_NAME(name) \
335 acpi_ut_trace (ACPI_DEBUG_PARAMETERS)
336
337#define ACPI_FUNCTION_TRACE_PTR(name, pointer) \
338 ACPI_TRACE_ENTRY (name, acpi_ut_trace_ptr, (void *), pointer)
339
340#define ACPI_FUNCTION_TRACE_U32(name, value) \
341 ACPI_TRACE_ENTRY (name, acpi_ut_trace_u32, (u32), value)
342