aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/acpica/accommon.h63
-rw-r--r--drivers/acpi/acpica/acconfig.h217
-rw-r--r--drivers/acpi/acpica/acdebug.h231
-rw-r--r--drivers/acpi/acpica/acdispat.h345
-rw-r--r--drivers/acpi/acpica/acevents.h218
-rw-r--r--drivers/acpi/acpica/acglobal.h394
-rw-r--r--drivers/acpi/acpica/achware.h119
-rw-r--r--drivers/acpi/acpica/acinterp.h529
-rw-r--r--drivers/acpi/acpica/aclocal.h990
-rw-r--r--drivers/acpi/acpica/acmacros.h577
-rw-r--r--drivers/acpi/acpica/acnamesp.h324
-rw-r--r--drivers/acpi/acpica/acobject.h446
-rw-r--r--drivers/acpi/acpica/acopcode.h323
-rw-r--r--drivers/acpi/acpica/acparser.h234
-rw-r--r--drivers/acpi/acpica/acpredef.h371
-rw-r--r--drivers/acpi/acpica/acresrc.h336
-rw-r--r--drivers/acpi/acpica/acstruct.h228
-rw-r--r--drivers/acpi/acpica/actables.h117
-rw-r--r--drivers/acpi/acpica/acutils.h549
-rw-r--r--drivers/acpi/acpica/amlcode.h494
-rw-r--r--drivers/acpi/acpica/amlresrc.h311
-rw-r--r--drivers/acpi/acpica/dsfield.c12
-rw-r--r--drivers/acpi/acpica/dsinit.c8
-rw-r--r--drivers/acpi/acpica/dsmethod.c10
-rw-r--r--drivers/acpi/acpica/dsmthdat.c8
-rw-r--r--drivers/acpi/acpica/dsobject.c12
-rw-r--r--drivers/acpi/acpica/dsopcode.c16
-rw-r--r--drivers/acpi/acpica/dsutils.c14
-rw-r--r--drivers/acpi/acpica/dswexec.c14
-rw-r--r--drivers/acpi/acpica/dswload.c14
-rw-r--r--drivers/acpi/acpica/dswscope.c4
-rw-r--r--drivers/acpi/acpica/dswstate.c8
-rw-r--r--drivers/acpi/acpica/evevent.c4
-rw-r--r--drivers/acpi/acpica/evgpe.c6
-rw-r--r--drivers/acpi/acpica/evgpeblk.c6
-rw-r--r--drivers/acpi/acpica/evmisc.c8
-rw-r--r--drivers/acpi/acpica/evregion.c8
-rw-r--r--drivers/acpi/acpica/evrgnini.c6
-rw-r--r--drivers/acpi/acpica/evsci.c4
-rw-r--r--drivers/acpi/acpica/evxface.c8
-rw-r--r--drivers/acpi/acpica/evxfevnt.c8
-rw-r--r--drivers/acpi/acpica/evxfregn.c6
-rw-r--r--drivers/acpi/acpica/exconfig.c10
-rw-r--r--drivers/acpi/acpica/exconvrt.c6
-rw-r--r--drivers/acpi/acpica/excreate.c8
-rw-r--r--drivers/acpi/acpica/exdump.c8
-rw-r--r--drivers/acpi/acpica/exfield.c6
-rw-r--r--drivers/acpi/acpica/exfldio.c10
-rw-r--r--drivers/acpi/acpica/exmisc.c8
-rw-r--r--drivers/acpi/acpica/exmutex.c6
-rw-r--r--drivers/acpi/acpica/exnames.c6
-rw-r--r--drivers/acpi/acpica/exoparg1.c12
-rw-r--r--drivers/acpi/acpica/exoparg2.c10
-rw-r--r--drivers/acpi/acpica/exoparg3.c8
-rw-r--r--drivers/acpi/acpica/exoparg6.c8
-rw-r--r--drivers/acpi/acpica/exprep.c8
-rw-r--r--drivers/acpi/acpica/exregion.c4
-rw-r--r--drivers/acpi/acpica/exresnte.c8
-rw-r--r--drivers/acpi/acpica/exresolv.c10
-rw-r--r--drivers/acpi/acpica/exresop.c10
-rw-r--r--drivers/acpi/acpica/exstore.c10
-rw-r--r--drivers/acpi/acpica/exstoren.c6
-rw-r--r--drivers/acpi/acpica/exstorob.c4
-rw-r--r--drivers/acpi/acpica/exsystem.c4
-rw-r--r--drivers/acpi/acpica/exutils.c6
-rw-r--r--drivers/acpi/acpica/hwacpi.c2
-rw-r--r--drivers/acpi/acpica/hwgpe.c4
-rw-r--r--drivers/acpi/acpica/hwregs.c6
-rw-r--r--drivers/acpi/acpica/hwsleep.c4
-rw-r--r--drivers/acpi/acpica/hwtimer.c2
-rw-r--r--drivers/acpi/acpica/hwxface.c4
-rw-r--r--drivers/acpi/acpica/nsaccess.c8
-rw-r--r--drivers/acpi/acpica/nsalloc.c4
-rw-r--r--drivers/acpi/acpica/nsdump.c4
-rw-r--r--drivers/acpi/acpica/nsdumpdv.c4
-rw-r--r--drivers/acpi/acpica/nseval.c8
-rw-r--r--drivers/acpi/acpica/nsinit.c8
-rw-r--r--drivers/acpi/acpica/nsload.c8
-rw-r--r--drivers/acpi/acpica/nsnames.c6
-rw-r--r--drivers/acpi/acpica/nsobject.c4
-rw-r--r--drivers/acpi/acpica/nsparse.c10
-rw-r--r--drivers/acpi/acpica/nspredef.c6
-rw-r--r--drivers/acpi/acpica/nssearch.c4
-rw-r--r--drivers/acpi/acpica/nsutils.c8
-rw-r--r--drivers/acpi/acpica/nswalk.c4
-rw-r--r--drivers/acpi/acpica/nsxfeval.c6
-rw-r--r--drivers/acpi/acpica/nsxfname.c4
-rw-r--r--drivers/acpi/acpica/nsxfobj.c4
-rw-r--r--drivers/acpi/acpica/psargs.c10
-rw-r--r--drivers/acpi/acpica/psloop.c8
-rw-r--r--drivers/acpi/acpica/psopcode.c8
-rw-r--r--drivers/acpi/acpica/psparse.c12
-rw-r--r--drivers/acpi/acpica/psscope.c4
-rw-r--r--drivers/acpi/acpica/pstree.c6
-rw-r--r--drivers/acpi/acpica/psutils.c6
-rw-r--r--drivers/acpi/acpica/pswalk.c4
-rw-r--r--drivers/acpi/acpica/psxface.c10
-rw-r--r--drivers/acpi/acpica/rsaddr.c4
-rw-r--r--drivers/acpi/acpica/rscalc.c6
-rw-r--r--drivers/acpi/acpica/rscreate.c6
-rw-r--r--drivers/acpi/acpica/rsdump.c4
-rw-r--r--drivers/acpi/acpica/rsinfo.c4
-rw-r--r--drivers/acpi/acpica/rsio.c4
-rw-r--r--drivers/acpi/acpica/rsirq.c4
-rw-r--r--drivers/acpi/acpica/rslist.c4
-rw-r--r--drivers/acpi/acpica/rsmemory.c4
-rw-r--r--drivers/acpi/acpica/rsmisc.c4
-rw-r--r--drivers/acpi/acpica/rsutils.c6
-rw-r--r--drivers/acpi/acpica/rsxface.c6
-rw-r--r--drivers/acpi/acpica/tbfadt.c4
-rw-r--r--drivers/acpi/acpica/tbfind.c4
-rw-r--r--drivers/acpi/acpica/tbinstal.c6
-rw-r--r--drivers/acpi/acpica/tbutils.c4
-rw-r--r--drivers/acpi/acpica/tbxface.c6
-rw-r--r--drivers/acpi/acpica/tbxfroot.c4
-rw-r--r--drivers/acpi/acpica/utalloc.c4
-rw-r--r--drivers/acpi/acpica/utcopy.c4
-rw-r--r--drivers/acpi/acpica/utdebug.c2
-rw-r--r--drivers/acpi/acpica/utdelete.c8
-rw-r--r--drivers/acpi/acpica/uteval.c6
-rw-r--r--drivers/acpi/acpica/utglobal.c4
-rw-r--r--drivers/acpi/acpica/utinit.c8
-rw-r--r--drivers/acpi/acpica/utmath.c2
-rw-r--r--drivers/acpi/acpica/utmisc.c4
-rw-r--r--drivers/acpi/acpica/utmutex.c2
-rw-r--r--drivers/acpi/acpica/utobject.c4
-rw-r--r--drivers/acpi/acpica/utresrc.c4
-rw-r--r--drivers/acpi/acpica/utstate.c2
-rw-r--r--drivers/acpi/acpica/utxface.c10
129 files changed, 7765 insertions, 349 deletions
diff --git a/drivers/acpi/acpica/accommon.h b/drivers/acpi/acpica/accommon.h
new file mode 100644
index 000000000000..3b20786cbb0d
--- /dev/null
+++ b/drivers/acpi/acpica/accommon.h
@@ -0,0 +1,63 @@
1/******************************************************************************
2 *
3 * Name: accommon.h - Common include files for generation of ACPICA source
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACCOMMON_H__
45#define __ACCOMMON_H__
46
47/*
48 * Common set of includes for all ACPICA source files.
49 * We put them here because we don't want to duplicate them
50 * in the the source code again and again.
51 *
52 * Note: The order of these include files is important.
53 */
54#include "acconfig.h" /* Global configuration constants */
55#include "acmacros.h" /* C macros */
56#include "aclocal.h" /* Internal data types */
57#include "acobject.h" /* ACPI internal object */
58#include "acstruct.h" /* Common structures */
59#include "acglobal.h" /* All global variables */
60#include "achware.h" /* Hardware defines and interfaces */
61#include "acutils.h" /* Utility interfaces */
62
63#endif /* __ACCOMMON_H__ */
diff --git a/drivers/acpi/acpica/acconfig.h b/drivers/acpi/acpica/acconfig.h
new file mode 100644
index 000000000000..e6777fb883d2
--- /dev/null
+++ b/drivers/acpi/acpica/acconfig.h
@@ -0,0 +1,217 @@
1/******************************************************************************
2 *
3 * Name: acconfig.h - Global configuration constants
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef _ACCONFIG_H
45#define _ACCONFIG_H
46
47/******************************************************************************
48 *
49 * Configuration options
50 *
51 *****************************************************************************/
52
53/*
54 * ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the
55 * ACPI subsystem. This includes the DEBUG_PRINT output
56 * statements. When disabled, all DEBUG_PRINT
57 * statements are compiled out.
58 *
59 * ACPI_APPLICATION - Use this switch if the subsystem is going to be run
60 * at the application level.
61 *
62 */
63
64/*
65 * OS name, used for the _OS object. The _OS object is essentially obsolete,
66 * but there is a large base of ASL/AML code in existing machines that check
67 * for the string below. The use of this string usually guarantees that
68 * the ASL will execute down the most tested code path. Also, there is some
69 * code that will not execute the _OSI method unless _OS matches the string
70 * below. Therefore, change this string at your own risk.
71 */
72#define ACPI_OS_NAME "Microsoft Windows NT"
73
74/* Maximum objects in the various object caches */
75
76#define ACPI_MAX_STATE_CACHE_DEPTH 96 /* State objects */
77#define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */
78#define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */
79#define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */
80#define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */
81
82/*
83 * Should the subsystem abort the loading of an ACPI table if the
84 * table checksum is incorrect?
85 */
86#define ACPI_CHECKSUM_ABORT FALSE
87
88/******************************************************************************
89 *
90 * Subsystem Constants
91 *
92 *****************************************************************************/
93
94/* Version of ACPI supported */
95
96#define ACPI_CA_SUPPORT_LEVEL 3
97
98/* Maximum count for a semaphore object */
99
100#define ACPI_MAX_SEMAPHORE_COUNT 256
101
102/* Maximum object reference count (detects object deletion issues) */
103
104#define ACPI_MAX_REFERENCE_COUNT 0x1000
105
106/* Size of cached memory mapping for system memory operation region */
107
108#define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096
109
110/* owner_id tracking. 8 entries allows for 255 owner_ids */
111
112#define ACPI_NUM_OWNERID_MASKS 8
113
114/* Size of the root table array is increased by this increment */
115
116#define ACPI_ROOT_TABLE_SIZE_INCREMENT 4
117
118/* Maximum number of While() loop iterations before forced abort */
119
120#define ACPI_MAX_LOOP_ITERATIONS 0xFFFF
121
122/******************************************************************************
123 *
124 * ACPI Specification constants (Do not change unless the specification changes)
125 *
126 *****************************************************************************/
127
128/* Number of distinct GPE register blocks and register width */
129
130#define ACPI_MAX_GPE_BLOCKS 2
131#define ACPI_GPE_REGISTER_WIDTH 8
132
133/* Method info (in WALK_STATE), containing local variables and argumetns */
134
135#define ACPI_METHOD_NUM_LOCALS 8
136#define ACPI_METHOD_MAX_LOCAL 7
137
138#define ACPI_METHOD_NUM_ARGS 7
139#define ACPI_METHOD_MAX_ARG 6
140
141/* Length of _HID, _UID, _CID, and UUID values */
142
143#define ACPI_DEVICE_ID_LENGTH 0x09
144#define ACPI_MAX_CID_LENGTH 48
145#define ACPI_UUID_LENGTH 16
146
147/*
148 * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
149 */
150#define ACPI_OBJ_NUM_OPERANDS 8
151#define ACPI_OBJ_MAX_OPERAND 7
152
153/* Number of elements in the Result Stack frame, can be an arbitrary value */
154
155#define ACPI_RESULTS_FRAME_OBJ_NUM 8
156
157/*
158 * Maximal number of elements the Result Stack can contain,
159 * it may be an arbitray value not exceeding the types of
160 * result_size and result_count (now u8).
161 */
162#define ACPI_RESULTS_OBJ_NUM_MAX 255
163
164/* Names within the namespace are 4 bytes long */
165
166#define ACPI_NAME_SIZE 4
167#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
168#define ACPI_PATH_SEPARATOR '.'
169
170/* Sizes for ACPI table headers */
171
172#define ACPI_OEM_ID_SIZE 6
173#define ACPI_OEM_TABLE_ID_SIZE 8
174
175/* Constants used in searching for the RSDP in low memory */
176
177#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
178#define ACPI_EBDA_PTR_LENGTH 2
179#define ACPI_EBDA_WINDOW_SIZE 1024
180#define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */
181#define ACPI_HI_RSDP_WINDOW_SIZE 0x00020000
182#define ACPI_RSDP_SCAN_STEP 16
183
184/* Operation regions */
185
186#define ACPI_NUM_PREDEFINED_REGIONS 8
187#define ACPI_USER_REGION_BEGIN 0x80
188
189/* Maximum space_ids for Operation Regions */
190
191#define ACPI_MAX_ADDRESS_SPACE 255
192
193/* Array sizes. Used for range checking also */
194
195#define ACPI_MAX_MATCH_OPCODE 5
196
197/* RSDP checksums */
198
199#define ACPI_RSDP_CHECKSUM_LENGTH 20
200#define ACPI_RSDP_XCHECKSUM_LENGTH 36
201
202/* SMBus bidirectional buffer size */
203
204#define ACPI_SMBUS_BUFFER_SIZE 34
205
206/******************************************************************************
207 *
208 * ACPI AML Debugger
209 *
210 *****************************************************************************/
211
212#define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */
213
214#define ACPI_DEBUGGER_COMMAND_PROMPT '-'
215#define ACPI_DEBUGGER_EXECUTE_PROMPT '%'
216
217#endif /* _ACCONFIG_H */
diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h
new file mode 100644
index 000000000000..62c59df3b86c
--- /dev/null
+++ b/drivers/acpi/acpica/acdebug.h
@@ -0,0 +1,231 @@
1/******************************************************************************
2 *
3 * Name: acdebug.h - ACPI/AML debugger
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACDEBUG_H__
45#define __ACDEBUG_H__
46
47#define ACPI_DEBUG_BUFFER_SIZE 4196
48
49struct command_info {
50 char *name; /* Command Name */
51 u8 min_args; /* Minimum arguments required */
52};
53
54struct argument_info {
55 char *name; /* Argument Name */
56};
57
58#define PARAM_LIST(pl) pl
59#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose)
60#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
61 acpi_os_printf PARAM_LIST(fp);}
62
63#define EX_NO_SINGLE_STEP 1
64#define EX_SINGLE_STEP 2
65
66/*
67 * dbxface - external debugger interfaces
68 */
69acpi_status acpi_db_initialize(void);
70
71void acpi_db_terminate(void);
72
73acpi_status
74acpi_db_single_step(struct acpi_walk_state *walk_state,
75 union acpi_parse_object *op, u32 op_type);
76
77/*
78 * dbcmds - debug commands and output routines
79 */
80acpi_status acpi_db_disassemble_method(char *name);
81
82void acpi_db_display_table_info(char *table_arg);
83
84void acpi_db_unload_acpi_table(char *table_arg, char *instance_arg);
85
86void
87acpi_db_set_method_breakpoint(char *location,
88 struct acpi_walk_state *walk_state,
89 union acpi_parse_object *op);
90
91void acpi_db_set_method_call_breakpoint(union acpi_parse_object *op);
92
93void acpi_db_get_bus_info(void);
94
95void acpi_db_disassemble_aml(char *statements, union acpi_parse_object *op);
96
97void acpi_db_dump_namespace(char *start_arg, char *depth_arg);
98
99void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg);
100
101void acpi_db_send_notify(char *name, u32 value);
102
103void acpi_db_set_method_data(char *type_arg, char *index_arg, char *value_arg);
104
105acpi_status
106acpi_db_display_objects(char *obj_type_arg, char *display_count_arg);
107
108acpi_status acpi_db_find_name_in_namespace(char *name_arg);
109
110void acpi_db_set_scope(char *name);
111
112acpi_status acpi_db_sleep(char *object_arg);
113
114void acpi_db_find_references(char *object_arg);
115
116void acpi_db_display_locks(void);
117
118void acpi_db_display_resources(char *object_arg);
119
120void acpi_db_display_gpes(void);
121
122void acpi_db_check_integrity(void);
123
124void acpi_db_generate_gpe(char *gpe_arg, char *block_arg);
125
126void acpi_db_check_predefined_names(void);
127
128void acpi_db_batch_execute(void);
129
130/*
131 * dbdisply - debug display commands
132 */
133void acpi_db_display_method_info(union acpi_parse_object *op);
134
135void acpi_db_decode_and_display_object(char *target, char *output_type);
136
137void
138acpi_db_display_result_object(union acpi_operand_object *obj_desc,
139 struct acpi_walk_state *walk_state);
140
141acpi_status acpi_db_display_all_methods(char *display_count_arg);
142
143void acpi_db_display_arguments(void);
144
145void acpi_db_display_locals(void);
146
147void acpi_db_display_results(void);
148
149void acpi_db_display_calling_tree(void);
150
151void acpi_db_display_object_type(char *object_arg);
152
153void
154acpi_db_display_argument_object(union acpi_operand_object *obj_desc,
155 struct acpi_walk_state *walk_state);
156
157void acpi_db_check_predefined_names(void);
158
159void acpi_db_batch_execute(void);
160
161/*
162 * dbexec - debugger control method execution
163 */
164void acpi_db_execute(char *name, char **args, u32 flags);
165
166void
167acpi_db_create_execution_threads(char *num_threads_arg,
168 char *num_loops_arg, char *method_name_arg);
169
170#ifdef ACPI_DBG_TRACK_ALLOCATIONS
171u32 acpi_db_get_cache_info(struct acpi_memory_list *cache);
172#endif
173
174/*
175 * dbfileio - Debugger file I/O commands
176 */
177acpi_object_type
178acpi_db_match_argument(char *user_argument, struct argument_info *arguments);
179
180void acpi_db_close_debug_file(void);
181
182void acpi_db_open_debug_file(char *name);
183
184acpi_status acpi_db_load_acpi_table(char *filename);
185
186acpi_status
187acpi_db_get_table_from_file(char *filename, struct acpi_table_header **table);
188
189acpi_status
190acpi_db_read_table_from_file(char *filename, struct acpi_table_header **table);
191
192/*
193 * dbhistry - debugger HISTORY command
194 */
195void acpi_db_add_to_history(char *command_line);
196
197void acpi_db_display_history(void);
198
199char *acpi_db_get_from_history(char *command_num_arg);
200
201/*
202 * dbinput - user front-end to the AML debugger
203 */
204acpi_status
205acpi_db_command_dispatch(char *input_buffer,
206 struct acpi_walk_state *walk_state,
207 union acpi_parse_object *op);
208
209void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context);
210
211/*
212 * dbstats - Generation and display of ACPI table statistics
213 */
214void acpi_db_generate_statistics(union acpi_parse_object *root, u8 is_method);
215
216acpi_status acpi_db_display_statistics(char *type_arg);
217
218/*
219 * dbutils - AML debugger utilities
220 */
221void acpi_db_set_output_destination(u32 where);
222
223void acpi_db_dump_external_object(union acpi_object *obj_desc, u32 level);
224
225void acpi_db_prep_namestring(char *name);
226
227struct acpi_namespace_node *acpi_db_local_ns_lookup(char *name);
228
229void acpi_db_uint32_to_hex_string(u32 value, char *buffer);
230
231#endif /* __ACDEBUG_H__ */
diff --git a/drivers/acpi/acpica/acdispat.h b/drivers/acpi/acpica/acdispat.h
new file mode 100644
index 000000000000..6291904be01e
--- /dev/null
+++ b/drivers/acpi/acpica/acdispat.h
@@ -0,0 +1,345 @@
1/******************************************************************************
2 *
3 * Name: acdispat.h - dispatcher (parser to interpreter interface)
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef _ACDISPAT_H_
45#define _ACDISPAT_H_
46
47#define NAMEOF_LOCAL_NTE "__L0"
48#define NAMEOF_ARG_NTE "__A0"
49
50/*
51 * dsopcode - support for late evaluation
52 */
53acpi_status
54acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc);
55
56acpi_status
57acpi_ds_get_bank_field_arguments(union acpi_operand_object *obj_desc);
58
59acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *rgn_desc);
60
61acpi_status acpi_ds_get_buffer_arguments(union acpi_operand_object *obj_desc);
62
63acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc);
64
65acpi_status
66acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
67 union acpi_parse_object *op);
68
69acpi_status
70acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
71 union acpi_parse_object *op);
72
73acpi_status
74acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
75 union acpi_parse_object *op);
76
77acpi_status
78acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
79 union acpi_parse_object *op,
80 union acpi_operand_object *obj_desc);
81
82acpi_status
83acpi_ds_eval_bank_field_operands(struct acpi_walk_state *walk_state,
84 union acpi_parse_object *op);
85
86acpi_status acpi_ds_initialize_region(acpi_handle obj_handle);
87
88/*
89 * dsctrl - Parser/Interpreter interface, control stack routines
90 */
91acpi_status
92acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
93 union acpi_parse_object *op);
94
95acpi_status
96acpi_ds_exec_end_control_op(struct acpi_walk_state *walk_state,
97 union acpi_parse_object *op);
98
99/*
100 * dsexec - Parser/Interpreter interface, method execution callbacks
101 */
102acpi_status
103acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
104 union acpi_operand_object *result_obj);
105
106acpi_status
107acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
108 union acpi_parse_object **out_op);
109
110acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *state);
111
112/*
113 * dsfield - Parser/Interpreter interface for AML fields
114 */
115acpi_status
116acpi_ds_create_field(union acpi_parse_object *op,
117 struct acpi_namespace_node *region_node,
118 struct acpi_walk_state *walk_state);
119
120acpi_status
121acpi_ds_create_bank_field(union acpi_parse_object *op,
122 struct acpi_namespace_node *region_node,
123 struct acpi_walk_state *walk_state);
124
125acpi_status
126acpi_ds_create_index_field(union acpi_parse_object *op,
127 struct acpi_namespace_node *region_node,
128 struct acpi_walk_state *walk_state);
129
130acpi_status
131acpi_ds_create_buffer_field(union acpi_parse_object *op,
132 struct acpi_walk_state *walk_state);
133
134acpi_status
135acpi_ds_init_field_objects(union acpi_parse_object *op,
136 struct acpi_walk_state *walk_state);
137
138/*
139 * dsload - Parser/Interpreter interface, namespace load callbacks
140 */
141acpi_status
142acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
143 union acpi_parse_object **out_op);
144
145acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state);
146
147acpi_status
148acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
149 union acpi_parse_object **out_op);
150
151acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state);
152
153acpi_status
154acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);
155
156/*
157 * dsmthdat - method data (locals/args)
158 */
159acpi_status
160acpi_ds_store_object_to_local(u8 type,
161 u32 index,
162 union acpi_operand_object *src_desc,
163 struct acpi_walk_state *walk_state);
164
165acpi_status
166acpi_ds_method_data_get_entry(u16 opcode,
167 u32 index,
168 struct acpi_walk_state *walk_state,
169 union acpi_operand_object ***node);
170
171void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state);
172
173u8 acpi_ds_is_method_value(union acpi_operand_object *obj_desc);
174
175acpi_status
176acpi_ds_method_data_get_value(u8 type,
177 u32 index,
178 struct acpi_walk_state *walk_state,
179 union acpi_operand_object **dest_desc);
180
181acpi_status
182acpi_ds_method_data_init_args(union acpi_operand_object **params,
183 u32 max_param_count,
184 struct acpi_walk_state *walk_state);
185
186acpi_status
187acpi_ds_method_data_get_node(u8 type,
188 u32 index,
189 struct acpi_walk_state *walk_state,
190 struct acpi_namespace_node **node);
191
192void acpi_ds_method_data_init(struct acpi_walk_state *walk_state);
193
194/*
195 * dsmethod - Parser/Interpreter interface - control method parsing
196 */
197acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node);
198
199acpi_status
200acpi_ds_call_control_method(struct acpi_thread_state *thread,
201 struct acpi_walk_state *walk_state,
202 union acpi_parse_object *op);
203
204acpi_status
205acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
206 union acpi_operand_object *return_desc);
207
208void
209acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
210 struct acpi_walk_state *walk_state);
211
212acpi_status
213acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
214 union acpi_operand_object *obj_desc,
215 struct acpi_walk_state *walk_state);
216
217acpi_status
218acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state);
219
220/*
221 * dsinit
222 */
223acpi_status
224acpi_ds_initialize_objects(u32 table_index,
225 struct acpi_namespace_node *start_node);
226
227/*
228 * dsobject - Parser/Interpreter interface - object initialization and conversion
229 */
230acpi_status
231acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
232 union acpi_parse_object *op,
233 u32 buffer_length,
234 union acpi_operand_object **obj_desc_ptr);
235
236acpi_status
237acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
238 union acpi_parse_object *op,
239 u32 package_length,
240 union acpi_operand_object **obj_desc);
241
242acpi_status
243acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
244 union acpi_parse_object *op,
245 u16 opcode, union acpi_operand_object **obj_desc);
246
247acpi_status
248acpi_ds_create_node(struct acpi_walk_state *walk_state,
249 struct acpi_namespace_node *node,
250 union acpi_parse_object *op);
251
252/*
253 * dsutils - Parser/Interpreter interface utility routines
254 */
255void acpi_ds_clear_implicit_return(struct acpi_walk_state *walk_state);
256
257u8
258acpi_ds_do_implicit_return(union acpi_operand_object *return_desc,
259 struct acpi_walk_state *walk_state,
260 u8 add_reference);
261
262u8
263acpi_ds_is_result_used(union acpi_parse_object *op,
264 struct acpi_walk_state *walk_state);
265
266void
267acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
268 union acpi_operand_object *result_obj,
269 struct acpi_walk_state *walk_state);
270
271acpi_status
272acpi_ds_create_operand(struct acpi_walk_state *walk_state,
273 union acpi_parse_object *arg, u32 args_remaining);
274
275acpi_status
276acpi_ds_create_operands(struct acpi_walk_state *walk_state,
277 union acpi_parse_object *first_arg);
278
279acpi_status acpi_ds_resolve_operands(struct acpi_walk_state *walk_state);
280
281void acpi_ds_clear_operands(struct acpi_walk_state *walk_state);
282
283acpi_status acpi_ds_evaluate_name_path(struct acpi_walk_state *walk_state);
284
285/*
286 * dswscope - Scope Stack manipulation
287 */
288acpi_status
289acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
290 acpi_object_type type,
291 struct acpi_walk_state *walk_state);
292
293acpi_status acpi_ds_scope_stack_pop(struct acpi_walk_state *walk_state);
294
295void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state);
296
297/*
298 * dswstate - parser WALK_STATE management routines
299 */
300acpi_status
301acpi_ds_obj_stack_push(void *object, struct acpi_walk_state *walk_state);
302
303acpi_status
304acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state *walk_state);
305
306struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, union acpi_parse_object
307 *origin, union acpi_operand_object
308 *mth_desc, struct acpi_thread_state
309 *thread);
310
311acpi_status
312acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
313 union acpi_parse_object *op,
314 struct acpi_namespace_node *method_node,
315 u8 * aml_start,
316 u32 aml_length,
317 struct acpi_evaluate_info *info, u8 pass_number);
318
319void
320acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
321 struct acpi_walk_state *walk_state);
322
323void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state);
324
325struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state
326 *thread);
327
328void
329acpi_ds_push_walk_state(struct acpi_walk_state *walk_state,
330 struct acpi_thread_state *thread);
331
332acpi_status acpi_ds_result_stack_clear(struct acpi_walk_state *walk_state);
333
334struct acpi_walk_state *acpi_ds_get_current_walk_state(struct acpi_thread_state
335 *thread);
336
337acpi_status
338acpi_ds_result_pop(union acpi_operand_object **object,
339 struct acpi_walk_state *walk_state);
340
341acpi_status
342acpi_ds_result_push(union acpi_operand_object *object,
343 struct acpi_walk_state *walk_state);
344
345#endif /* _ACDISPAT_H_ */
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h
new file mode 100644
index 000000000000..07e20135f01b
--- /dev/null
+++ b/drivers/acpi/acpica/acevents.h
@@ -0,0 +1,218 @@
1/******************************************************************************
2 *
3 * Name: acevents.h - Event subcomponent prototypes and defines
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACEVENTS_H__
45#define __ACEVENTS_H__
46
47/*
48 * evevent
49 */
50acpi_status acpi_ev_initialize_events(void);
51
52acpi_status acpi_ev_install_xrupt_handlers(void);
53
54acpi_status acpi_ev_install_fadt_gpes(void);
55
56u32 acpi_ev_fixed_event_detect(void);
57
58/*
59 * evmisc
60 */
61u8 acpi_ev_is_notify_object(struct acpi_namespace_node *node);
62
63acpi_status acpi_ev_acquire_global_lock(u16 timeout);
64
65acpi_status acpi_ev_release_global_lock(void);
66
67acpi_status acpi_ev_init_global_lock_handler(void);
68
69u32 acpi_ev_get_gpe_number_index(u32 gpe_number);
70
71acpi_status
72acpi_ev_queue_notify_request(struct acpi_namespace_node *node,
73 u32 notify_value);
74
75/*
76 * evgpe - GPE handling and dispatch
77 */
78acpi_status
79acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info,
80 u8 type);
81
82acpi_status
83acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info,
84 u8 write_to_hardware);
85
86acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info);
87
88struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
89 u32 gpe_number);
90
91/*
92 * evgpeblk
93 */
94u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info);
95
96acpi_status
97acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback, void *context);
98
99acpi_status
100acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
101 struct acpi_gpe_block_info *gpe_block,
102 void *context);
103
104acpi_status
105acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
106 struct acpi_generic_address *gpe_block_address,
107 u32 register_count,
108 u8 gpe_block_base_number,
109 u32 interrupt_number,
110 struct acpi_gpe_block_info **return_gpe_block);
111
112acpi_status
113acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
114 struct acpi_gpe_block_info *gpe_block);
115
116acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block);
117
118u32
119acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info,
120 u32 gpe_number);
121
122u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list);
123
124acpi_status
125acpi_ev_set_gpe_type(struct acpi_gpe_event_info *gpe_event_info, u8 type);
126
127acpi_status
128acpi_ev_check_for_wake_only_gpe(struct acpi_gpe_event_info *gpe_event_info);
129
130acpi_status acpi_ev_gpe_initialize(void);
131
132/*
133 * evregion - Address Space handling
134 */
135acpi_status acpi_ev_install_region_handlers(void);
136
137acpi_status acpi_ev_initialize_op_regions(void);
138
139acpi_status
140acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
141 u32 function,
142 acpi_physical_address address,
143 u32 bit_width, acpi_integer * value);
144
145acpi_status
146acpi_ev_attach_region(union acpi_operand_object *handler_obj,
147 union acpi_operand_object *region_obj,
148 u8 acpi_ns_is_locked);
149
150void
151acpi_ev_detach_region(union acpi_operand_object *region_obj,
152 u8 acpi_ns_is_locked);
153
154acpi_status
155acpi_ev_install_space_handler(struct acpi_namespace_node *node,
156 acpi_adr_space_type space_id,
157 acpi_adr_space_handler handler,
158 acpi_adr_space_setup setup, void *context);
159
160acpi_status
161acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
162 acpi_adr_space_type space_id);
163
164acpi_status
165acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function);
166
167/*
168 * evregini - Region initialization and setup
169 */
170acpi_status
171acpi_ev_system_memory_region_setup(acpi_handle handle,
172 u32 function,
173 void *handler_context,
174 void **region_context);
175
176acpi_status
177acpi_ev_io_space_region_setup(acpi_handle handle,
178 u32 function,
179 void *handler_context, void **region_context);
180
181acpi_status
182acpi_ev_pci_config_region_setup(acpi_handle handle,
183 u32 function,
184 void *handler_context, void **region_context);
185
186acpi_status
187acpi_ev_cmos_region_setup(acpi_handle handle,
188 u32 function,
189 void *handler_context, void **region_context);
190
191acpi_status
192acpi_ev_pci_bar_region_setup(acpi_handle handle,
193 u32 function,
194 void *handler_context, void **region_context);
195
196acpi_status
197acpi_ev_default_region_setup(acpi_handle handle,
198 u32 function,
199 void *handler_context, void **region_context);
200
201acpi_status
202acpi_ev_initialize_region(union acpi_operand_object *region_obj,
203 u8 acpi_ns_locked);
204
205/*
206 * evsci - SCI (System Control Interrupt) handling/dispatch
207 */
208u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context);
209
210u32 acpi_ev_install_sci_handler(void);
211
212acpi_status acpi_ev_remove_sci_handler(void);
213
214u32 acpi_ev_initialize_sCI(u32 program_sCI);
215
216void acpi_ev_terminate(void);
217
218#endif /* __ACEVENTS_H__ */
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
new file mode 100644
index 000000000000..ddb40f5c68fc
--- /dev/null
+++ b/drivers/acpi/acpica/acglobal.h
@@ -0,0 +1,394 @@
1/******************************************************************************
2 *
3 * Name: acglobal.h - Declarations for global variables
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACGLOBAL_H__
45#define __ACGLOBAL_H__
46
47/*
48 * Ensure that the globals are actually defined and initialized only once.
49 *
50 * The use of these macros allows a single list of globals (here) in order
51 * to simplify maintenance of the code.
52 */
53#ifdef DEFINE_ACPI_GLOBALS
54#define ACPI_EXTERN
55#define ACPI_INIT_GLOBAL(a,b) a=b
56#else
57#define ACPI_EXTERN extern
58#define ACPI_INIT_GLOBAL(a,b) a
59#endif
60
61/*****************************************************************************
62 *
63 * Runtime configuration (static defaults that can be overriden at runtime)
64 *
65 ****************************************************************************/
66
67/*
68 * Enable "slack" in the AML interpreter? Default is FALSE, and the
69 * interpreter strictly follows the ACPI specification. Setting to TRUE
70 * allows the interpreter to ignore certain errors and/or bad AML constructs.
71 *
72 * Currently, these features are enabled by this flag:
73 *
74 * 1) Allow "implicit return" of last value in a control method
75 * 2) Allow access beyond the end of an operation region
76 * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
77 * 4) Allow ANY object type to be a source operand for the Store() operator
78 * 5) Allow unresolved references (invalid target name) in package objects
79 * 6) Enable warning messages for behavior that is not ACPI spec compliant
80 */
81ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
82
83/*
84 * Automatically serialize ALL control methods? Default is FALSE, meaning
85 * to use the Serialized/not_serialized method flags on a per method basis.
86 * Only change this if the ASL code is poorly written and cannot handle
87 * reentrancy even though methods are marked "NotSerialized".
88 */
89ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE);
90
91/*
92 * Create the predefined _OSI method in the namespace? Default is TRUE
93 * because ACPI CA is fully compatible with other ACPI implementations.
94 * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
95 */
96ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE);
97
98/*
99 * Disable wakeup GPEs during runtime? Default is TRUE because WAKE and
100 * RUNTIME GPEs should never be shared, and WAKE GPEs should typically only
101 * be enabled just before going to sleep.
102 */
103ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE);
104
105/*
106 * Optionally use default values for the ACPI register widths. Set this to
107 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
108 */
109ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
110
111/*****************************************************************************
112 *
113 * Debug support
114 *
115 ****************************************************************************/
116
117/* Runtime configuration of debug print levels */
118
119extern u32 acpi_dbg_level;
120extern u32 acpi_dbg_layer;
121
122/* Procedure nesting level for debug output */
123
124extern u32 acpi_gbl_nesting_level;
125
126/* Support for dynamic control method tracing mechanism */
127
128ACPI_EXTERN u32 acpi_gbl_original_dbg_level;
129ACPI_EXTERN u32 acpi_gbl_original_dbg_layer;
130ACPI_EXTERN acpi_name acpi_gbl_trace_method_name;
131ACPI_EXTERN u32 acpi_gbl_trace_dbg_level;
132ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;
133ACPI_EXTERN u32 acpi_gbl_trace_flags;
134
135/*****************************************************************************
136 *
137 * ACPI Table globals
138 *
139 ****************************************************************************/
140
141/*
142 * acpi_gbl_root_table_list is the master list of ACPI tables found in the
143 * RSDT/XSDT.
144 *
145 * acpi_gbl_FADT is a local copy of the FADT, converted to a common format.
146 */
147ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list;
148ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT;
149ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS;
150
151/* These addresses are calculated from FADT address values */
152
153ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable;
154ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;
155
156/*
157 * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
158 * determined by the revision of the DSDT: If the DSDT revision is less than
159 * 2, use only the lower 32 bits of the internal 64-bit Integer.
160 */
161ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
162ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
163ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;
164
165/*****************************************************************************
166 *
167 * Mutual exlusion within ACPICA subsystem
168 *
169 ****************************************************************************/
170
171/*
172 * Predefined mutex objects. This array contains the
173 * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
174 * (The table maps local handles to the real OS handles)
175 */
176ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX];
177
178/*
179 * Global lock mutex is an actual AML mutex object
180 * Global lock semaphore works in conjunction with the HW global lock
181 */
182ACPI_EXTERN union acpi_operand_object *acpi_gbl_global_lock_mutex;
183ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore;
184ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
185ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
186ACPI_EXTERN u8 acpi_gbl_global_lock_present;
187
188/*
189 * Spinlocks are used for interfaces that can be possibly called at
190 * interrupt level
191 */
192ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock; /* For GPE data structs and registers */
193ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */
194#define acpi_gbl_gpe_lock &_acpi_gbl_gpe_lock
195#define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock
196
197/*****************************************************************************
198 *
199 * Miscellaneous globals
200 *
201 ****************************************************************************/
202
203#ifdef ACPI_DBG_TRACK_ALLOCATIONS
204
205/* Lists for tracking memory allocations */
206
207ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;
208ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
209ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats;
210#endif
211
212/* Object caches */
213
214ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache;
215ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache;
216ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache;
217ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache;
218ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache;
219
220/* Global handlers */
221
222ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify;
223ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify;
224ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler;
225ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
226ACPI_EXTERN acpi_tbl_handler acpi_gbl_table_handler;
227ACPI_EXTERN void *acpi_gbl_table_handler_context;
228ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;
229
230/* Owner ID support */
231
232ACPI_EXTERN u32 acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS];
233ACPI_EXTERN u8 acpi_gbl_last_owner_id_index;
234ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset;
235
236/* Misc */
237
238ACPI_EXTERN u32 acpi_gbl_original_mode;
239ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
240ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
241ACPI_EXTERN u32 acpi_gbl_ps_find_count;
242ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
243ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
244ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
245ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
246ACPI_EXTERN u8 acpi_gbl_events_initialized;
247ACPI_EXTERN u8 acpi_gbl_system_awake_and_running;
248
249#ifndef DEFINE_ACPI_GLOBALS
250
251/* Other miscellaneous */
252
253extern u8 acpi_gbl_shutdown;
254extern u32 acpi_gbl_startup_flags;
255extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT];
256extern const char *acpi_gbl_highest_dstate_names[4];
257extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
258extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
259
260#endif
261
262/* Exception codes */
263
264extern char const *acpi_gbl_exception_names_env[];
265extern char const *acpi_gbl_exception_names_pgm[];
266extern char const *acpi_gbl_exception_names_tbl[];
267extern char const *acpi_gbl_exception_names_aml[];
268extern char const *acpi_gbl_exception_names_ctrl[];
269
270/*****************************************************************************
271 *
272 * Namespace globals
273 *
274 ****************************************************************************/
275
276#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
277#define NUM_PREDEFINED_NAMES 10
278#else
279#define NUM_PREDEFINED_NAMES 9
280#endif
281
282ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct;
283ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node;
284ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadt_gpe_device;
285
286extern const u8 acpi_gbl_ns_properties[ACPI_NUM_NS_TYPES];
287extern const struct acpi_predefined_names
288 acpi_gbl_pre_defined_names[NUM_PREDEFINED_NAMES];
289
290#ifdef ACPI_DEBUG_OUTPUT
291ACPI_EXTERN u32 acpi_gbl_current_node_count;
292ACPI_EXTERN u32 acpi_gbl_current_node_size;
293ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;
294ACPI_EXTERN acpi_size *acpi_gbl_entry_stack_pointer;
295ACPI_EXTERN acpi_size *acpi_gbl_lowest_stack_pointer;
296ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
297#endif
298
299/*****************************************************************************
300 *
301 * Interpreter globals
302 *
303 ****************************************************************************/
304
305ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list;
306
307/* Control method single step flag */
308
309ACPI_EXTERN u8 acpi_gbl_cm_single_step;
310
311/*****************************************************************************
312 *
313 * Hardware globals
314 *
315 ****************************************************************************/
316
317extern struct acpi_bit_register_info
318 acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
319ACPI_EXTERN u8 acpi_gbl_sleep_type_a;
320ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
321
322/*****************************************************************************
323 *
324 * Event and GPE globals
325 *
326 ****************************************************************************/
327
328extern struct acpi_fixed_event_info
329 acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
330ACPI_EXTERN struct acpi_fixed_event_handler
331 acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
332ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
333ACPI_EXTERN struct acpi_gpe_block_info
334*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
335ACPI_EXTERN u32 acpi_current_gpe_count;
336
337/*****************************************************************************
338 *
339 * Debugger globals
340 *
341 ****************************************************************************/
342
343ACPI_EXTERN u8 acpi_gbl_db_output_flags;
344
345#ifdef ACPI_DISASSEMBLER
346
347ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
348ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
349#endif
350
351#ifdef ACPI_DEBUGGER
352
353extern u8 acpi_gbl_method_executing;
354extern u8 acpi_gbl_abort_method;
355extern u8 acpi_gbl_db_terminate_threads;
356
357ACPI_EXTERN int optind;
358ACPI_EXTERN char *optarg;
359
360ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
361ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
362ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
363
364ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
365ACPI_EXTERN char acpi_gbl_db_line_buf[80];
366ACPI_EXTERN char acpi_gbl_db_parsed_buf[80];
367ACPI_EXTERN char acpi_gbl_db_scope_buf[40];
368ACPI_EXTERN char acpi_gbl_db_debug_filename[40];
369ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
370ACPI_EXTERN char *acpi_gbl_db_buffer;
371ACPI_EXTERN char *acpi_gbl_db_filename;
372ACPI_EXTERN u32 acpi_gbl_db_debug_level;
373ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
374ACPI_EXTERN struct acpi_table_header *acpi_gbl_db_table_ptr;
375ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node;
376
377/*
378 * Statistic globals
379 */
380ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1];
381ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1];
382ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc;
383ACPI_EXTERN u16 acpi_gbl_node_type_count_misc;
384ACPI_EXTERN u32 acpi_gbl_num_nodes;
385ACPI_EXTERN u32 acpi_gbl_num_objects;
386
387ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree;
388ACPI_EXTERN u32 acpi_gbl_size_of_method_trees;
389ACPI_EXTERN u32 acpi_gbl_size_of_node_entries;
390ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
391
392#endif /* ACPI_DEBUGGER */
393
394#endif /* __ACGLOBAL_H__ */
diff --git a/drivers/acpi/acpica/achware.h b/drivers/acpi/acpica/achware.h
new file mode 100644
index 000000000000..58c69dc49ab4
--- /dev/null
+++ b/drivers/acpi/acpica/achware.h
@@ -0,0 +1,119 @@
1/******************************************************************************
2 *
3 * Name: achware.h -- hardware specific interfaces
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACHWARE_H__
45#define __ACHWARE_H__
46
47/* Values for the _SST predefined method */
48
49#define ACPI_SST_INDICATOR_OFF 0
50#define ACPI_SST_WORKING 1
51#define ACPI_SST_WAKING 2
52#define ACPI_SST_SLEEPING 3
53#define ACPI_SST_SLEEP_CONTEXT 4
54
55/*
56 * hwacpi - high level functions
57 */
58acpi_status acpi_hw_set_mode(u32 mode);
59
60u32 acpi_hw_get_mode(void);
61
62/*
63 * hwregs - ACPI Register I/O
64 */
65struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id);
66
67acpi_status
68acpi_hw_register_read(u32 register_id, u32 * return_value);
69
70acpi_status acpi_hw_register_write(u32 register_id, u32 value);
71
72acpi_status acpi_hw_clear_acpi_status(void);
73
74/*
75 * hwgpe - GPE support
76 */
77acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info);
78
79acpi_status
80acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info);
81
82acpi_status
83acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
84 struct acpi_gpe_block_info *gpe_block, void *context);
85
86acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info);
87
88acpi_status
89acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
90 struct acpi_gpe_block_info *gpe_block, void *context);
91
92acpi_status
93acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info,
94 acpi_event_status * event_status);
95
96acpi_status acpi_hw_disable_all_gpes(void);
97
98acpi_status acpi_hw_enable_all_runtime_gpes(void);
99
100acpi_status acpi_hw_enable_all_wakeup_gpes(void);
101
102acpi_status
103acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
104 struct acpi_gpe_block_info *gpe_block,
105 void *context);
106
107#ifdef ACPI_FUTURE_USAGE
108/*
109 * hwtimer - ACPI Timer prototypes
110 */
111acpi_status acpi_get_timer_resolution(u32 * resolution);
112
113acpi_status acpi_get_timer(u32 * ticks);
114
115acpi_status
116acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed);
117#endif /* ACPI_FUTURE_USAGE */
118
119#endif /* __ACHWARE_H__ */
diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h
new file mode 100644
index 000000000000..e8db7a3143a5
--- /dev/null
+++ b/drivers/acpi/acpica/acinterp.h
@@ -0,0 +1,529 @@
1/******************************************************************************
2 *
3 * Name: acinterp.h - Interpreter subcomponent prototypes and defines
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACINTERP_H__
45#define __ACINTERP_H__
46
47#define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1]))
48
49/* Macros for tables used for debug output */
50
51#define ACPI_EXD_OFFSET(f) (u8) ACPI_OFFSET (union acpi_operand_object,f)
52#define ACPI_EXD_NSOFFSET(f) (u8) ACPI_OFFSET (struct acpi_namespace_node,f)
53#define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_exdump_info))
54
55/*
56 * If possible, pack the following structures to byte alignment, since we
57 * don't care about performance for debug output. Two cases where we cannot
58 * pack the structures:
59 *
60 * 1) Hardware does not support misaligned memory transfers
61 * 2) Compiler does not support pointers within packed structures
62 */
63#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
64#pragma pack(1)
65#endif
66
67typedef const struct acpi_exdump_info {
68 u8 opcode;
69 u8 offset;
70 char *name;
71
72} acpi_exdump_info;
73
74/* Values for the Opcode field above */
75
76#define ACPI_EXD_INIT 0
77#define ACPI_EXD_TYPE 1
78#define ACPI_EXD_UINT8 2
79#define ACPI_EXD_UINT16 3
80#define ACPI_EXD_UINT32 4
81#define ACPI_EXD_UINT64 5
82#define ACPI_EXD_LITERAL 6
83#define ACPI_EXD_POINTER 7
84#define ACPI_EXD_ADDRESS 8
85#define ACPI_EXD_STRING 9
86#define ACPI_EXD_BUFFER 10
87#define ACPI_EXD_PACKAGE 11
88#define ACPI_EXD_FIELD 12
89#define ACPI_EXD_REFERENCE 13
90
91/* restore default alignment */
92
93#pragma pack()
94
95/*
96 * exconvrt - object conversion
97 */
98acpi_status
99acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
100 union acpi_operand_object **result_desc, u32 flags);
101
102acpi_status
103acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
104 union acpi_operand_object **result_desc);
105
106acpi_status
107acpi_ex_convert_to_string(union acpi_operand_object *obj_desc,
108 union acpi_operand_object **result_desc, u32 type);
109
110/* Types for ->String conversion */
111
112#define ACPI_EXPLICIT_BYTE_COPY 0x00000000
113#define ACPI_EXPLICIT_CONVERT_HEX 0x00000001
114#define ACPI_IMPLICIT_CONVERT_HEX 0x00000002
115#define ACPI_EXPLICIT_CONVERT_DECIMAL 0x00000003
116
117acpi_status
118acpi_ex_convert_to_target_type(acpi_object_type destination_type,
119 union acpi_operand_object *source_desc,
120 union acpi_operand_object **result_desc,
121 struct acpi_walk_state *walk_state);
122
123/*
124 * exfield - ACPI AML (p-code) execution - field manipulation
125 */
126acpi_status
127acpi_ex_common_buffer_setup(union acpi_operand_object *obj_desc,
128 u32 buffer_length, u32 * datum_count);
129
130acpi_status
131acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
132 acpi_integer mask,
133 acpi_integer field_value,
134 u32 field_datum_byte_offset);
135
136void
137acpi_ex_get_buffer_datum(acpi_integer * datum,
138 void *buffer,
139 u32 buffer_length,
140 u32 byte_granularity, u32 buffer_offset);
141
142void
143acpi_ex_set_buffer_datum(acpi_integer merged_datum,
144 void *buffer,
145 u32 buffer_length,
146 u32 byte_granularity, u32 buffer_offset);
147
148acpi_status
149acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
150 union acpi_operand_object *obj_desc,
151 union acpi_operand_object **ret_buffer_desc);
152
153acpi_status
154acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
155 union acpi_operand_object *obj_desc,
156 union acpi_operand_object **result_desc);
157
158/*
159 * exfldio - low level field I/O
160 */
161acpi_status
162acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
163 void *buffer, u32 buffer_length);
164
165acpi_status
166acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
167 void *buffer, u32 buffer_length);
168
169acpi_status
170acpi_ex_access_region(union acpi_operand_object *obj_desc,
171 u32 field_datum_byte_offset,
172 acpi_integer * value, u32 read_write);
173
174/*
175 * exmisc - misc support routines
176 */
177acpi_status
178acpi_ex_get_object_reference(union acpi_operand_object *obj_desc,
179 union acpi_operand_object **return_desc,
180 struct acpi_walk_state *walk_state);
181
182acpi_status
183acpi_ex_concat_template(union acpi_operand_object *obj_desc,
184 union acpi_operand_object *obj_desc2,
185 union acpi_operand_object **actual_return_desc,
186 struct acpi_walk_state *walk_state);
187
188acpi_status
189acpi_ex_do_concatenate(union acpi_operand_object *obj_desc,
190 union acpi_operand_object *obj_desc2,
191 union acpi_operand_object **actual_return_desc,
192 struct acpi_walk_state *walk_state);
193
194acpi_status
195acpi_ex_do_logical_numeric_op(u16 opcode,
196 acpi_integer integer0,
197 acpi_integer integer1, u8 * logical_result);
198
199acpi_status
200acpi_ex_do_logical_op(u16 opcode,
201 union acpi_operand_object *operand0,
202 union acpi_operand_object *operand1, u8 * logical_result);
203
204acpi_integer
205acpi_ex_do_math_op(u16 opcode, acpi_integer operand0, acpi_integer operand1);
206
207acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state);
208
209acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state);
210
211acpi_status acpi_ex_create_power_resource(struct acpi_walk_state *walk_state);
212
213acpi_status
214acpi_ex_create_region(u8 * aml_start,
215 u32 aml_length,
216 u8 region_space, struct acpi_walk_state *walk_state);
217
218acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state);
219
220acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state);
221
222acpi_status
223acpi_ex_create_method(u8 * aml_start,
224 u32 aml_length, struct acpi_walk_state *walk_state);
225
226/*
227 * exconfig - dynamic table load/unload
228 */
229acpi_status
230acpi_ex_load_op(union acpi_operand_object *obj_desc,
231 union acpi_operand_object *target,
232 struct acpi_walk_state *walk_state);
233
234acpi_status
235acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
236 union acpi_operand_object **return_desc);
237
238acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle);
239
240/*
241 * exmutex - mutex support
242 */
243acpi_status
244acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
245 union acpi_operand_object *obj_desc,
246 struct acpi_walk_state *walk_state);
247
248acpi_status
249acpi_ex_acquire_mutex_object(u16 timeout,
250 union acpi_operand_object *obj_desc,
251 acpi_thread_id thread_id);
252
253acpi_status
254acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
255 struct acpi_walk_state *walk_state);
256
257acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc);
258
259void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread);
260
261void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc);
262
263/*
264 * exprep - ACPI AML execution - prep utilities
265 */
266acpi_status
267acpi_ex_prep_common_field_object(union acpi_operand_object *obj_desc,
268 u8 field_flags,
269 u8 field_attribute,
270 u32 field_bit_position, u32 field_bit_length);
271
272acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info);
273
274/*
275 * exsystem - Interface to OS services
276 */
277acpi_status
278acpi_ex_system_do_notify_op(union acpi_operand_object *value,
279 union acpi_operand_object *obj_desc);
280
281acpi_status acpi_ex_system_do_suspend(acpi_integer time);
282
283acpi_status acpi_ex_system_do_stall(u32 time);
284
285acpi_status acpi_ex_system_signal_event(union acpi_operand_object *obj_desc);
286
287acpi_status
288acpi_ex_system_wait_event(union acpi_operand_object *time,
289 union acpi_operand_object *obj_desc);
290
291acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc);
292
293acpi_status
294acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout);
295
296acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout);
297
298/*
299 * exoparg1 - ACPI AML execution, 1 operand
300 */
301acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state);
302
303acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state);
304
305acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state);
306
307acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state);
308
309acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state);
310
311/*
312 * exoparg2 - ACPI AML execution, 2 operands
313 */
314acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state);
315
316acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state);
317
318acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state);
319
320acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state);
321
322/*
323 * exoparg3 - ACPI AML execution, 3 operands
324 */
325acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state);
326
327acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state);
328
329/*
330 * exoparg6 - ACPI AML execution, 6 operands
331 */
332acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state *walk_state);
333
334/*
335 * exresolv - Object resolution and get value functions
336 */
337acpi_status
338acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr,
339 struct acpi_walk_state *walk_state);
340
341acpi_status
342acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
343 union acpi_operand_object *operand,
344 acpi_object_type * return_type,
345 union acpi_operand_object **return_desc);
346
347/*
348 * exresnte - resolve namespace node
349 */
350acpi_status
351acpi_ex_resolve_node_to_value(struct acpi_namespace_node **stack_ptr,
352 struct acpi_walk_state *walk_state);
353
354/*
355 * exresop - resolve operand to value
356 */
357acpi_status
358acpi_ex_resolve_operands(u16 opcode,
359 union acpi_operand_object **stack_ptr,
360 struct acpi_walk_state *walk_state);
361
362/*
363 * exdump - Interpreter debug output routines
364 */
365void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth);
366
367void
368acpi_ex_dump_operands(union acpi_operand_object **operands,
369 const char *opcode_name, u32 num_opcodes);
370
371#ifdef ACPI_FUTURE_USAGE
372void
373acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags);
374
375void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags);
376#endif /* ACPI_FUTURE_USAGE */
377
378/*
379 * exnames - AML namestring support
380 */
381acpi_status
382acpi_ex_get_name_string(acpi_object_type data_type,
383 u8 * in_aml_address,
384 char **out_name_string, u32 * out_name_length);
385
386/*
387 * exstore - Object store support
388 */
389acpi_status
390acpi_ex_store(union acpi_operand_object *val_desc,
391 union acpi_operand_object *dest_desc,
392 struct acpi_walk_state *walk_state);
393
394acpi_status
395acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
396 struct acpi_namespace_node *node,
397 struct acpi_walk_state *walk_state,
398 u8 implicit_conversion);
399
400#define ACPI_IMPLICIT_CONVERSION TRUE
401#define ACPI_NO_IMPLICIT_CONVERSION FALSE
402
403/*
404 * exstoren - resolve/store object
405 */
406acpi_status
407acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
408 acpi_object_type target_type,
409 struct acpi_walk_state *walk_state);
410
411acpi_status
412acpi_ex_store_object_to_object(union acpi_operand_object *source_desc,
413 union acpi_operand_object *dest_desc,
414 union acpi_operand_object **new_desc,
415 struct acpi_walk_state *walk_state);
416
417/*
418 * exstorob - store object - buffer/string
419 */
420acpi_status
421acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,
422 union acpi_operand_object *target_desc);
423
424acpi_status
425acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,
426 union acpi_operand_object *target_desc);
427
428/*
429 * excopy - object copy
430 */
431acpi_status
432acpi_ex_copy_integer_to_index_field(union acpi_operand_object *source_desc,
433 union acpi_operand_object *target_desc);
434
435acpi_status
436acpi_ex_copy_integer_to_bank_field(union acpi_operand_object *source_desc,
437 union acpi_operand_object *target_desc);
438
439acpi_status
440acpi_ex_copy_data_to_named_field(union acpi_operand_object *source_desc,
441 struct acpi_namespace_node *node);
442
443acpi_status
444acpi_ex_copy_integer_to_buffer_field(union acpi_operand_object *source_desc,
445 union acpi_operand_object *target_desc);
446
447/*
448 * exutils - interpreter/scanner utilities
449 */
450void acpi_ex_enter_interpreter(void);
451
452void acpi_ex_exit_interpreter(void);
453
454void acpi_ex_reacquire_interpreter(void);
455
456void acpi_ex_relinquish_interpreter(void);
457
458void acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc);
459
460void acpi_ex_acquire_global_lock(u32 rule);
461
462void acpi_ex_release_global_lock(u32 rule);
463
464void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string);
465
466void acpi_ex_unsigned_integer_to_string(acpi_integer value, char *out_string);
467
468/*
469 * exregion - default op_region handlers
470 */
471acpi_status
472acpi_ex_system_memory_space_handler(u32 function,
473 acpi_physical_address address,
474 u32 bit_width,
475 acpi_integer * value,
476 void *handler_context,
477 void *region_context);
478
479acpi_status
480acpi_ex_system_io_space_handler(u32 function,
481 acpi_physical_address address,
482 u32 bit_width,
483 acpi_integer * value,
484 void *handler_context, void *region_context);
485
486acpi_status
487acpi_ex_pci_config_space_handler(u32 function,
488 acpi_physical_address address,
489 u32 bit_width,
490 acpi_integer * value,
491 void *handler_context, void *region_context);
492
493acpi_status
494acpi_ex_cmos_space_handler(u32 function,
495 acpi_physical_address address,
496 u32 bit_width,
497 acpi_integer * value,
498 void *handler_context, void *region_context);
499
500acpi_status
501acpi_ex_pci_bar_space_handler(u32 function,
502 acpi_physical_address address,
503 u32 bit_width,
504 acpi_integer * value,
505 void *handler_context, void *region_context);
506
507acpi_status
508acpi_ex_embedded_controller_space_handler(u32 function,
509 acpi_physical_address address,
510 u32 bit_width,
511 acpi_integer * value,
512 void *handler_context,
513 void *region_context);
514
515acpi_status
516acpi_ex_sm_bus_space_handler(u32 function,
517 acpi_physical_address address,
518 u32 bit_width,
519 acpi_integer * value,
520 void *handler_context, void *region_context);
521
522acpi_status
523acpi_ex_data_table_space_handler(u32 function,
524 acpi_physical_address address,
525 u32 bit_width,
526 acpi_integer * value,
527 void *handler_context, void *region_context);
528
529#endif /* __INTERP_H__ */
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
new file mode 100644
index 000000000000..492d02761bb7
--- /dev/null
+++ b/drivers/acpi/acpica/aclocal.h
@@ -0,0 +1,990 @@
1/******************************************************************************
2 *
3 * Name: aclocal.h - Internal data types used across the ACPI subsystem
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACLOCAL_H__
45#define __ACLOCAL_H__
46
47/* acpisrc:struct_defs -- for acpisrc conversion */
48
49#define ACPI_SERIALIZED 0xFF
50
51typedef u32 acpi_mutex_handle;
52#define ACPI_GLOBAL_LOCK (acpi_semaphore) (-1)
53
54/* Total number of aml opcodes defined */
55
56#define AML_NUM_OPCODES 0x7F
57
58/* Forward declarations */
59
60struct acpi_walk_state;
61struct acpi_obj_mutex;
62union acpi_parse_object;
63
64/*****************************************************************************
65 *
66 * Mutex typedefs and structs
67 *
68 ****************************************************************************/
69
70/*
71 * Predefined handles for the mutex objects used within the subsystem
72 * All mutex objects are automatically created by acpi_ut_mutex_initialize.
73 *
74 * The acquire/release ordering protocol is implied via this list. Mutexes
75 * with a lower value must be acquired before mutexes with a higher value.
76 *
77 * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names
78 * table below also!
79 */
80#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */
81#define ACPI_MTX_NAMESPACE 1 /* ACPI Namespace */
82#define ACPI_MTX_TABLES 2 /* Data for ACPI tables */
83#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */
84#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */
85#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */
86#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */
87#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */
88
89#define ACPI_MAX_MUTEX 7
90#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1
91
92#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
93#ifdef DEFINE_ACPI_GLOBALS
94
95/* Debug names for the mutexes above */
96
97static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
98 "ACPI_MTX_Interpreter",
99 "ACPI_MTX_Namespace",
100 "ACPI_MTX_Tables",
101 "ACPI_MTX_Events",
102 "ACPI_MTX_Caches",
103 "ACPI_MTX_Memory",
104 "ACPI_MTX_CommandComplete",
105 "ACPI_MTX_CommandReady"
106};
107
108#endif
109#endif
110
111/*
112 * Predefined handles for spinlocks used within the subsystem.
113 * These spinlocks are created by acpi_ut_mutex_initialize
114 */
115#define ACPI_LOCK_GPES 0
116#define ACPI_LOCK_HARDWARE 1
117
118#define ACPI_MAX_LOCK 1
119#define ACPI_NUM_LOCK ACPI_MAX_LOCK+1
120
121/* This Thread ID means that the mutex is not in use (unlocked) */
122
123#define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_id) 0
124
125/* Table for the global mutexes */
126
127struct acpi_mutex_info {
128 acpi_mutex mutex;
129 u32 use_count;
130 acpi_thread_id thread_id;
131};
132
133/* Lock flag parameter for various interfaces */
134
135#define ACPI_MTX_DO_NOT_LOCK 0
136#define ACPI_MTX_LOCK 1
137
138/* Field access granularities */
139
140#define ACPI_FIELD_BYTE_GRANULARITY 1
141#define ACPI_FIELD_WORD_GRANULARITY 2
142#define ACPI_FIELD_DWORD_GRANULARITY 4
143#define ACPI_FIELD_QWORD_GRANULARITY 8
144
145#define ACPI_ENTRY_NOT_FOUND NULL
146
147/*****************************************************************************
148 *
149 * Namespace typedefs and structs
150 *
151 ****************************************************************************/
152
153/* Operational modes of the AML interpreter/scanner */
154
155typedef enum {
156 ACPI_IMODE_LOAD_PASS1 = 0x01,
157 ACPI_IMODE_LOAD_PASS2 = 0x02,
158 ACPI_IMODE_EXECUTE = 0x03
159} acpi_interpreter_mode;
160
161/*
162 * The Namespace Node describes a named object that appears in the AML.
163 * descriptor_type is used to differentiate between internal descriptors.
164 *
165 * The node is optimized for both 32-bit and 64-bit platforms:
166 * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case.
167 *
168 * Note: The descriptor_type and Type fields must appear in the identical
169 * position in both the struct acpi_namespace_node and union acpi_operand_object
170 * structures.
171 */
172struct acpi_namespace_node {
173 union acpi_operand_object *object; /* Interpreter object */
174 u8 descriptor_type; /* Differentiate object descriptor types */
175 u8 type; /* ACPI Type associated with this name */
176 u8 flags; /* Miscellaneous flags */
177 acpi_owner_id owner_id; /* Node creator */
178 union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
179 struct acpi_namespace_node *child; /* First child */
180 struct acpi_namespace_node *peer; /* Peer. Parent if ANOBJ_END_OF_PEER_LIST set */
181
182 /*
183 * The following fields are used by the ASL compiler and disassembler only
184 */
185#ifdef ACPI_LARGE_NAMESPACE_NODE
186 union acpi_parse_object *op;
187 u32 value;
188 u32 length;
189#endif
190};
191
192/* Namespace Node flags */
193
194#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */
195#define ANOBJ_TEMPORARY 0x02 /* Node is create by a method and is temporary */
196#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */
197#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */
198#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */
199#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
200
201#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */
202#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */
203#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* i_aSL only: Method has at least one return value */
204#define ANOBJ_IS_BIT_OFFSET 0x40 /* i_aSL only: Reference is a bit offset */
205#define ANOBJ_IS_REFERENCED 0x80 /* i_aSL only: Object was referenced */
206
207/* One internal RSDT for table management */
208
209struct acpi_internal_rsdt {
210 struct acpi_table_desc *tables;
211 u32 count;
212 u32 size;
213 u8 flags;
214};
215
216/* Flags for above */
217
218#define ACPI_ROOT_ORIGIN_UNKNOWN (0) /* ~ORIGIN_ALLOCATED */
219#define ACPI_ROOT_ORIGIN_ALLOCATED (1)
220#define ACPI_ROOT_ALLOW_RESIZE (2)
221
222/* Predefined (fixed) table indexes */
223
224#define ACPI_TABLE_INDEX_DSDT (0)
225#define ACPI_TABLE_INDEX_FACS (1)
226
227struct acpi_find_context {
228 char *search_for;
229 acpi_handle *list;
230 u32 *count;
231};
232
233struct acpi_ns_search_data {
234 struct acpi_namespace_node *node;
235};
236
237/* Object types used during package copies */
238
239#define ACPI_COPY_TYPE_SIMPLE 0
240#define ACPI_COPY_TYPE_PACKAGE 1
241
242/* Info structure used to convert external<->internal namestrings */
243
244struct acpi_namestring_info {
245 const char *external_name;
246 const char *next_external_char;
247 char *internal_name;
248 u32 length;
249 u32 num_segments;
250 u32 num_carats;
251 u8 fully_qualified;
252};
253
254/* Field creation info */
255
256struct acpi_create_field_info {
257 struct acpi_namespace_node *region_node;
258 struct acpi_namespace_node *field_node;
259 struct acpi_namespace_node *register_node;
260 struct acpi_namespace_node *data_register_node;
261 u32 bank_value;
262 u32 field_bit_position;
263 u32 field_bit_length;
264 u8 field_flags;
265 u8 attribute;
266 u8 field_type;
267};
268
269typedef
270acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);
271
272/*
273 * Bitmapped ACPI types. Used internally only
274 */
275#define ACPI_BTYPE_ANY 0x00000000
276#define ACPI_BTYPE_INTEGER 0x00000001
277#define ACPI_BTYPE_STRING 0x00000002
278#define ACPI_BTYPE_BUFFER 0x00000004
279#define ACPI_BTYPE_PACKAGE 0x00000008
280#define ACPI_BTYPE_FIELD_UNIT 0x00000010
281#define ACPI_BTYPE_DEVICE 0x00000020
282#define ACPI_BTYPE_EVENT 0x00000040
283#define ACPI_BTYPE_METHOD 0x00000080
284#define ACPI_BTYPE_MUTEX 0x00000100
285#define ACPI_BTYPE_REGION 0x00000200
286#define ACPI_BTYPE_POWER 0x00000400
287#define ACPI_BTYPE_PROCESSOR 0x00000800
288#define ACPI_BTYPE_THERMAL 0x00001000
289#define ACPI_BTYPE_BUFFER_FIELD 0x00002000
290#define ACPI_BTYPE_DDB_HANDLE 0x00004000
291#define ACPI_BTYPE_DEBUG_OBJECT 0x00008000
292#define ACPI_BTYPE_REFERENCE 0x00010000
293#define ACPI_BTYPE_RESOURCE 0x00020000
294
295#define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
296
297#define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE)
298#define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE)
299#define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
300#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */
301#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF
302
303/*
304 * Information structure for ACPI predefined names.
305 * Each entry in the table contains the following items:
306 *
307 * Name - The ACPI reserved name
308 * param_count - Number of arguments to the method
309 * expected_return_btypes - Allowed type(s) for the return value
310 */
311struct acpi_name_info {
312 char name[ACPI_NAME_SIZE];
313 u8 param_count;
314 u8 expected_btypes;
315};
316
317/*
318 * Secondary information structures for ACPI predefined objects that return
319 * package objects. This structure appears as the next entry in the table
320 * after the NAME_INFO structure above.
321 *
322 * The reason for this is to minimize the size of the predefined name table.
323 */
324
325/*
326 * Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2,
327 * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT
328 */
329struct acpi_package_info {
330 u8 type;
331 u8 object_type1;
332 u8 count1;
333 u8 object_type2;
334 u8 count2;
335 u8 reserved;
336};
337
338/* Used for ACPI_PTYPE2_FIXED */
339
340struct acpi_package_info2 {
341 u8 type;
342 u8 count;
343 u8 object_type[4];
344};
345
346/* Used for ACPI_PTYPE1_OPTION */
347
348struct acpi_package_info3 {
349 u8 type;
350 u8 count;
351 u8 object_type[2];
352 u8 tail_object_type;
353 u8 reserved;
354};
355
356union acpi_predefined_info {
357 struct acpi_name_info info;
358 struct acpi_package_info ret_info;
359 struct acpi_package_info2 ret_info2;
360 struct acpi_package_info3 ret_info3;
361};
362
363/*
364 * Bitmapped return value types
365 * Note: the actual data types must be contiguous, a loop in nspredef.c
366 * depends on this.
367 */
368#define ACPI_RTYPE_ANY 0x00
369#define ACPI_RTYPE_NONE 0x01
370#define ACPI_RTYPE_INTEGER 0x02
371#define ACPI_RTYPE_STRING 0x04
372#define ACPI_RTYPE_BUFFER 0x08
373#define ACPI_RTYPE_PACKAGE 0x10
374#define ACPI_RTYPE_REFERENCE 0x20
375#define ACPI_RTYPE_ALL 0x3F
376
377#define ACPI_NUM_RTYPES 5 /* Number of actual object types */
378
379/*****************************************************************************
380 *
381 * Event typedefs and structs
382 *
383 ****************************************************************************/
384
385/* Dispatch info for each GPE -- either a method or handler, cannot be both */
386
387struct acpi_handler_info {
388 acpi_event_handler address; /* Address of handler, if any */
389 void *context; /* Context to be passed to handler */
390 struct acpi_namespace_node *method_node; /* Method node for this GPE level (saved) */
391};
392
393union acpi_gpe_dispatch_info {
394 struct acpi_namespace_node *method_node; /* Method node for this GPE level */
395 struct acpi_handler_info *handler;
396};
397
398/*
399 * Information about a GPE, one per each GPE in an array.
400 * NOTE: Important to keep this struct as small as possible.
401 */
402struct acpi_gpe_event_info {
403 union acpi_gpe_dispatch_info dispatch; /* Either Method or Handler */
404 struct acpi_gpe_register_info *register_info; /* Backpointer to register info */
405 u8 flags; /* Misc info about this GPE */
406 u8 gpe_number; /* This GPE */
407};
408
409/* Information about a GPE register pair, one per each status/enable pair in an array */
410
411struct acpi_gpe_register_info {
412 struct acpi_generic_address status_address; /* Address of status reg */
413 struct acpi_generic_address enable_address; /* Address of enable reg */
414 u8 enable_for_wake; /* GPEs to keep enabled when sleeping */
415 u8 enable_for_run; /* GPEs to keep enabled when running */
416 u8 base_gpe_number; /* Base GPE number for this register */
417};
418
419/*
420 * Information about a GPE register block, one per each installed block --
421 * GPE0, GPE1, and one per each installed GPE Block Device.
422 */
423struct acpi_gpe_block_info {
424 struct acpi_namespace_node *node;
425 struct acpi_gpe_block_info *previous;
426 struct acpi_gpe_block_info *next;
427 struct acpi_gpe_xrupt_info *xrupt_block; /* Backpointer to interrupt block */
428 struct acpi_gpe_register_info *register_info; /* One per GPE register pair */
429 struct acpi_gpe_event_info *event_info; /* One for each GPE */
430 struct acpi_generic_address block_address; /* Base address of the block */
431 u32 register_count; /* Number of register pairs in block */
432 u8 block_base_number; /* Base GPE number for this block */
433};
434
435/* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */
436
437struct acpi_gpe_xrupt_info {
438 struct acpi_gpe_xrupt_info *previous;
439 struct acpi_gpe_xrupt_info *next;
440 struct acpi_gpe_block_info *gpe_block_list_head; /* List of GPE blocks for this xrupt */
441 u32 interrupt_number; /* System interrupt number */
442};
443
444struct acpi_gpe_walk_info {
445 struct acpi_namespace_node *gpe_device;
446 struct acpi_gpe_block_info *gpe_block;
447};
448
449struct acpi_gpe_device_info {
450 u32 index;
451 u32 next_block_base_index;
452 acpi_status status;
453 struct acpi_namespace_node *gpe_device;
454};
455
456typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *gpe_xrupt_info,
457 struct acpi_gpe_block_info *gpe_block, void *context);
458
459/* Information about each particular fixed event */
460
461struct acpi_fixed_event_handler {
462 acpi_event_handler handler; /* Address of handler. */
463 void *context; /* Context to be passed to handler */
464};
465
466struct acpi_fixed_event_info {
467 u8 status_register_id;
468 u8 enable_register_id;
469 u16 status_bit_mask;
470 u16 enable_bit_mask;
471};
472
473/* Information used during field processing */
474
475struct acpi_field_info {
476 u8 skip_field;
477 u8 field_flag;
478 u32 pkg_length;
479};
480
481/*****************************************************************************
482 *
483 * Generic "state" object for stacks
484 *
485 ****************************************************************************/
486
487#define ACPI_CONTROL_NORMAL 0xC0
488#define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1
489#define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2
490#define ACPI_CONTROL_PREDICATE_FALSE 0xC3
491#define ACPI_CONTROL_PREDICATE_TRUE 0xC4
492
493#define ACPI_STATE_COMMON \
494 void *next; \
495 u8 descriptor_type; /* To differentiate various internal objs */\
496 u8 flags; \
497 u16 value; \
498 u16 state;
499
500 /* There are 2 bytes available here until the next natural alignment boundary */
501
502struct acpi_common_state {
503ACPI_STATE_COMMON};
504
505/*
506 * Update state - used to traverse complex objects such as packages
507 */
508struct acpi_update_state {
509 ACPI_STATE_COMMON union acpi_operand_object *object;
510};
511
512/*
513 * Pkg state - used to traverse nested package structures
514 */
515struct acpi_pkg_state {
516 ACPI_STATE_COMMON u16 index;
517 union acpi_operand_object *source_object;
518 union acpi_operand_object *dest_object;
519 struct acpi_walk_state *walk_state;
520 void *this_target_obj;
521 u32 num_packages;
522};
523
524/*
525 * Control state - one per if/else and while constructs.
526 * Allows nesting of these constructs
527 */
528struct acpi_control_state {
529 ACPI_STATE_COMMON u16 opcode;
530 union acpi_parse_object *predicate_op;
531 u8 *aml_predicate_start; /* Start of if/while predicate */
532 u8 *package_end; /* End of if/while block */
533 u32 loop_count; /* While() loop counter */
534};
535
536/*
537 * Scope state - current scope during namespace lookups
538 */
539struct acpi_scope_state {
540 ACPI_STATE_COMMON struct acpi_namespace_node *node;
541};
542
543struct acpi_pscope_state {
544 ACPI_STATE_COMMON u32 arg_count; /* Number of fixed arguments */
545 union acpi_parse_object *op; /* Current op being parsed */
546 u8 *arg_end; /* Current argument end */
547 u8 *pkg_end; /* Current package end */
548 u32 arg_list; /* Next argument to parse */
549};
550
551/*
552 * Thread state - one per thread across multiple walk states. Multiple walk
553 * states are created when there are nested control methods executing.
554 */
555struct acpi_thread_state {
556 ACPI_STATE_COMMON u8 current_sync_level; /* Mutex Sync (nested acquire) level */
557 struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
558 union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */
559 acpi_thread_id thread_id; /* Running thread ID */
560};
561
562/*
563 * Result values - used to accumulate the results of nested
564 * AML arguments
565 */
566struct acpi_result_values {
567 ACPI_STATE_COMMON
568 union acpi_operand_object *obj_desc[ACPI_RESULTS_FRAME_OBJ_NUM];
569};
570
571typedef
572acpi_status(*acpi_parse_downwards) (struct acpi_walk_state * walk_state,
573 union acpi_parse_object ** out_op);
574
575typedef acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * walk_state);
576
577/*
578 * Notify info - used to pass info to the deferred notify
579 * handler/dispatcher.
580 */
581struct acpi_notify_info {
582 ACPI_STATE_COMMON struct acpi_namespace_node *node;
583 union acpi_operand_object *handler_obj;
584};
585
586/* Generic state is union of structs above */
587
588union acpi_generic_state {
589 struct acpi_common_state common;
590 struct acpi_control_state control;
591 struct acpi_update_state update;
592 struct acpi_scope_state scope;
593 struct acpi_pscope_state parse_scope;
594 struct acpi_pkg_state pkg;
595 struct acpi_thread_state thread;
596 struct acpi_result_values results;
597 struct acpi_notify_info notify;
598};
599
600/*****************************************************************************
601 *
602 * Interpreter typedefs and structs
603 *
604 ****************************************************************************/
605
606typedef acpi_status(*ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state);
607
608/*****************************************************************************
609 *
610 * Parser typedefs and structs
611 *
612 ****************************************************************************/
613
614/*
615 * AML opcode, name, and argument layout
616 */
617struct acpi_opcode_info {
618#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
619 char *name; /* Opcode name (disassembler/debug only) */
620#endif
621 u32 parse_args; /* Grammar/Parse time arguments */
622 u32 runtime_args; /* Interpret time arguments */
623 u16 flags; /* Misc flags */
624 u8 object_type; /* Corresponding internal object type */
625 u8 class; /* Opcode class */
626 u8 type; /* Opcode type */
627};
628
629union acpi_parse_value {
630 acpi_integer integer; /* Integer constant (Up to 64 bits) */
631 struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */
632 u32 size; /* bytelist or field size */
633 char *string; /* NULL terminated string */
634 u8 *buffer; /* buffer or string */
635 char *name; /* NULL terminated string */
636 union acpi_parse_object *arg; /* arguments and contained ops */
637};
638
639#ifdef ACPI_DISASSEMBLER
640#define ACPI_DISASM_ONLY_MEMBERS(a) a;
641#else
642#define ACPI_DISASM_ONLY_MEMBERS(a)
643#endif
644
645#define ACPI_PARSE_COMMON \
646 union acpi_parse_object *parent; /* Parent op */\
647 u8 descriptor_type; /* To differentiate various internal objs */\
648 u8 flags; /* Type of Op */\
649 u16 aml_opcode; /* AML opcode */\
650 u32 aml_offset; /* Offset of declaration in AML */\
651 union acpi_parse_object *next; /* Next op */\
652 struct acpi_namespace_node *node; /* For use by interpreter */\
653 union acpi_parse_value value; /* Value or args associated with the opcode */\
654 u8 arg_list_length; /* Number of elements in the arg list */\
655 ACPI_DISASM_ONLY_MEMBERS (\
656 u8 disasm_flags; /* Used during AML disassembly */\
657 u8 disasm_opcode; /* Subtype used for disassembly */\
658 char aml_op_name[16]) /* Op name (debug only) */
659
660#define ACPI_DASM_BUFFER 0x00
661#define ACPI_DASM_RESOURCE 0x01
662#define ACPI_DASM_STRING 0x02
663#define ACPI_DASM_UNICODE 0x03
664#define ACPI_DASM_EISAID 0x04
665#define ACPI_DASM_MATCHOP 0x05
666#define ACPI_DASM_LNOT_PREFIX 0x06
667#define ACPI_DASM_LNOT_SUFFIX 0x07
668#define ACPI_DASM_IGNORE 0x08
669
670/*
671 * Generic operation (for example: If, While, Store)
672 */
673struct acpi_parse_obj_common {
674ACPI_PARSE_COMMON};
675
676/*
677 * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and op_regions),
678 * and bytelists.
679 */
680struct acpi_parse_obj_named {
681 ACPI_PARSE_COMMON u8 *path;
682 u8 *data; /* AML body or bytelist data */
683 u32 length; /* AML length */
684 u32 name; /* 4-byte name or zero if no name */
685};
686
687/* This version is used by the i_aSL compiler only */
688
689#define ACPI_MAX_PARSEOP_NAME 20
690
691struct acpi_parse_obj_asl {
692 ACPI_PARSE_COMMON union acpi_parse_object *child;
693 union acpi_parse_object *parent_method;
694 char *filename;
695 char *external_name;
696 char *namepath;
697 char name_seg[4];
698 u32 extra_value;
699 u32 column;
700 u32 line_number;
701 u32 logical_line_number;
702 u32 logical_byte_offset;
703 u32 end_line;
704 u32 end_logical_line;
705 u32 acpi_btype;
706 u32 aml_length;
707 u32 aml_subtree_length;
708 u32 final_aml_length;
709 u32 final_aml_offset;
710 u32 compile_flags;
711 u16 parse_opcode;
712 u8 aml_opcode_length;
713 u8 aml_pkg_len_bytes;
714 u8 extra;
715 char parse_op_name[ACPI_MAX_PARSEOP_NAME];
716};
717
718union acpi_parse_object {
719 struct acpi_parse_obj_common common;
720 struct acpi_parse_obj_named named;
721 struct acpi_parse_obj_asl asl;
722};
723
724/*
725 * Parse state - one state per parser invocation and each control
726 * method.
727 */
728struct acpi_parse_state {
729 u8 *aml_start; /* First AML byte */
730 u8 *aml; /* Next AML byte */
731 u8 *aml_end; /* (last + 1) AML byte */
732 u8 *pkg_start; /* Current package begin */
733 u8 *pkg_end; /* Current package end */
734 union acpi_parse_object *start_op; /* Root of parse tree */
735 struct acpi_namespace_node *start_node;
736 union acpi_generic_state *scope; /* Current scope */
737 union acpi_parse_object *start_scope;
738 u32 aml_size;
739};
740
741/* Parse object flags */
742
743#define ACPI_PARSEOP_GENERIC 0x01
744#define ACPI_PARSEOP_NAMED 0x02
745#define ACPI_PARSEOP_DEFERRED 0x04
746#define ACPI_PARSEOP_BYTELIST 0x08
747#define ACPI_PARSEOP_IN_STACK 0x10
748#define ACPI_PARSEOP_TARGET 0x20
749#define ACPI_PARSEOP_IN_CACHE 0x80
750
751/* Parse object disasm_flags */
752
753#define ACPI_PARSEOP_IGNORE 0x01
754#define ACPI_PARSEOP_PARAMLIST 0x02
755#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
756#define ACPI_PARSEOP_SPECIAL 0x10
757
758/*****************************************************************************
759 *
760 * Hardware (ACPI registers) and PNP
761 *
762 ****************************************************************************/
763
764struct acpi_bit_register_info {
765 u8 parent_register;
766 u8 bit_position;
767 u16 access_bit_mask;
768};
769
770/*
771 * Some ACPI registers have bits that must be ignored -- meaning that they
772 * must be preserved.
773 */
774#define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */
775#define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0200 /* Bit 9 (whatever) */
776
777/*
778 * Register IDs
779 * These are the full ACPI registers
780 */
781#define ACPI_REGISTER_PM1_STATUS 0x01
782#define ACPI_REGISTER_PM1_ENABLE 0x02
783#define ACPI_REGISTER_PM1_CONTROL 0x03
784#define ACPI_REGISTER_PM1A_CONTROL 0x04
785#define ACPI_REGISTER_PM1B_CONTROL 0x05
786#define ACPI_REGISTER_PM2_CONTROL 0x06
787#define ACPI_REGISTER_PM_TIMER 0x07
788#define ACPI_REGISTER_PROCESSOR_BLOCK 0x08
789#define ACPI_REGISTER_SMI_COMMAND_BLOCK 0x09
790
791/* Masks used to access the bit_registers */
792
793#define ACPI_BITMASK_TIMER_STATUS 0x0001
794#define ACPI_BITMASK_BUS_MASTER_STATUS 0x0010
795#define ACPI_BITMASK_GLOBAL_LOCK_STATUS 0x0020
796#define ACPI_BITMASK_POWER_BUTTON_STATUS 0x0100
797#define ACPI_BITMASK_SLEEP_BUTTON_STATUS 0x0200
798#define ACPI_BITMASK_RT_CLOCK_STATUS 0x0400
799#define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */
800#define ACPI_BITMASK_WAKE_STATUS 0x8000
801
802#define ACPI_BITMASK_ALL_FIXED_STATUS (\
803 ACPI_BITMASK_TIMER_STATUS | \
804 ACPI_BITMASK_BUS_MASTER_STATUS | \
805 ACPI_BITMASK_GLOBAL_LOCK_STATUS | \
806 ACPI_BITMASK_POWER_BUTTON_STATUS | \
807 ACPI_BITMASK_SLEEP_BUTTON_STATUS | \
808 ACPI_BITMASK_RT_CLOCK_STATUS | \
809 ACPI_BITMASK_WAKE_STATUS)
810
811#define ACPI_BITMASK_TIMER_ENABLE 0x0001
812#define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020
813#define ACPI_BITMASK_POWER_BUTTON_ENABLE 0x0100
814#define ACPI_BITMASK_SLEEP_BUTTON_ENABLE 0x0200
815#define ACPI_BITMASK_RT_CLOCK_ENABLE 0x0400
816#define ACPI_BITMASK_PCIEXP_WAKE_DISABLE 0x4000 /* ACPI 3.0 */
817
818#define ACPI_BITMASK_SCI_ENABLE 0x0001
819#define ACPI_BITMASK_BUS_MASTER_RLD 0x0002
820#define ACPI_BITMASK_GLOBAL_LOCK_RELEASE 0x0004
821#define ACPI_BITMASK_SLEEP_TYPE_X 0x1C00
822#define ACPI_BITMASK_SLEEP_ENABLE 0x2000
823
824#define ACPI_BITMASK_ARB_DISABLE 0x0001
825
826/* Raw bit position of each bit_register */
827
828#define ACPI_BITPOSITION_TIMER_STATUS 0x00
829#define ACPI_BITPOSITION_BUS_MASTER_STATUS 0x04
830#define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS 0x05
831#define ACPI_BITPOSITION_POWER_BUTTON_STATUS 0x08
832#define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS 0x09
833#define ACPI_BITPOSITION_RT_CLOCK_STATUS 0x0A
834#define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS 0x0E /* ACPI 3.0 */
835#define ACPI_BITPOSITION_WAKE_STATUS 0x0F
836
837#define ACPI_BITPOSITION_TIMER_ENABLE 0x00
838#define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE 0x05
839#define ACPI_BITPOSITION_POWER_BUTTON_ENABLE 0x08
840#define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE 0x09
841#define ACPI_BITPOSITION_RT_CLOCK_ENABLE 0x0A
842#define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE 0x0E /* ACPI 3.0 */
843
844#define ACPI_BITPOSITION_SCI_ENABLE 0x00
845#define ACPI_BITPOSITION_BUS_MASTER_RLD 0x01
846#define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE 0x02
847#define ACPI_BITPOSITION_SLEEP_TYPE_X 0x0A
848#define ACPI_BITPOSITION_SLEEP_ENABLE 0x0D
849
850#define ACPI_BITPOSITION_ARB_DISABLE 0x00
851
852/*****************************************************************************
853 *
854 * Resource descriptors
855 *
856 ****************************************************************************/
857
858/* resource_type values */
859
860#define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0
861#define ACPI_ADDRESS_TYPE_IO_RANGE 1
862#define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2
863
864/* Resource descriptor types and masks */
865
866#define ACPI_RESOURCE_NAME_LARGE 0x80
867#define ACPI_RESOURCE_NAME_SMALL 0x00
868
869#define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 contain the type */
870#define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */
871#define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the type */
872
873/*
874 * Small resource descriptor "names" as defined by the ACPI specification.
875 * Note: Bits 2:0 are used for the descriptor length
876 */
877#define ACPI_RESOURCE_NAME_IRQ 0x20
878#define ACPI_RESOURCE_NAME_DMA 0x28
879#define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30
880#define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38
881#define ACPI_RESOURCE_NAME_IO 0x40
882#define ACPI_RESOURCE_NAME_FIXED_IO 0x48
883#define ACPI_RESOURCE_NAME_RESERVED_S1 0x50
884#define ACPI_RESOURCE_NAME_RESERVED_S2 0x58
885#define ACPI_RESOURCE_NAME_RESERVED_S3 0x60
886#define ACPI_RESOURCE_NAME_RESERVED_S4 0x68
887#define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70
888#define ACPI_RESOURCE_NAME_END_TAG 0x78
889
890/*
891 * Large resource descriptor "names" as defined by the ACPI specification.
892 * Note: includes the Large Descriptor bit in bit[7]
893 */
894#define ACPI_RESOURCE_NAME_MEMORY24 0x81
895#define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82
896#define ACPI_RESOURCE_NAME_RESERVED_L1 0x83
897#define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84
898#define ACPI_RESOURCE_NAME_MEMORY32 0x85
899#define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86
900#define ACPI_RESOURCE_NAME_ADDRESS32 0x87
901#define ACPI_RESOURCE_NAME_ADDRESS16 0x88
902#define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89
903#define ACPI_RESOURCE_NAME_ADDRESS64 0x8A
904#define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B
905#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B
906
907/*****************************************************************************
908 *
909 * Miscellaneous
910 *
911 ****************************************************************************/
912
913#define ACPI_ASCII_ZERO 0x30
914
915/*****************************************************************************
916 *
917 * Debugger
918 *
919 ****************************************************************************/
920
921struct acpi_db_method_info {
922 acpi_handle main_thread_gate;
923 acpi_handle thread_complete_gate;
924 u32 *threads;
925 u32 num_threads;
926 u32 num_created;
927 u32 num_completed;
928
929 char *name;
930 u32 flags;
931 u32 num_loops;
932 char pathname[128];
933 char **args;
934
935 /*
936 * Arguments to be passed to method for the command
937 * Threads -
938 * the Number of threads, ID of current thread and
939 * Index of current thread inside all them created.
940 */
941 char init_args;
942 char *arguments[4];
943 char num_threads_str[11];
944 char id_of_thread_str[11];
945 char index_of_thread_str[11];
946};
947
948struct acpi_integrity_info {
949 u32 nodes;
950 u32 objects;
951};
952
953#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
954#define ACPI_DB_CONSOLE_OUTPUT 0x02
955#define ACPI_DB_DUPLICATE_OUTPUT 0x03
956
957/*****************************************************************************
958 *
959 * Debug
960 *
961 ****************************************************************************/
962
963/* Entry for a memory allocation (debug only) */
964
965#define ACPI_MEM_MALLOC 0
966#define ACPI_MEM_CALLOC 1
967#define ACPI_MAX_MODULE_NAME 16
968
969#define ACPI_COMMON_DEBUG_MEM_HEADER \
970 struct acpi_debug_mem_block *previous; \
971 struct acpi_debug_mem_block *next; \
972 u32 size; \
973 u32 component; \
974 u32 line; \
975 char module[ACPI_MAX_MODULE_NAME]; \
976 u8 alloc_type;
977
978struct acpi_debug_mem_header {
979ACPI_COMMON_DEBUG_MEM_HEADER};
980
981struct acpi_debug_mem_block {
982 ACPI_COMMON_DEBUG_MEM_HEADER u64 user_space;
983};
984
985#define ACPI_MEM_LIST_GLOBAL 0
986#define ACPI_MEM_LIST_NSNODE 1
987#define ACPI_MEM_LIST_MAX 1
988#define ACPI_NUM_MEM_LISTS 2
989
990#endif /* __ACLOCAL_H__ */
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h
new file mode 100644
index 000000000000..c57286a3aceb
--- /dev/null
+++ b/drivers/acpi/acpica/acmacros.h
@@ -0,0 +1,577 @@
1/******************************************************************************
2 *
3 * Name: acmacros.h - C macros for the entire subsystem.
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACMACROS_H__
45#define __ACMACROS_H__
46
47/*
48 * Extract data using a pointer. Any more than a byte and we
49 * get into potential aligment issues -- see the STORE macros below.
50 * Use with care.
51 */
52#define ACPI_GET8(ptr) *ACPI_CAST_PTR (u8, ptr)
53#define ACPI_GET16(ptr) *ACPI_CAST_PTR (u16, ptr)
54#define ACPI_GET32(ptr) *ACPI_CAST_PTR (u32, ptr)
55#define ACPI_GET64(ptr) *ACPI_CAST_PTR (u64, ptr)
56#define ACPI_SET8(ptr) *ACPI_CAST_PTR (u8, ptr)
57#define ACPI_SET16(ptr) *ACPI_CAST_PTR (u16, ptr)
58#define ACPI_SET32(ptr) *ACPI_CAST_PTR (u32, ptr)
59#define ACPI_SET64(ptr) *ACPI_CAST_PTR (u64, ptr)
60
61/*
62 * printf() format helpers
63 */
64
65/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */
66
67#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
68
69#if ACPI_MACHINE_WIDTH == 64
70#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
71#else
72#define ACPI_FORMAT_NATIVE_UINT(i) 0, (i)
73#endif
74
75/*
76 * Macros for moving data around to/from buffers that are possibly unaligned.
77 * If the hardware supports the transfer of unaligned data, just do the store.
78 * Otherwise, we have to move one byte at a time.
79 */
80#ifdef ACPI_BIG_ENDIAN
81/*
82 * Macros for big-endian machines
83 */
84
85/* These macros reverse the bytes during the move, converting little-endian to big endian */
86
87 /* Big Endian <== Little Endian */
88 /* Hi...Lo Lo...Hi */
89/* 16-bit source, 16/32/64 destination */
90
91#define ACPI_MOVE_16_TO_16(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[1];\
92 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[0];}
93
94#define ACPI_MOVE_16_TO_32(d, s) {(*(u32 *)(void *)(d))=0;\
95 ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
96 ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
97
98#define ACPI_MOVE_16_TO_64(d, s) {(*(u64 *)(void *)(d))=0;\
99 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
100 ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
101
102/* 32-bit source, 16/32/64 destination */
103
104#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
105
106#define ACPI_MOVE_32_TO_32(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\
107 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\
108 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
109 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
110
111#define ACPI_MOVE_32_TO_64(d, s) {(*(u64 *)(void *)(d))=0;\
112 ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\
113 ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\
114 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
115 ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
116
117/* 64-bit source, 16/32/64 destination */
118
119#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
120
121#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
122
123#define ACPI_MOVE_64_TO_64(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\
124 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\
125 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[5];\
126 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[4];\
127 (( u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\
128 (( u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\
129 (( u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
130 (( u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
131#else
132/*
133 * Macros for little-endian machines
134 */
135
136#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
137
138/* The hardware supports unaligned transfers, just do the little-endian move */
139
140/* 16-bit source, 16/32/64 destination */
141
142#define ACPI_MOVE_16_TO_16(d, s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
143#define ACPI_MOVE_16_TO_32(d, s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
144#define ACPI_MOVE_16_TO_64(d, s) *(u64 *)(void *)(d) = *(u16 *)(void *)(s)
145
146/* 32-bit source, 16/32/64 destination */
147
148#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
149#define ACPI_MOVE_32_TO_32(d, s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
150#define ACPI_MOVE_32_TO_64(d, s) *(u64 *)(void *)(d) = *(u32 *)(void *)(s)
151
152/* 64-bit source, 16/32/64 destination */
153
154#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
155#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
156#define ACPI_MOVE_64_TO_64(d, s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
157
158#else
159/*
160 * The hardware does not support unaligned transfers. We must move the
161 * data one byte at a time. These macros work whether the source or
162 * the destination (or both) is/are unaligned. (Little-endian move)
163 */
164
165/* 16-bit source, 16/32/64 destination */
166
167#define ACPI_MOVE_16_TO_16(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
168 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];}
169
170#define ACPI_MOVE_16_TO_32(d, s) {(*(u32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
171#define ACPI_MOVE_16_TO_64(d, s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
172
173/* 32-bit source, 16/32/64 destination */
174
175#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
176
177#define ACPI_MOVE_32_TO_32(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
178 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
179 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
180 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];}
181
182#define ACPI_MOVE_32_TO_64(d, s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d, s);}
183
184/* 64-bit source, 16/32/64 destination */
185
186#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
187#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
188#define ACPI_MOVE_64_TO_64(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
189 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
190 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
191 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\
192 (( u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[4];\
193 (( u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[5];\
194 (( u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[6];\
195 (( u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[7];}
196#endif
197#endif
198
199/* Macros based on machine integer width */
200
201#if ACPI_MACHINE_WIDTH == 32
202#define ACPI_MOVE_SIZE_TO_16(d, s) ACPI_MOVE_32_TO_16(d, s)
203
204#elif ACPI_MACHINE_WIDTH == 64
205#define ACPI_MOVE_SIZE_TO_16(d, s) ACPI_MOVE_64_TO_16(d, s)
206
207#else
208#error unknown ACPI_MACHINE_WIDTH
209#endif
210
211/*
212 * Fast power-of-two math macros for non-optimized compilers
213 */
214#define _ACPI_DIV(value, power_of2) ((u32) ((value) >> (power_of2)))
215#define _ACPI_MUL(value, power_of2) ((u32) ((value) << (power_of2)))
216#define _ACPI_MOD(value, divisor) ((u32) ((value) & ((divisor) -1)))
217
218#define ACPI_DIV_2(a) _ACPI_DIV(a, 1)
219#define ACPI_MUL_2(a) _ACPI_MUL(a, 1)
220#define ACPI_MOD_2(a) _ACPI_MOD(a, 2)
221
222#define ACPI_DIV_4(a) _ACPI_DIV(a, 2)
223#define ACPI_MUL_4(a) _ACPI_MUL(a, 2)
224#define ACPI_MOD_4(a) _ACPI_MOD(a, 4)
225
226#define ACPI_DIV_8(a) _ACPI_DIV(a, 3)
227#define ACPI_MUL_8(a) _ACPI_MUL(a, 3)
228#define ACPI_MOD_8(a) _ACPI_MOD(a, 8)
229
230#define ACPI_DIV_16(a) _ACPI_DIV(a, 4)
231#define ACPI_MUL_16(a) _ACPI_MUL(a, 4)
232#define ACPI_MOD_16(a) _ACPI_MOD(a, 16)
233
234#define ACPI_DIV_32(a) _ACPI_DIV(a, 5)
235#define ACPI_MUL_32(a) _ACPI_MUL(a, 5)
236#define ACPI_MOD_32(a) _ACPI_MOD(a, 32)
237
238/*
239 * Rounding macros (Power of two boundaries only)
240 */
241#define ACPI_ROUND_DOWN(value, boundary) (((acpi_size)(value)) & \
242 (~(((acpi_size) boundary)-1)))
243
244#define ACPI_ROUND_UP(value, boundary) ((((acpi_size)(value)) + \
245 (((acpi_size) boundary)-1)) & \
246 (~(((acpi_size) boundary)-1)))
247
248/* Note: sizeof(acpi_size) evaluates to either 4 or 8 (32- vs 64-bit mode) */
249
250#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a, 4)
251#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a, 8)
252#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a, sizeof(acpi_size))
253
254#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a, 4)
255#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a, 8)
256#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a, sizeof(acpi_size))
257
258#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
259#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
260
261#define ACPI_ROUND_UP_TO_1K(a) (((a) + 1023) >> 10)
262
263/* Generic (non-power-of-two) rounding */
264
265#define ACPI_ROUND_UP_TO(value, boundary) (((value) + ((boundary)-1)) / (boundary))
266
267#define ACPI_IS_MISALIGNED(value) (((acpi_size) value) & (sizeof(acpi_size)-1))
268
269/*
270 * Bitmask creation
271 * Bit positions start at zero.
272 * MASK_BITS_ABOVE creates a mask starting AT the position and above
273 * MASK_BITS_BELOW creates a mask starting one bit BELOW the position
274 */
275#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position))))
276#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position)))
277
278/* Bitfields within ACPI registers */
279
280#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask)
281#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask)
282
283#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask))
284
285/*
286 * An struct acpi_namespace_node can appear in some contexts
287 * where a pointer to an union acpi_operand_object can also
288 * appear. This macro is used to distinguish them.
289 *
290 * The "Descriptor" field is the first field in both structures.
291 */
292#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type)
293#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t)
294
295/* Macro to test the object type */
296
297#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type)
298
299/*
300 * Macros for the master AML opcode table
301 */
302#if defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
303#define ACPI_OP(name, Pargs, Iargs, obj_type, class, type, flags) \
304 {name, (u32)(Pargs), (u32)(Iargs), (u32)(flags), obj_type, class, type}
305#else
306#define ACPI_OP(name, Pargs, Iargs, obj_type, class, type, flags) \
307 {(u32)(Pargs), (u32)(Iargs), (u32)(flags), obj_type, class, type}
308#endif
309
310#define ARG_TYPE_WIDTH 5
311#define ARG_1(x) ((u32)(x))
312#define ARG_2(x) ((u32)(x) << (1 * ARG_TYPE_WIDTH))
313#define ARG_3(x) ((u32)(x) << (2 * ARG_TYPE_WIDTH))
314#define ARG_4(x) ((u32)(x) << (3 * ARG_TYPE_WIDTH))
315#define ARG_5(x) ((u32)(x) << (4 * ARG_TYPE_WIDTH))
316#define ARG_6(x) ((u32)(x) << (5 * ARG_TYPE_WIDTH))
317
318#define ARGI_LIST1(a) (ARG_1(a))
319#define ARGI_LIST2(a, b) (ARG_1(b)|ARG_2(a))
320#define ARGI_LIST3(a, b, c) (ARG_1(c)|ARG_2(b)|ARG_3(a))
321#define ARGI_LIST4(a, b, c, d) (ARG_1(d)|ARG_2(c)|ARG_3(b)|ARG_4(a))
322#define ARGI_LIST5(a, b, c, d, e) (ARG_1(e)|ARG_2(d)|ARG_3(c)|ARG_4(b)|ARG_5(a))
323#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))
324
325#define ARGP_LIST1(a) (ARG_1(a))
326#define ARGP_LIST2(a, b) (ARG_1(a)|ARG_2(b))
327#define ARGP_LIST3(a, b, c) (ARG_1(a)|ARG_2(b)|ARG_3(c))
328#define ARGP_LIST4(a, b, c, d) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d))
329#define ARGP_LIST5(a, b, c, d, e) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e))
330#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))
331
332#define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F))
333#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH))
334
335/*
336 * Ascii error messages can be configured out
337 */
338#ifndef ACPI_NO_ERROR_MESSAGES
339
340/*
341 * Error reporting. Callers module and line number are inserted by AE_INFO,
342 * the plist contains a set of parens to allow variable-length lists.
343 * These macros are used for both the debug and non-debug versions of the code.
344 */
345#define ACPI_ERROR_NAMESPACE(s, e) acpi_ns_report_error (AE_INFO, s, e);
346#define ACPI_ERROR_METHOD(s, n, p, e) acpi_ns_report_method_error (AE_INFO, s, n, p, e);
347
348#else
349
350/* No error messages */
351
352#define ACPI_ERROR_NAMESPACE(s, e)
353#define ACPI_ERROR_METHOD(s, n, p, e)
354#endif /* ACPI_NO_ERROR_MESSAGES */
355
356/*
357 * Debug macros that are conditionally compiled
358 */
359#ifdef ACPI_DEBUG_OUTPUT
360
361/*
362 * Function entry tracing
363 */
364#ifdef CONFIG_ACPI_DEBUG_FUNC_TRACE
365
366#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \
367 acpi_ut_trace(ACPI_DEBUG_PARAMETERS)
368#define ACPI_FUNCTION_TRACE_PTR(a, b) ACPI_FUNCTION_NAME(a) \
369 acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS, (void *)b)
370#define ACPI_FUNCTION_TRACE_U32(a, b) ACPI_FUNCTION_NAME(a) \
371 acpi_ut_trace_u32(ACPI_DEBUG_PARAMETERS, (u32)b)
372#define ACPI_FUNCTION_TRACE_STR(a, b) ACPI_FUNCTION_NAME(a) \
373 acpi_ut_trace_str(ACPI_DEBUG_PARAMETERS, (char *)b)
374
375#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr()
376
377/*
378 * Function exit tracing.
379 * WARNING: These macros include a return statement. This is usually considered
380 * bad form, but having a separate exit macro is very ugly and difficult to maintain.
381 * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros
382 * so that "_AcpiFunctionName" is defined.
383 *
384 * Note: the DO_WHILE0 macro is used to prevent some compilers from complaining
385 * about these constructs.
386 */
387#ifdef ACPI_USE_DO_WHILE_0
388#define ACPI_DO_WHILE0(a) do a while(0)
389#else
390#define ACPI_DO_WHILE0(a) a
391#endif
392
393#define return_VOID ACPI_DO_WHILE0 ({ \
394 acpi_ut_exit (ACPI_DEBUG_PARAMETERS); \
395 return;})
396/*
397 * There are two versions of most of the return macros. The default version is
398 * safer, since it avoids side-effects by guaranteeing that the argument will
399 * not be evaluated twice.
400 *
401 * A less-safe version of the macros is provided for optional use if the
402 * compiler uses excessive CPU stack (for example, this may happen in the
403 * debug case if code optimzation is disabled.)
404 */
405#ifndef ACPI_SIMPLE_RETURN_MACROS
406
407#define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({ \
408 register acpi_status _s = (s); \
409 acpi_ut_status_exit (ACPI_DEBUG_PARAMETERS, _s); \
410 return (_s); })
411#define return_PTR(s) ACPI_DO_WHILE0 ({ \
412 register void *_s = (void *) (s); \
413 acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) _s); \
414 return (_s); })
415#define return_VALUE(s) ACPI_DO_WHILE0 ({ \
416 register acpi_integer _s = (s); \
417 acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, _s); \
418 return (_s); })
419#define return_UINT8(s) ACPI_DO_WHILE0 ({ \
420 register u8 _s = (u8) (s); \
421 acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \
422 return (_s); })
423#define return_UINT32(s) ACPI_DO_WHILE0 ({ \
424 register u32 _s = (u32) (s); \
425 acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \
426 return (_s); })
427#else /* Use original less-safe macros */
428
429#define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({ \
430 acpi_ut_status_exit (ACPI_DEBUG_PARAMETERS, (s)); \
431 return((s)); })
432#define return_PTR(s) ACPI_DO_WHILE0 ({ \
433 acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) (s)); \
434 return((s)); })
435#define return_VALUE(s) ACPI_DO_WHILE0 ({ \
436 acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) (s)); \
437 return((s)); })
438#define return_UINT8(s) return_VALUE(s)
439#define return_UINT32(s) return_VALUE(s)
440
441#endif /* ACPI_SIMPLE_RETURN_MACROS */
442
443#else /* !CONFIG_ACPI_DEBUG_FUNC_TRACE */
444
445#define ACPI_FUNCTION_TRACE(a)
446#define ACPI_FUNCTION_TRACE_PTR(a,b)
447#define ACPI_FUNCTION_TRACE_U32(a,b)
448#define ACPI_FUNCTION_TRACE_STR(a,b)
449#define ACPI_FUNCTION_EXIT
450#define ACPI_FUNCTION_STATUS_EXIT(s)
451#define ACPI_FUNCTION_VALUE_EXIT(s)
452#define ACPI_FUNCTION_TRACE(a)
453#define ACPI_FUNCTION_ENTRY()
454
455#define return_VOID return
456#define return_ACPI_STATUS(s) return(s)
457#define return_VALUE(s) return(s)
458#define return_UINT8(s) return(s)
459#define return_UINT32(s) return(s)
460#define return_PTR(s) return(s)
461
462#endif /* CONFIG_ACPI_DEBUG_FUNC_TRACE */
463
464/* Conditional execution */
465
466#define ACPI_DEBUG_EXEC(a) a
467#define ACPI_NORMAL_EXEC(a)
468
469#define ACPI_DEBUG_DEFINE(a) a;
470#define ACPI_DEBUG_ONLY_MEMBERS(a) a;
471#define _VERBOSE_STRUCTURES
472
473/* Stack and buffer dumping */
474
475#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a), 0)
476#define ACPI_DUMP_OPERANDS(a, b, c) acpi_ex_dump_operands(a, b, c)
477
478#define ACPI_DUMP_ENTRY(a, b) acpi_ns_dump_entry (a, b)
479#define ACPI_DUMP_PATHNAME(a, b, c, d) acpi_ns_dump_pathname(a, b, c, d)
480#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a)
481#define ACPI_DUMP_BUFFER(a, b) acpi_ut_dump_buffer((u8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT)
482
483#else
484/*
485 * This is the non-debug case -- make everything go away,
486 * leaving no executable debug code!
487 */
488#define ACPI_DEBUG_EXEC(a)
489#define ACPI_NORMAL_EXEC(a) a;
490
491#define ACPI_DEBUG_DEFINE(a) do { } while(0)
492#define ACPI_DEBUG_ONLY_MEMBERS(a) do { } while(0)
493#define ACPI_FUNCTION_TRACE(a) do { } while(0)
494#define ACPI_FUNCTION_TRACE_PTR(a, b) do { } while(0)
495#define ACPI_FUNCTION_TRACE_U32(a, b) do { } while(0)
496#define ACPI_FUNCTION_TRACE_STR(a, b) do { } while(0)
497#define ACPI_FUNCTION_EXIT do { } while(0)
498#define ACPI_FUNCTION_STATUS_EXIT(s) do { } while(0)
499#define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0)
500#define ACPI_FUNCTION_ENTRY() do { } while(0)
501#define ACPI_DUMP_STACK_ENTRY(a) do { } while(0)
502#define ACPI_DUMP_OPERANDS(a, b, c) do { } while(0)
503#define ACPI_DUMP_ENTRY(a, b) do { } while(0)
504#define ACPI_DUMP_TABLES(a, b) do { } while(0)
505#define ACPI_DUMP_PATHNAME(a, b, c, d) do { } while(0)
506#define ACPI_DUMP_RESOURCE_LIST(a) do { } while(0)
507#define ACPI_DUMP_BUFFER(a, b) do { } while(0)
508
509#define return_VOID return
510#define return_ACPI_STATUS(s) return(s)
511#define return_VALUE(s) return(s)
512#define return_UINT8(s) return(s)
513#define return_UINT32(s) return(s)
514#define return_PTR(s) return(s)
515
516#endif /* ACPI_DEBUG_OUTPUT */
517
518/*
519 * Some code only gets executed when the debugger is built in.
520 * Note that this is entirely independent of whether the
521 * DEBUG_PRINT stuff (set by ACPI_DEBUG_OUTPUT) is on, or not.
522 */
523#ifdef ACPI_DEBUGGER
524#define ACPI_DEBUGGER_EXEC(a) a
525#else
526#define ACPI_DEBUGGER_EXEC(a)
527#endif
528
529#ifdef ACPI_DEBUG_OUTPUT
530/*
531 * 1) Set name to blanks
532 * 2) Copy the object name
533 */
534#define ACPI_ADD_OBJECT_NAME(a,b) ACPI_MEMSET (a->common.name, ' ', sizeof (a->common.name));\
535 ACPI_STRNCPY (a->common.name, acpi_gbl_ns_type_names[b], sizeof (a->common.name))
536#else
537
538#define ACPI_ADD_OBJECT_NAME(a,b)
539#endif
540
541/*
542 * Memory allocation tracking (DEBUG ONLY)
543 */
544#define ACPI_MEM_PARAMETERS _COMPONENT, _acpi_module_name, __LINE__
545
546#ifndef ACPI_DBG_TRACK_ALLOCATIONS
547
548/* Memory allocation */
549
550#ifndef ACPI_ALLOCATE
551#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a), ACPI_MEM_PARAMETERS)
552#endif
553#ifndef ACPI_ALLOCATE_ZEROED
554#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), ACPI_MEM_PARAMETERS)
555#endif
556#ifndef ACPI_FREE
557#define ACPI_FREE(a) acpio_os_free(a)
558#endif
559#define ACPI_MEM_TRACKING(a)
560
561#else
562
563/* Memory allocation */
564
565#define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a), ACPI_MEM_PARAMETERS)
566#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size)(a), ACPI_MEM_PARAMETERS)
567#define ACPI_FREE(a) acpi_ut_free_and_track(a, ACPI_MEM_PARAMETERS)
568#define ACPI_MEM_TRACKING(a) a
569
570#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
571
572/* Preemption point */
573#ifndef ACPI_PREEMPTION_POINT
574#define ACPI_PREEMPTION_POINT() /* no preemption */
575#endif
576
577#endif /* ACMACROS_H */
diff --git a/drivers/acpi/acpica/acnamesp.h b/drivers/acpi/acpica/acnamesp.h
new file mode 100644
index 000000000000..46cb5b46d280
--- /dev/null
+++ b/drivers/acpi/acpica/acnamesp.h
@@ -0,0 +1,324 @@
1/******************************************************************************
2 *
3 * Name: acnamesp.h - Namespace subcomponent prototypes and defines
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACNAMESP_H__
45#define __ACNAMESP_H__
46
47/* To search the entire name space, pass this as search_base */
48
49#define ACPI_NS_ALL ((acpi_handle)0)
50
51/*
52 * Elements of acpi_ns_properties are bit significant
53 * and should be one-to-one with values of acpi_object_type
54 */
55#define ACPI_NS_NORMAL 0
56#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */
57#define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */
58
59/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */
60
61#define ACPI_NS_NO_UPSEARCH 0
62#define ACPI_NS_SEARCH_PARENT 0x01
63#define ACPI_NS_DONT_OPEN_SCOPE 0x02
64#define ACPI_NS_NO_PEER_SEARCH 0x04
65#define ACPI_NS_ERROR_IF_FOUND 0x08
66#define ACPI_NS_PREFIX_IS_SCOPE 0x10
67#define ACPI_NS_EXTERNAL 0x20
68#define ACPI_NS_TEMPORARY 0x40
69
70/* Flags for acpi_ns_walk_namespace */
71
72#define ACPI_NS_WALK_NO_UNLOCK 0
73#define ACPI_NS_WALK_UNLOCK 0x01
74#define ACPI_NS_WALK_TEMP_NODES 0x02
75
76/*
77 * nsinit - Namespace initialization
78 */
79acpi_status acpi_ns_initialize_objects(void);
80
81acpi_status acpi_ns_initialize_devices(void);
82
83/*
84 * nsload - Namespace loading
85 */
86acpi_status acpi_ns_load_namespace(void);
87
88acpi_status
89acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node);
90
91/*
92 * nswalk - walk the namespace
93 */
94acpi_status
95acpi_ns_walk_namespace(acpi_object_type type,
96 acpi_handle start_object,
97 u32 max_depth,
98 u32 flags,
99 acpi_walk_callback user_function,
100 void *context, void **return_value);
101
102struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, struct acpi_namespace_node
103 *parent, struct acpi_namespace_node
104 *child);
105
106/*
107 * nsparse - table parsing
108 */
109acpi_status
110acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node);
111
112acpi_status
113acpi_ns_one_complete_parse(u32 pass_number,
114 u32 table_index,
115 struct acpi_namespace_node *start_node);
116
117/*
118 * nsaccess - Top-level namespace access
119 */
120acpi_status acpi_ns_root_initialize(void);
121
122acpi_status
123acpi_ns_lookup(union acpi_generic_state *scope_info,
124 char *name,
125 acpi_object_type type,
126 acpi_interpreter_mode interpreter_mode,
127 u32 flags,
128 struct acpi_walk_state *walk_state,
129 struct acpi_namespace_node **ret_node);
130
131/*
132 * nsalloc - Named object allocation/deallocation
133 */
134struct acpi_namespace_node *acpi_ns_create_node(u32 name);
135
136void acpi_ns_delete_node(struct acpi_namespace_node *node);
137
138void
139acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_handle);
140
141void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id);
142
143void acpi_ns_detach_object(struct acpi_namespace_node *node);
144
145void acpi_ns_delete_children(struct acpi_namespace_node *parent);
146
147int acpi_ns_compare_names(char *name1, char *name2);
148
149/*
150 * nsdump - Namespace dump/print utilities
151 */
152#ifdef ACPI_FUTURE_USAGE
153void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth);
154#endif /* ACPI_FUTURE_USAGE */
155
156void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level);
157
158void
159acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component);
160
161void acpi_ns_print_pathname(u32 num_segments, char *pathname);
162
163acpi_status
164acpi_ns_dump_one_object(acpi_handle obj_handle,
165 u32 level, void *context, void **return_value);
166
167#ifdef ACPI_FUTURE_USAGE
168void
169acpi_ns_dump_objects(acpi_object_type type,
170 u8 display_type,
171 u32 max_depth,
172 acpi_owner_id owner_id, acpi_handle start_handle);
173#endif /* ACPI_FUTURE_USAGE */
174
175/*
176 * nseval - Namespace evaluation functions
177 */
178acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
179
180/*
181 * nspredef - Support for predefined/reserved names
182 */
183acpi_status
184acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
185 u32 user_param_count,
186 acpi_status return_status,
187 union acpi_operand_object **return_object);
188
189const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct
190 acpi_namespace_node
191 *node);
192
193void
194acpi_ns_check_parameter_count(char *pathname,
195 struct acpi_namespace_node *node,
196 u32 user_param_count,
197 const union acpi_predefined_info *info);
198
199/*
200 * nsnames - Name and Scope manipulation
201 */
202u32 acpi_ns_opens_scope(acpi_object_type type);
203
204acpi_status
205acpi_ns_build_external_path(struct acpi_namespace_node *node,
206 acpi_size size, char *name_buffer);
207
208char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);
209
210char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
211
212acpi_status
213acpi_ns_handle_to_pathname(acpi_handle target_handle,
214 struct acpi_buffer *buffer);
215
216u8
217acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);
218
219acpi_status
220acpi_ns_get_node(struct acpi_namespace_node *prefix_node,
221 const char *external_pathname,
222 u32 flags, struct acpi_namespace_node **out_node);
223
224acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node);
225
226/*
227 * nsobject - Object management for namespace nodes
228 */
229acpi_status
230acpi_ns_attach_object(struct acpi_namespace_node *node,
231 union acpi_operand_object *object, acpi_object_type type);
232
233union acpi_operand_object *acpi_ns_get_attached_object(struct
234 acpi_namespace_node
235 *node);
236
237union acpi_operand_object *acpi_ns_get_secondary_object(union
238 acpi_operand_object
239 *obj_desc);
240
241acpi_status
242acpi_ns_attach_data(struct acpi_namespace_node *node,
243 acpi_object_handler handler, void *data);
244
245acpi_status
246acpi_ns_detach_data(struct acpi_namespace_node *node,
247 acpi_object_handler handler);
248
249acpi_status
250acpi_ns_get_attached_data(struct acpi_namespace_node *node,
251 acpi_object_handler handler, void **data);
252
253/*
254 * nssearch - Namespace searching and entry
255 */
256acpi_status
257acpi_ns_search_and_enter(u32 entry_name,
258 struct acpi_walk_state *walk_state,
259 struct acpi_namespace_node *node,
260 acpi_interpreter_mode interpreter_mode,
261 acpi_object_type type,
262 u32 flags, struct acpi_namespace_node **ret_node);
263
264acpi_status
265acpi_ns_search_one_scope(u32 entry_name,
266 struct acpi_namespace_node *node,
267 acpi_object_type type,
268 struct acpi_namespace_node **ret_node);
269
270void
271acpi_ns_install_node(struct acpi_walk_state *walk_state,
272 struct acpi_namespace_node *parent_node,
273 struct acpi_namespace_node *node, acpi_object_type type);
274
275/*
276 * nsutils - Utility functions
277 */
278u8 acpi_ns_valid_root_prefix(char prefix);
279
280acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node);
281
282u32 acpi_ns_local(acpi_object_type type);
283
284void
285acpi_ns_report_error(const char *module_name,
286 u32 line_number,
287 const char *internal_name, acpi_status lookup_status);
288
289void
290acpi_ns_report_method_error(const char *module_name,
291 u32 line_number,
292 const char *message,
293 struct acpi_namespace_node *node,
294 const char *path, acpi_status lookup_status);
295
296void
297acpi_ns_print_node_pathname(struct acpi_namespace_node *node, const char *msg);
298
299acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info);
300
301void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info);
302
303acpi_status
304acpi_ns_internalize_name(const char *dotted_name, char **converted_name);
305
306acpi_status
307acpi_ns_externalize_name(u32 internal_name_length,
308 const char *internal_name,
309 u32 * converted_name_length, char **converted_name);
310
311struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle);
312
313acpi_handle acpi_ns_convert_entry_to_handle(struct acpi_namespace_node *node);
314
315void acpi_ns_terminate(void);
316
317struct acpi_namespace_node *acpi_ns_get_parent_node(struct acpi_namespace_node
318 *node);
319
320struct acpi_namespace_node *acpi_ns_get_next_valid_node(struct
321 acpi_namespace_node
322 *node);
323
324#endif /* __ACNAMESP_H__ */
diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h
new file mode 100644
index 000000000000..eb6f038b03d9
--- /dev/null
+++ b/drivers/acpi/acpica/acobject.h
@@ -0,0 +1,446 @@
1
2/******************************************************************************
3 *
4 * Name: acobject.h - Definition of union acpi_operand_object (Internal object only)
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 _ACOBJECT_H
46#define _ACOBJECT_H
47
48/* acpisrc:struct_defs -- for acpisrc conversion */
49
50/*
51 * The union acpi_operand_object is used to pass AML operands from the dispatcher
52 * to the interpreter, and to keep track of the various handlers such as
53 * address space handlers and notify handlers. The object is a constant
54 * size in order to allow it to be cached and reused.
55 *
56 * Note: The object is optimized to be aligned and will not work if it is
57 * byte-packed.
58 */
59#if ACPI_MACHINE_WIDTH == 64
60#pragma pack(8)
61#else
62#pragma pack(4)
63#endif
64
65/*******************************************************************************
66 *
67 * Common Descriptors
68 *
69 ******************************************************************************/
70
71/*
72 * Common area for all objects.
73 *
74 * descriptor_type is used to differentiate between internal descriptors, and
75 * must be in the same place across all descriptors
76 *
77 * Note: The descriptor_type and Type fields must appear in the identical
78 * position in both the struct acpi_namespace_node and union acpi_operand_object
79 * structures.
80 */
81#define ACPI_OBJECT_COMMON_HEADER \
82 union acpi_operand_object *next_object; /* Objects linked to parent NS node */\
83 u8 descriptor_type; /* To differentiate various internal objs */\
84 u8 type; /* acpi_object_type */\
85 u16 reference_count; /* For object deletion management */\
86 u8 flags;
87 /*
88 * Note: There are 3 bytes available here before the
89 * next natural alignment boundary (for both 32/64 cases)
90 */
91
92/* Values for Flag byte above */
93
94#define AOPOBJ_AML_CONSTANT 0x01
95#define AOPOBJ_STATIC_POINTER 0x02
96#define AOPOBJ_DATA_VALID 0x04
97#define AOPOBJ_OBJECT_INITIALIZED 0x08
98#define AOPOBJ_SETUP_COMPLETE 0x10
99#define AOPOBJ_SINGLE_DATUM 0x20
100#define AOPOBJ_INVALID 0x40 /* Used if host OS won't allow an op_region address */
101
102/******************************************************************************
103 *
104 * Basic data types
105 *
106 *****************************************************************************/
107
108struct acpi_object_common {
109ACPI_OBJECT_COMMON_HEADER};
110
111struct acpi_object_integer {
112 ACPI_OBJECT_COMMON_HEADER u8 fill[3]; /* Prevent warning on some compilers */
113 acpi_integer value;
114};
115
116/*
117 * Note: The String and Buffer object must be identical through the Pointer
118 * and length elements. There is code that depends on this.
119 *
120 * Fields common to both Strings and Buffers
121 */
122#define ACPI_COMMON_BUFFER_INFO(_type) \
123 _type *pointer; \
124 u32 length;
125
126struct acpi_object_string { /* Null terminated, ASCII characters only */
127 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(char) /* String in AML stream or allocated string */
128};
129
130struct acpi_object_buffer {
131 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(u8) /* Buffer in AML stream or allocated buffer */
132 u32 aml_length;
133 u8 *aml_start;
134 struct acpi_namespace_node *node; /* Link back to parent node */
135};
136
137struct acpi_object_package {
138 ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Link back to parent node */
139 union acpi_operand_object **elements; /* Array of pointers to acpi_objects */
140 u8 *aml_start;
141 u32 aml_length;
142 u32 count; /* # of elements in package */
143};
144
145/******************************************************************************
146 *
147 * Complex data types
148 *
149 *****************************************************************************/
150
151struct acpi_object_event {
152 ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore; /* Actual OS synchronization object */
153};
154
155struct acpi_object_mutex {
156 ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */
157 u16 acquisition_depth; /* Allow multiple Acquires, same thread */
158 acpi_mutex os_mutex; /* Actual OS synchronization object */
159 acpi_thread_id thread_id; /* Current owner of the mutex */
160 struct acpi_thread_state *owner_thread; /* Current owner of the mutex */
161 union acpi_operand_object *prev; /* Link for list of acquired mutexes */
162 union acpi_operand_object *next; /* Link for list of acquired mutexes */
163 struct acpi_namespace_node *node; /* Containing namespace node */
164 u8 original_sync_level; /* Owner's original sync level (0-15) */
165};
166
167struct acpi_object_region {
168 ACPI_OBJECT_COMMON_HEADER u8 space_id;
169 struct acpi_namespace_node *node; /* Containing namespace node */
170 union acpi_operand_object *handler; /* Handler for region access */
171 union acpi_operand_object *next;
172 acpi_physical_address address;
173 u32 length;
174};
175
176struct acpi_object_method {
177 ACPI_OBJECT_COMMON_HEADER u8 method_flags;
178 u8 param_count;
179 u8 sync_level;
180 union acpi_operand_object *mutex;
181 u8 *aml_start;
182 ACPI_INTERNAL_METHOD implementation;
183 u32 aml_length;
184 u8 thread_count;
185 acpi_owner_id owner_id;
186};
187
188/******************************************************************************
189 *
190 * Objects that can be notified. All share a common notify_info area.
191 *
192 *****************************************************************************/
193
194/*
195 * Common fields for objects that support ASL notifications
196 */
197#define ACPI_COMMON_NOTIFY_INFO \
198 union acpi_operand_object *system_notify; /* Handler for system notifies */\
199 union acpi_operand_object *device_notify; /* Handler for driver notifies */\
200 union acpi_operand_object *handler; /* Handler for Address space */
201
202struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
203ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
204
205struct acpi_object_device {
206 ACPI_OBJECT_COMMON_HEADER
207 ACPI_COMMON_NOTIFY_INFO struct acpi_gpe_block_info *gpe_block;
208};
209
210struct acpi_object_power_resource {
211 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 system_level;
212 u32 resource_order;
213};
214
215struct acpi_object_processor {
216 ACPI_OBJECT_COMMON_HEADER
217 /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */
218 u8 proc_id;
219 u8 length;
220 ACPI_COMMON_NOTIFY_INFO acpi_io_address address;
221};
222
223struct acpi_object_thermal_zone {
224ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
225
226/******************************************************************************
227 *
228 * Fields. All share a common header/info field.
229 *
230 *****************************************************************************/
231
232/*
233 * Common bitfield for the field objects
234 * "Field Datum" -- a datum from the actual field object
235 * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
236 */
237#define ACPI_COMMON_FIELD_INFO \
238 u8 field_flags; /* Access, update, and lock bits */\
239 u8 attribute; /* From access_as keyword */\
240 u8 access_byte_width; /* Read/Write size in bytes */\
241 struct acpi_namespace_node *node; /* Link back to parent node */\
242 u32 bit_length; /* Length of field in bits */\
243 u32 base_byte_offset; /* Byte offset within containing object */\
244 u32 value; /* Value to store into the Bank or Index register */\
245 u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
246 u8 access_bit_width; /* Read/Write size in bits (8-64) */
247
248struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
249 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */
250};
251
252struct acpi_object_region_field {
253 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */
254};
255
256struct acpi_object_bank_field {
257 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */
258 union acpi_operand_object *bank_obj; /* bank_select Register object */
259};
260
261struct acpi_object_index_field {
262 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO
263 /*
264 * No "RegionObj" pointer needed since the Index and Data registers
265 * are each field definitions unto themselves.
266 */
267 union acpi_operand_object *index_obj; /* Index register */
268 union acpi_operand_object *data_obj; /* Data register */
269};
270
271/* The buffer_field is different in that it is part of a Buffer, not an op_region */
272
273struct acpi_object_buffer_field {
274 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *buffer_obj; /* Containing Buffer object */
275};
276
277/******************************************************************************
278 *
279 * Objects for handlers
280 *
281 *****************************************************************************/
282
283struct acpi_object_notify_handler {
284 ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Parent device */
285 acpi_notify_handler handler;
286 void *context;
287};
288
289struct acpi_object_addr_handler {
290 ACPI_OBJECT_COMMON_HEADER u8 space_id;
291 u8 handler_flags;
292 acpi_adr_space_handler handler;
293 struct acpi_namespace_node *node; /* Parent device */
294 void *context;
295 acpi_adr_space_setup setup;
296 union acpi_operand_object *region_list; /* regions using this handler */
297 union acpi_operand_object *next;
298};
299
300/* Flags for address handler (handler_flags) */
301
302#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01
303
304/******************************************************************************
305 *
306 * Special internal objects
307 *
308 *****************************************************************************/
309
310/*
311 * The Reference object is used for these opcodes:
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.
314 */
315struct acpi_object_reference {
316 ACPI_OBJECT_COMMON_HEADER u8 class; /* Reference Class */
317 u8 target_type; /* Used for Index Op */
318 u8 reserved;
319 void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
320 struct acpi_namespace_node *node; /* ref_of or Namepath */
321 union acpi_operand_object **where; /* Target of Index */
322 u32 value; /* Used for Local/Arg/Index/ddb_handle */
323};
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
339/*
340 * Extra object is used as additional storage for types that
341 * have AML code in their declarations (term_args) that must be
342 * evaluated at run time.
343 *
344 * Currently: Region and field_unit types
345 */
346struct acpi_object_extra {
347 ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
348 void *region_context; /* Region-specific data */
349 u8 *aml_start;
350 u32 aml_length;
351};
352
353/* Additional data that can be attached to namespace nodes */
354
355struct acpi_object_data {
356 ACPI_OBJECT_COMMON_HEADER acpi_object_handler handler;
357 void *pointer;
358};
359
360/* Structure used when objects are cached for reuse */
361
362struct acpi_object_cache_list {
363 ACPI_OBJECT_COMMON_HEADER union acpi_operand_object *next; /* Link for object cache and internal lists */
364};
365
366/******************************************************************************
367 *
368 * union acpi_operand_object Descriptor - a giant union of all of the above
369 *
370 *****************************************************************************/
371
372union acpi_operand_object {
373 struct acpi_object_common common;
374 struct acpi_object_integer integer;
375 struct acpi_object_string string;
376 struct acpi_object_buffer buffer;
377 struct acpi_object_package package;
378 struct acpi_object_event event;
379 struct acpi_object_method method;
380 struct acpi_object_mutex mutex;
381 struct acpi_object_region region;
382 struct acpi_object_notify_common common_notify;
383 struct acpi_object_device device;
384 struct acpi_object_power_resource power_resource;
385 struct acpi_object_processor processor;
386 struct acpi_object_thermal_zone thermal_zone;
387 struct acpi_object_field_common common_field;
388 struct acpi_object_region_field field;
389 struct acpi_object_buffer_field buffer_field;
390 struct acpi_object_bank_field bank_field;
391 struct acpi_object_index_field index_field;
392 struct acpi_object_notify_handler notify;
393 struct acpi_object_addr_handler address_space;
394 struct acpi_object_reference reference;
395 struct acpi_object_extra extra;
396 struct acpi_object_data data;
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;
405};
406
407/******************************************************************************
408 *
409 * union acpi_descriptor - objects that share a common descriptor identifier
410 *
411 *****************************************************************************/
412
413/* Object descriptor types */
414
415#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */
416#define ACPI_DESC_TYPE_STATE 0x02
417#define ACPI_DESC_TYPE_STATE_UPDATE 0x03
418#define ACPI_DESC_TYPE_STATE_PACKAGE 0x04
419#define ACPI_DESC_TYPE_STATE_CONTROL 0x05
420#define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06
421#define ACPI_DESC_TYPE_STATE_PSCOPE 0x07
422#define ACPI_DESC_TYPE_STATE_WSCOPE 0x08
423#define ACPI_DESC_TYPE_STATE_RESULT 0x09
424#define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A
425#define ACPI_DESC_TYPE_STATE_THREAD 0x0B
426#define ACPI_DESC_TYPE_WALK 0x0C
427#define ACPI_DESC_TYPE_PARSER 0x0D
428#define ACPI_DESC_TYPE_OPERAND 0x0E
429#define ACPI_DESC_TYPE_NAMED 0x0F
430#define ACPI_DESC_TYPE_MAX 0x0F
431
432struct acpi_common_descriptor {
433 void *common_pointer;
434 u8 descriptor_type; /* To differentiate various internal objs */
435};
436
437union acpi_descriptor {
438 struct acpi_common_descriptor common;
439 union acpi_operand_object object;
440 struct acpi_namespace_node node;
441 union acpi_parse_object op;
442};
443
444#pragma pack()
445
446#endif /* _ACOBJECT_H */
diff --git a/drivers/acpi/acpica/acopcode.h b/drivers/acpi/acpica/acopcode.h
new file mode 100644
index 000000000000..dfdf63327885
--- /dev/null
+++ b/drivers/acpi/acpica/acopcode.h
@@ -0,0 +1,323 @@
1/******************************************************************************
2 *
3 * Name: acopcode.h - AML opcode information for the AML parser and interpreter
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACOPCODE_H__
45#define __ACOPCODE_H__
46
47#define MAX_EXTENDED_OPCODE 0x88
48#define NUM_EXTENDED_OPCODE (MAX_EXTENDED_OPCODE + 1)
49#define MAX_INTERNAL_OPCODE
50#define NUM_INTERNAL_OPCODE (MAX_INTERNAL_OPCODE + 1)
51
52/* Used for non-assigned opcodes */
53
54#define _UNK 0x6B
55
56/*
57 * Reserved ASCII characters. Do not use any of these for
58 * internal opcodes, since they are used to differentiate
59 * name strings from AML opcodes
60 */
61#define _ASC 0x6C
62#define _NAM 0x6C
63#define _PFX 0x6D
64
65/*
66 * All AML opcodes and the parse-time arguments for each. Used by the AML
67 * parser Each list is compressed into a 32-bit number and stored in the
68 * master opcode table (in psopcode.c).
69 */
70#define ARGP_ACCESSFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
71#define ARGP_ACQUIRE_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_WORDDATA)
72#define ARGP_ADD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
73#define ARGP_ALIAS_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_NAME)
74#define ARGP_ARG0 ARG_NONE
75#define ARGP_ARG1 ARG_NONE
76#define ARGP_ARG2 ARG_NONE
77#define ARGP_ARG3 ARG_NONE
78#define ARGP_ARG4 ARG_NONE
79#define ARGP_ARG5 ARG_NONE
80#define ARGP_ARG6 ARG_NONE
81#define ARGP_BANK_FIELD_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_TERMARG, ARGP_BYTEDATA, ARGP_FIELDLIST)
82#define ARGP_BIT_AND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
83#define ARGP_BIT_NAND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
84#define ARGP_BIT_NOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
85#define ARGP_BIT_NOT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
86#define ARGP_BIT_OR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
87#define ARGP_BIT_XOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
88#define ARGP_BREAK_OP ARG_NONE
89#define ARGP_BREAK_POINT_OP ARG_NONE
90#define ARGP_BUFFER_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_BYTELIST)
91#define ARGP_BYTE_OP ARGP_LIST1 (ARGP_BYTEDATA)
92#define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING)
93#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
94#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
95#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
96#define ARGP_CONTINUE_OP ARG_NONE
97#define ARGP_COPY_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SIMPLENAME)
98#define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
99#define ARGP_CREATE_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
100#define ARGP_CREATE_DWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
101#define ARGP_CREATE_FIELD_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
102#define ARGP_CREATE_QWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
103#define ARGP_CREATE_WORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
104#define ARGP_DATA_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
105#define ARGP_DEBUG_OP ARG_NONE
106#define ARGP_DECREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME)
107#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_TERMARG)
108#define ARGP_DEVICE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST)
109#define ARGP_DIVIDE_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET, ARGP_TARGET)
110#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
111#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
112#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
113#define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG)
114#define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST)
115#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
116#define ARGP_FIND_SET_RIGHT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
117#define ARGP_FROM_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
118#define ARGP_IF_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
119#define ARGP_INCREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME)
120#define ARGP_INDEX_FIELD_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_BYTEDATA, ARGP_FIELDLIST)
121#define ARGP_INDEX_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
122#define ARGP_LAND_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
123#define ARGP_LEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
124#define ARGP_LGREATER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
125#define ARGP_LGREATEREQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
126#define ARGP_LLESS_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
127#define ARGP_LLESSEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
128#define ARGP_LNOT_OP ARGP_LIST1 (ARGP_TERMARG)
129#define ARGP_LNOTEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
130#define ARGP_LOAD_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_SUPERNAME)
131#define ARGP_LOAD_TABLE_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
132#define ARGP_LOCAL0 ARG_NONE
133#define ARGP_LOCAL1 ARG_NONE
134#define ARGP_LOCAL2 ARG_NONE
135#define ARGP_LOCAL3 ARG_NONE
136#define ARGP_LOCAL4 ARG_NONE
137#define ARGP_LOCAL5 ARG_NONE
138#define ARGP_LOCAL6 ARG_NONE
139#define ARGP_LOCAL7 ARG_NONE
140#define ARGP_LOR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
141#define ARGP_MATCH_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG)
142#define ARGP_METHOD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMLIST)
143#define ARGP_METHODCALL_OP ARGP_LIST1 (ARGP_NAMESTRING)
144#define ARGP_MID_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
145#define ARGP_MOD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
146#define ARGP_MULTIPLY_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
147#define ARGP_MUTEX_OP ARGP_LIST2 (ARGP_NAME, ARGP_BYTEDATA)
148#define ARGP_NAME_OP ARGP_LIST2 (ARGP_NAME, ARGP_DATAOBJ)
149#define ARGP_NAMEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
150#define ARGP_NAMEPATH_OP ARGP_LIST1 (ARGP_NAMESTRING)
151#define ARGP_NOOP_OP ARG_NONE
152#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
153#define ARGP_ONE_OP ARG_NONE
154#define ARGP_ONES_OP ARG_NONE
155#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST)
156#define ARGP_POWER_RES_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_WORDDATA, ARGP_OBJLIST)
157#define ARGP_PROCESSOR_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_BYTEDATA, ARGP_OBJLIST)
158#define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA)
159#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
160#define ARGP_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG)
161#define ARGP_RELEASE_OP ARGP_LIST1 (ARGP_SUPERNAME)
162#define ARGP_RESERVEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
163#define ARGP_RESET_OP ARGP_LIST1 (ARGP_SUPERNAME)
164#define ARGP_RETURN_OP ARGP_LIST1 (ARGP_TERMARG)
165#define ARGP_REVISION_OP ARG_NONE
166#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST)
167#define ARGP_SHIFT_LEFT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
168#define ARGP_SHIFT_RIGHT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
169#define ARGP_SIGNAL_OP ARGP_LIST1 (ARGP_SUPERNAME)
170#define ARGP_SIZE_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
171#define ARGP_SLEEP_OP ARGP_LIST1 (ARGP_TERMARG)
172#define ARGP_STALL_OP ARGP_LIST1 (ARGP_TERMARG)
173#define ARGP_STATICSTRING_OP ARGP_LIST1 (ARGP_NAMESTRING)
174#define ARGP_STORE_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SUPERNAME)
175#define ARGP_STRING_OP ARGP_LIST1 (ARGP_CHARLIST)
176#define ARGP_SUBTRACT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
177#define ARGP_THERMAL_ZONE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST)
178#define ARGP_TIMER_OP ARG_NONE
179#define ARGP_TO_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
180#define ARGP_TO_BUFFER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
181#define ARGP_TO_DEC_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
182#define ARGP_TO_HEX_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
183#define ARGP_TO_INTEGER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
184#define ARGP_TO_STRING_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
185#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME)
186#define ARGP_UNLOAD_OP ARGP_LIST1 (ARGP_SUPERNAME)
187#define ARGP_VAR_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_DATAOBJLIST)
188#define ARGP_WAIT_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
189#define ARGP_WHILE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
190#define ARGP_WORD_OP ARGP_LIST1 (ARGP_WORDDATA)
191#define ARGP_ZERO_OP ARG_NONE
192
193/*
194 * All AML opcodes and the runtime arguments for each. Used by the AML
195 * interpreter Each list is compressed into a 32-bit number and stored
196 * in the master opcode table (in psopcode.c).
197 *
198 * (Used by prep_operands procedure and the ASL Compiler)
199 */
200#define ARGI_ACCESSFIELD_OP ARGI_INVALID_OPCODE
201#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_INTEGER)
202#define ARGI_ADD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
203#define ARGI_ALIAS_OP ARGI_INVALID_OPCODE
204#define ARGI_ARG0 ARG_NONE
205#define ARGI_ARG1 ARG_NONE
206#define ARGI_ARG2 ARG_NONE
207#define ARGI_ARG3 ARG_NONE
208#define ARGI_ARG4 ARG_NONE
209#define ARGI_ARG5 ARG_NONE
210#define ARGI_ARG6 ARG_NONE
211#define ARGI_BANK_FIELD_OP ARGI_INVALID_OPCODE
212#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
213#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
214#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
215#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
216#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
217#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
218#define ARGI_BREAK_OP ARG_NONE
219#define ARGI_BREAK_POINT_OP ARG_NONE
220#define ARGI_BUFFER_OP ARGI_LIST1 (ARGI_INTEGER)
221#define ARGI_BYTE_OP ARGI_INVALID_OPCODE
222#define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE
223#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
224#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF)
225#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
226#define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE
227#define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET)
228#define ARGI_CREATE_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
229#define ARGI_CREATE_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
230#define ARGI_CREATE_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
231#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_INTEGER, ARGI_INTEGER, ARGI_REFERENCE)
232#define ARGI_CREATE_QWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
233#define ARGI_CREATE_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
234#define ARGI_DATA_REGION_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_STRING)
235#define ARGI_DEBUG_OP ARG_NONE
236#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_TARGETREF)
237#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REF_OR_STRING)
238#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE
239#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF, ARGI_TARGETREF)
240#define ARGI_DWORD_OP ARGI_INVALID_OPCODE
241#define ARGI_ELSE_OP ARGI_INVALID_OPCODE
242#define ARGI_EVENT_OP ARGI_INVALID_OPCODE
243#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
244#define ARGI_FIELD_OP ARGI_INVALID_OPCODE
245#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
246#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
247#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET)
248#define ARGI_IF_OP ARGI_INVALID_OPCODE
249#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_TARGETREF)
250#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE
251#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER, ARGI_TARGETREF)
252#define ARGI_LAND_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
253#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
254#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
255#define ARGI_LGREATEREQUAL_OP ARGI_INVALID_OPCODE
256#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
257#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE
258#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER)
259#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE
260#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION_OR_BUFFER,ARGI_TARGETREF)
261#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_ANYTYPE)
262#define ARGI_LOCAL0 ARG_NONE
263#define ARGI_LOCAL1 ARG_NONE
264#define ARGI_LOCAL2 ARG_NONE
265#define ARGI_LOCAL3 ARG_NONE
266#define ARGI_LOCAL4 ARG_NONE
267#define ARGI_LOCAL5 ARG_NONE
268#define ARGI_LOCAL6 ARG_NONE
269#define ARGI_LOCAL7 ARG_NONE
270#define ARGI_LOR_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
271#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_COMPUTEDATA, ARGI_INTEGER,ARGI_COMPUTEDATA,ARGI_INTEGER)
272#define ARGI_METHOD_OP ARGI_INVALID_OPCODE
273#define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE
274#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFER_OR_STRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
275#define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
276#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
277#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE
278#define ARGI_NAME_OP ARGI_INVALID_OPCODE
279#define ARGI_NAMEDFIELD_OP ARGI_INVALID_OPCODE
280#define ARGI_NAMEPATH_OP ARGI_INVALID_OPCODE
281#define ARGI_NOOP_OP ARG_NONE
282#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER)
283#define ARGI_ONE_OP ARG_NONE
284#define ARGI_ONES_OP ARG_NONE
285#define ARGI_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
286#define ARGI_POWER_RES_OP ARGI_INVALID_OPCODE
287#define ARGI_PROCESSOR_OP ARGI_INVALID_OPCODE
288#define ARGI_QWORD_OP ARGI_INVALID_OPCODE
289#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_OBJECT_REF)
290#define ARGI_REGION_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
291#define ARGI_RELEASE_OP ARGI_LIST1 (ARGI_MUTEX)
292#define ARGI_RESERVEDFIELD_OP ARGI_INVALID_OPCODE
293#define ARGI_RESET_OP ARGI_LIST1 (ARGI_EVENT)
294#define ARGI_RETURN_OP ARGI_INVALID_OPCODE
295#define ARGI_REVISION_OP ARG_NONE
296#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE
297#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
298#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
299#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT)
300#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_DATAOBJECT)
301#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_INTEGER)
302#define ARGI_STALL_OP ARGI_LIST1 (ARGI_INTEGER)
303#define ARGI_STATICSTRING_OP ARGI_INVALID_OPCODE
304#define ARGI_STORE_OP ARGI_LIST2 (ARGI_DATAREFOBJ, ARGI_TARGETREF)
305#define ARGI_STRING_OP ARGI_INVALID_OPCODE
306#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
307#define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE
308#define ARGI_TIMER_OP ARG_NONE
309#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET)
310#define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
311#define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
312#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
313#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
314#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET)
315#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
316#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE)
317#define ARGI_VAR_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
318#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER)
319#define ARGI_WHILE_OP ARGI_INVALID_OPCODE
320#define ARGI_WORD_OP ARGI_INVALID_OPCODE
321#define ARGI_ZERO_OP ARG_NONE
322
323#endif /* __ACOPCODE_H__ */
diff --git a/drivers/acpi/acpica/acparser.h b/drivers/acpi/acpica/acparser.h
new file mode 100644
index 000000000000..23ee0fbf5619
--- /dev/null
+++ b/drivers/acpi/acpica/acparser.h
@@ -0,0 +1,234 @@
1/******************************************************************************
2 *
3 * Module Name: acparser.h - AML Parser subcomponent prototypes and defines
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACPARSER_H__
45#define __ACPARSER_H__
46
47#define OP_HAS_RETURN_VALUE 1
48
49/* Variable number of arguments. This field must be 32 bits */
50
51#define ACPI_VAR_ARGS ACPI_UINT32_MAX
52
53#define ACPI_PARSE_DELETE_TREE 0x0001
54#define ACPI_PARSE_NO_TREE_DELETE 0x0000
55#define ACPI_PARSE_TREE_MASK 0x0001
56
57#define ACPI_PARSE_LOAD_PASS1 0x0010
58#define ACPI_PARSE_LOAD_PASS2 0x0020
59#define ACPI_PARSE_EXECUTE 0x0030
60#define ACPI_PARSE_MODE_MASK 0x0030
61
62#define ACPI_PARSE_DEFERRED_OP 0x0100
63#define ACPI_PARSE_DISASSEMBLE 0x0200
64
65/******************************************************************************
66 *
67 * Parser interfaces
68 *
69 *****************************************************************************/
70
71/*
72 * psxface - Parser external interfaces
73 */
74acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info);
75
76/*
77 * psargs - Parse AML opcode arguments
78 */
79u8 *acpi_ps_get_next_package_end(struct acpi_parse_state *parser_state);
80
81char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state);
82
83void
84acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state,
85 u32 arg_type, union acpi_parse_object *arg);
86
87acpi_status
88acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
89 struct acpi_parse_state *parser_state,
90 union acpi_parse_object *arg, u8 method_call);
91
92acpi_status
93acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
94 struct acpi_parse_state *parser_state,
95 u32 arg_type, union acpi_parse_object **return_arg);
96
97/*
98 * psfind
99 */
100union acpi_parse_object *acpi_ps_find_name(union acpi_parse_object *scope,
101 u32 name, u32 opcode);
102
103union acpi_parse_object *acpi_ps_get_parent(union acpi_parse_object *op);
104
105/*
106 * psopcode - AML Opcode information
107 */
108const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode);
109
110char *acpi_ps_get_opcode_name(u16 opcode);
111
112u8 acpi_ps_get_argument_count(u32 op_type);
113
114/*
115 * psparse - top level parsing routines
116 */
117acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state);
118
119u32 acpi_ps_get_opcode_size(u32 opcode);
120
121u16 acpi_ps_peek_opcode(struct acpi_parse_state *state);
122
123acpi_status
124acpi_ps_complete_this_op(struct acpi_walk_state *walk_state,
125 union acpi_parse_object *op);
126
127acpi_status
128acpi_ps_next_parse_state(struct acpi_walk_state *walk_state,
129 union acpi_parse_object *op,
130 acpi_status callback_status);
131
132/*
133 * psloop - main parse loop
134 */
135acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state);
136
137/*
138 * psscope - Scope stack management routines
139 */
140acpi_status
141acpi_ps_init_scope(struct acpi_parse_state *parser_state,
142 union acpi_parse_object *root);
143
144union acpi_parse_object *acpi_ps_get_parent_scope(struct acpi_parse_state
145 *state);
146
147u8 acpi_ps_has_completed_scope(struct acpi_parse_state *parser_state);
148
149void
150acpi_ps_pop_scope(struct acpi_parse_state *parser_state,
151 union acpi_parse_object **op,
152 u32 * arg_list, u32 * arg_count);
153
154acpi_status
155acpi_ps_push_scope(struct acpi_parse_state *parser_state,
156 union acpi_parse_object *op,
157 u32 remaining_args, u32 arg_count);
158
159void acpi_ps_cleanup_scope(struct acpi_parse_state *state);
160
161/*
162 * pstree - parse tree manipulation routines
163 */
164void
165acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg);
166
167union acpi_parse_object *acpi_ps_find(union acpi_parse_object *scope,
168 char *path, u16 opcode, u32 create);
169
170union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn);
171
172#ifdef ACPI_FUTURE_USAGE
173union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin,
174 union acpi_parse_object *op);
175#endif /* ACPI_FUTURE_USAGE */
176
177/*
178 * pswalk - parse tree walk routines
179 */
180acpi_status
181acpi_ps_walk_parsed_aml(union acpi_parse_object *start_op,
182 union acpi_parse_object *end_op,
183 union acpi_operand_object *mth_desc,
184 struct acpi_namespace_node *start_node,
185 union acpi_operand_object **params,
186 union acpi_operand_object **caller_return_desc,
187 acpi_owner_id owner_id,
188 acpi_parse_downwards descending_callback,
189 acpi_parse_upwards ascending_callback);
190
191acpi_status
192acpi_ps_get_next_walk_op(struct acpi_walk_state *walk_state,
193 union acpi_parse_object *op,
194 acpi_parse_upwards ascending_callback);
195
196acpi_status acpi_ps_delete_completed_op(struct acpi_walk_state *walk_state);
197
198void acpi_ps_delete_parse_tree(union acpi_parse_object *root);
199
200/*
201 * psutils - parser utilities
202 */
203union acpi_parse_object *acpi_ps_create_scope_op(void);
204
205void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode);
206
207union acpi_parse_object *acpi_ps_alloc_op(u16 opcode);
208
209void acpi_ps_free_op(union acpi_parse_object *op);
210
211u8 acpi_ps_is_leading_char(u32 c);
212
213u8 acpi_ps_is_prefix_char(u32 c);
214
215#ifdef ACPI_FUTURE_USAGE
216u32 acpi_ps_get_name(union acpi_parse_object *op);
217#endif /* ACPI_FUTURE_USAGE */
218
219void acpi_ps_set_name(union acpi_parse_object *op, u32 name);
220
221/*
222 * psdump - display parser tree
223 */
224u32
225acpi_ps_sprint_path(char *buffer_start,
226 u32 buffer_size, union acpi_parse_object *op);
227
228u32
229acpi_ps_sprint_op(char *buffer_start,
230 u32 buffer_size, union acpi_parse_object *op);
231
232void acpi_ps_show(union acpi_parse_object *op);
233
234#endif /* __ACPARSER_H__ */
diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h
new file mode 100644
index 000000000000..16a9ca9a66e4
--- /dev/null
+++ b/drivers/acpi/acpica/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 | ACPI_RTYPE_BUFFER, 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_INTEGER | 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/drivers/acpi/acpica/acresrc.h b/drivers/acpi/acpica/acresrc.h
new file mode 100644
index 000000000000..eef5bd7a59fa
--- /dev/null
+++ b/drivers/acpi/acpica/acresrc.h
@@ -0,0 +1,336 @@
1/******************************************************************************
2 *
3 * Name: acresrc.h - Resource Manager function prototypes
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACRESRC_H__
45#define __ACRESRC_H__
46
47/* Need the AML resource descriptor structs */
48
49#include "amlresrc.h"
50
51/*
52 * If possible, pack the following structures to byte alignment, since we
53 * don't care about performance for debug output. Two cases where we cannot
54 * pack the structures:
55 *
56 * 1) Hardware does not support misaligned memory transfers
57 * 2) Compiler does not support pointers within packed structures
58 */
59#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
60#pragma pack(1)
61#endif
62
63/*
64 * Individual entry for the resource conversion tables
65 */
66typedef const struct acpi_rsconvert_info {
67 u8 opcode;
68 u8 resource_offset;
69 u8 aml_offset;
70 u8 value;
71
72} acpi_rsconvert_info;
73
74/* Resource conversion opcodes */
75
76#define ACPI_RSC_INITGET 0
77#define ACPI_RSC_INITSET 1
78#define ACPI_RSC_FLAGINIT 2
79#define ACPI_RSC_1BITFLAG 3
80#define ACPI_RSC_2BITFLAG 4
81#define ACPI_RSC_COUNT 5
82#define ACPI_RSC_COUNT16 6
83#define ACPI_RSC_LENGTH 7
84#define ACPI_RSC_MOVE8 8
85#define ACPI_RSC_MOVE16 9
86#define ACPI_RSC_MOVE32 10
87#define ACPI_RSC_MOVE64 11
88#define ACPI_RSC_SET8 12
89#define ACPI_RSC_DATA8 13
90#define ACPI_RSC_ADDRESS 14
91#define ACPI_RSC_SOURCE 15
92#define ACPI_RSC_SOURCEX 16
93#define ACPI_RSC_BITMASK 17
94#define ACPI_RSC_BITMASK16 18
95#define ACPI_RSC_EXIT_NE 19
96#define ACPI_RSC_EXIT_LE 20
97#define ACPI_RSC_EXIT_EQ 21
98
99/* Resource Conversion sub-opcodes */
100
101#define ACPI_RSC_COMPARE_AML_LENGTH 0
102#define ACPI_RSC_COMPARE_VALUE 1
103
104#define ACPI_RSC_TABLE_SIZE(d) (sizeof (d) / sizeof (struct acpi_rsconvert_info))
105
106#define ACPI_RS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_resource,f)
107#define AML_OFFSET(f) (u8) ACPI_OFFSET (union aml_resource,f)
108
109typedef const struct acpi_rsdump_info {
110 u8 opcode;
111 u8 offset;
112 char *name;
113 const char **pointer;
114
115} acpi_rsdump_info;
116
117/* Values for the Opcode field above */
118
119#define ACPI_RSD_TITLE 0
120#define ACPI_RSD_LITERAL 1
121#define ACPI_RSD_STRING 2
122#define ACPI_RSD_UINT8 3
123#define ACPI_RSD_UINT16 4
124#define ACPI_RSD_UINT32 5
125#define ACPI_RSD_UINT64 6
126#define ACPI_RSD_1BITFLAG 7
127#define ACPI_RSD_2BITFLAG 8
128#define ACPI_RSD_SHORTLIST 9
129#define ACPI_RSD_LONGLIST 10
130#define ACPI_RSD_DWORDLIST 11
131#define ACPI_RSD_ADDRESS 12
132#define ACPI_RSD_SOURCE 13
133
134/* restore default alignment */
135
136#pragma pack()
137
138/* Resource tables indexed by internal resource type */
139
140extern const u8 acpi_gbl_aml_resource_sizes[];
141extern struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[];
142
143/* Resource tables indexed by raw AML resource descriptor type */
144
145extern const u8 acpi_gbl_resource_struct_sizes[];
146extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[];
147
148struct acpi_vendor_walk_info {
149 struct acpi_vendor_uuid *uuid;
150 struct acpi_buffer *buffer;
151 acpi_status status;
152};
153
154/*
155 * rscreate
156 */
157acpi_status
158acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer,
159 struct acpi_buffer *output_buffer);
160
161acpi_status
162acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer,
163 struct acpi_buffer *output_buffer);
164
165acpi_status
166acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
167 struct acpi_buffer *output_buffer);
168
169/*
170 * rsutils
171 */
172
173acpi_status
174acpi_rs_get_prt_method_data(struct acpi_namespace_node *node,
175 struct acpi_buffer *ret_buffer);
176
177acpi_status
178acpi_rs_get_crs_method_data(struct acpi_namespace_node *node,
179 struct acpi_buffer *ret_buffer);
180
181acpi_status
182acpi_rs_get_prs_method_data(struct acpi_namespace_node *node,
183 struct acpi_buffer *ret_buffer);
184
185acpi_status
186acpi_rs_get_method_data(acpi_handle handle,
187 char *path, struct acpi_buffer *ret_buffer);
188
189acpi_status
190acpi_rs_set_srs_method_data(struct acpi_namespace_node *node,
191 struct acpi_buffer *ret_buffer);
192
193/*
194 * rscalc
195 */
196acpi_status
197acpi_rs_get_list_length(u8 * aml_buffer,
198 u32 aml_buffer_length, acpi_size * size_needed);
199
200acpi_status
201acpi_rs_get_aml_length(struct acpi_resource *linked_list_buffer,
202 acpi_size * size_needed);
203
204acpi_status
205acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
206 acpi_size * buffer_size_needed);
207
208acpi_status
209acpi_rs_convert_aml_to_resources(u8 * aml,
210 u32 length,
211 u32 offset, u8 resource_index, void **context);
212
213acpi_status
214acpi_rs_convert_resources_to_aml(struct acpi_resource *resource,
215 acpi_size aml_size_needed, u8 * output_buffer);
216
217/*
218 * rsaddr
219 */
220void
221acpi_rs_set_address_common(union aml_resource *aml,
222 struct acpi_resource *resource);
223
224u8
225acpi_rs_get_address_common(struct acpi_resource *resource,
226 union aml_resource *aml);
227
228/*
229 * rsmisc
230 */
231acpi_status
232acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
233 union aml_resource *aml,
234 struct acpi_rsconvert_info *info);
235
236acpi_status
237acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,
238 union aml_resource *aml,
239 struct acpi_rsconvert_info *info);
240
241/*
242 * rsutils
243 */
244void
245acpi_rs_move_data(void *destination,
246 void *source, u16 item_count, u8 move_type);
247
248u8 acpi_rs_decode_bitmask(u16 mask, u8 * list);
249
250u16 acpi_rs_encode_bitmask(u8 * list, u8 count);
251
252acpi_rs_length
253acpi_rs_get_resource_source(acpi_rs_length resource_length,
254 acpi_rs_length minimum_length,
255 struct acpi_resource_source *resource_source,
256 union aml_resource *aml, char *string_ptr);
257
258acpi_rsdesc_size
259acpi_rs_set_resource_source(union aml_resource *aml,
260 acpi_rs_length minimum_length,
261 struct acpi_resource_source *resource_source);
262
263void
264acpi_rs_set_resource_header(u8 descriptor_type,
265 acpi_rsdesc_size total_length,
266 union aml_resource *aml);
267
268void
269acpi_rs_set_resource_length(acpi_rsdesc_size total_length,
270 union aml_resource *aml);
271
272/*
273 * rsdump
274 */
275void acpi_rs_dump_resource_list(struct acpi_resource *resource);
276
277void acpi_rs_dump_irq_list(u8 * route_table);
278
279/*
280 * Resource conversion tables
281 */
282extern struct acpi_rsconvert_info acpi_rs_convert_dma[];
283extern struct acpi_rsconvert_info acpi_rs_convert_end_dpf[];
284extern struct acpi_rsconvert_info acpi_rs_convert_io[];
285extern struct acpi_rsconvert_info acpi_rs_convert_fixed_io[];
286extern struct acpi_rsconvert_info acpi_rs_convert_end_tag[];
287extern struct acpi_rsconvert_info acpi_rs_convert_memory24[];
288extern struct acpi_rsconvert_info acpi_rs_convert_generic_reg[];
289extern struct acpi_rsconvert_info acpi_rs_convert_memory32[];
290extern struct acpi_rsconvert_info acpi_rs_convert_fixed_memory32[];
291extern struct acpi_rsconvert_info acpi_rs_convert_address32[];
292extern struct acpi_rsconvert_info acpi_rs_convert_address16[];
293extern struct acpi_rsconvert_info acpi_rs_convert_ext_irq[];
294extern struct acpi_rsconvert_info acpi_rs_convert_address64[];
295extern struct acpi_rsconvert_info acpi_rs_convert_ext_address64[];
296
297/* These resources require separate get/set tables */
298
299extern struct acpi_rsconvert_info acpi_rs_get_irq[];
300extern struct acpi_rsconvert_info acpi_rs_get_start_dpf[];
301extern struct acpi_rsconvert_info acpi_rs_get_vendor_small[];
302extern struct acpi_rsconvert_info acpi_rs_get_vendor_large[];
303
304extern struct acpi_rsconvert_info acpi_rs_set_irq[];
305extern struct acpi_rsconvert_info acpi_rs_set_start_dpf[];
306extern struct acpi_rsconvert_info acpi_rs_set_vendor[];
307
308#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
309/*
310 * rsinfo
311 */
312extern struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[];
313
314/*
315 * rsdump
316 */
317extern struct acpi_rsdump_info acpi_rs_dump_irq[];
318extern struct acpi_rsdump_info acpi_rs_dump_dma[];
319extern struct acpi_rsdump_info acpi_rs_dump_start_dpf[];
320extern struct acpi_rsdump_info acpi_rs_dump_end_dpf[];
321extern struct acpi_rsdump_info acpi_rs_dump_io[];
322extern struct acpi_rsdump_info acpi_rs_dump_fixed_io[];
323extern struct acpi_rsdump_info acpi_rs_dump_vendor[];
324extern struct acpi_rsdump_info acpi_rs_dump_end_tag[];
325extern struct acpi_rsdump_info acpi_rs_dump_memory24[];
326extern struct acpi_rsdump_info acpi_rs_dump_memory32[];
327extern struct acpi_rsdump_info acpi_rs_dump_fixed_memory32[];
328extern struct acpi_rsdump_info acpi_rs_dump_address16[];
329extern struct acpi_rsdump_info acpi_rs_dump_address32[];
330extern struct acpi_rsdump_info acpi_rs_dump_address64[];
331extern struct acpi_rsdump_info acpi_rs_dump_ext_address64[];
332extern struct acpi_rsdump_info acpi_rs_dump_ext_irq[];
333extern struct acpi_rsdump_info acpi_rs_dump_generic_reg[];
334#endif
335
336#endif /* __ACRESRC_H__ */
diff --git a/drivers/acpi/acpica/acstruct.h b/drivers/acpi/acpica/acstruct.h
new file mode 100644
index 000000000000..7980a26bad35
--- /dev/null
+++ b/drivers/acpi/acpica/acstruct.h
@@ -0,0 +1,228 @@
1/******************************************************************************
2 *
3 * Name: acstruct.h - Internal structs
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACSTRUCT_H__
45#define __ACSTRUCT_H__
46
47/* acpisrc:struct_defs -- for acpisrc conversion */
48
49/*****************************************************************************
50 *
51 * Tree walking typedefs and structs
52 *
53 ****************************************************************************/
54
55/*
56 * Walk state - current state of a parse tree walk. Used for both a leisurely
57 * stroll through the tree (for whatever reason), and for control method
58 * execution.
59 */
60#define ACPI_NEXT_OP_DOWNWARD 1
61#define ACPI_NEXT_OP_UPWARD 2
62
63/*
64 * Groups of definitions for walk_type used for different implementations of
65 * walkers (never simultaneously) - flags for interpreter:
66 */
67#define ACPI_WALK_NON_METHOD 0
68#define ACPI_WALK_METHOD 0x01
69#define ACPI_WALK_METHOD_RESTART 0x02
70
71/* Flags for i_aSL compiler only */
72
73#define ACPI_WALK_CONST_REQUIRED 0x10
74#define ACPI_WALK_CONST_OPTIONAL 0x20
75
76struct acpi_walk_state {
77 struct acpi_walk_state *next; /* Next walk_state in list */
78 u8 descriptor_type; /* To differentiate various internal objs */
79 u8 walk_type;
80 u16 opcode; /* Current AML opcode */
81 u8 next_op_info; /* Info about next_op */
82 u8 num_operands; /* Stack pointer for Operands[] array */
83 u8 operand_index; /* Index into operand stack, to be used by acpi_ds_obj_stack_push */
84 acpi_owner_id owner_id; /* Owner of objects created during the walk */
85 u8 last_predicate; /* Result of last predicate */
86 u8 current_result;
87 u8 return_used;
88 u8 scope_depth;
89 u8 pass_number; /* Parse pass during table load */
90 u8 result_size; /* Total elements for the result stack */
91 u8 result_count; /* Current number of occupied elements of result stack */
92 u32 aml_offset;
93 u32 arg_types;
94 u32 method_breakpoint; /* For single stepping */
95 u32 user_breakpoint; /* User AML breakpoint */
96 u32 parse_flags;
97
98 struct acpi_parse_state parser_state; /* Current state of parser */
99 u32 prev_arg_types;
100 u32 arg_count; /* push for fixed or var args */
101
102 struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
103 struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
104 union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS + 1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
105 union acpi_operand_object **params;
106
107 u8 *aml_last_while;
108 union acpi_operand_object **caller_return_desc;
109 union acpi_generic_state *control_state; /* List of control states (nested IFs) */
110 struct acpi_namespace_node *deferred_node; /* Used when executing deferred opcodes */
111 union acpi_operand_object *implicit_return_obj;
112 struct acpi_namespace_node *method_call_node; /* Called method Node */
113 union acpi_parse_object *method_call_op; /* method_call Op if running a method */
114 union acpi_operand_object *method_desc; /* Method descriptor if running a method */
115 struct acpi_namespace_node *method_node; /* Method node if running a method. */
116 union acpi_parse_object *op; /* Current parser op */
117 const struct acpi_opcode_info *op_info; /* Info on current opcode */
118 union acpi_parse_object *origin; /* Start of walk [Obsolete] */
119 union acpi_operand_object *result_obj;
120 union acpi_generic_state *results; /* Stack of accumulated results */
121 union acpi_operand_object *return_desc; /* Return object, if any */
122 union acpi_generic_state *scope_info; /* Stack of nested scopes */
123 union acpi_parse_object *prev_op; /* Last op that was processed */
124 union acpi_parse_object *next_op; /* next op to be processed */
125 struct acpi_thread_state *thread;
126 acpi_parse_downwards descending_callback;
127 acpi_parse_upwards ascending_callback;
128};
129
130/* Info used by acpi_ps_init_objects */
131
132struct acpi_init_walk_info {
133 u16 method_count;
134 u16 device_count;
135 u16 op_region_count;
136 u16 field_count;
137 u16 buffer_count;
138 u16 package_count;
139 u16 op_region_init;
140 u16 field_init;
141 u16 buffer_init;
142 u16 package_init;
143 u16 object_count;
144 acpi_owner_id owner_id;
145 u32 table_index;
146};
147
148struct acpi_get_devices_info {
149 acpi_walk_callback user_function;
150 void *context;
151 const char *hid;
152};
153
154union acpi_aml_operands {
155 union acpi_operand_object *operands[7];
156
157 struct {
158 struct acpi_object_integer *type;
159 struct acpi_object_integer *code;
160 struct acpi_object_integer *argument;
161
162 } fatal;
163
164 struct {
165 union acpi_operand_object *source;
166 struct acpi_object_integer *index;
167 union acpi_operand_object *target;
168
169 } index;
170
171 struct {
172 union acpi_operand_object *source;
173 struct acpi_object_integer *index;
174 struct acpi_object_integer *length;
175 union acpi_operand_object *target;
176
177 } mid;
178};
179
180/*
181 * Structure used to pass object evaluation parameters.
182 * Purpose is to reduce CPU stack use.
183 */
184struct acpi_evaluate_info {
185 struct acpi_namespace_node *prefix_node;
186 char *pathname;
187 union acpi_operand_object *obj_desc;
188 union acpi_operand_object **parameters;
189 struct acpi_namespace_node *resolved_node;
190 union acpi_operand_object *return_object;
191 u8 param_count;
192 u8 pass_number;
193 u8 return_object_type;
194 u8 flags;
195};
196
197/* Values for Flags above */
198
199#define ACPI_IGNORE_RETURN_VALUE 1
200
201/* Info used by acpi_ns_initialize_devices */
202
203struct acpi_device_walk_info {
204 u16 device_count;
205 u16 num_STA;
206 u16 num_INI;
207 struct acpi_table_desc *table_desc;
208 struct acpi_evaluate_info *evaluate_info;
209};
210
211/* TBD: [Restructure] Merge with struct above */
212
213struct acpi_walk_info {
214 u32 debug_level;
215 u32 count;
216 acpi_owner_id owner_id;
217 u8 display_type;
218};
219
220/* Display Types */
221
222#define ACPI_DISPLAY_SUMMARY (u8) 0
223#define ACPI_DISPLAY_OBJECTS (u8) 1
224#define ACPI_DISPLAY_MASK (u8) 1
225
226#define ACPI_DISPLAY_SHORT (u8) 2
227
228#endif
diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h
new file mode 100644
index 000000000000..7ce6e33c7f78
--- /dev/null
+++ b/drivers/acpi/acpica/actables.h
@@ -0,0 +1,117 @@
1/******************************************************************************
2 *
3 * Name: actables.h - ACPI table management
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACTABLES_H__
45#define __ACTABLES_H__
46
47acpi_status acpi_allocate_root_table(u32 initial_table_count);
48
49/*
50 * tbfadt - FADT parse/convert/validate
51 */
52void acpi_tb_parse_fadt(u32 table_index, u8 flags);
53
54void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);
55
56/*
57 * tbfind - find ACPI table
58 */
59acpi_status
60acpi_tb_find_table(char *signature,
61 char *oem_id, char *oem_table_id, u32 *table_index);
62
63/*
64 * tbinstal - Table removal and deletion
65 */
66acpi_status acpi_tb_resize_root_table_list(void);
67
68acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc);
69
70acpi_status
71acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index);
72
73acpi_status
74acpi_tb_store_table(acpi_physical_address address,
75 struct acpi_table_header *table,
76 u32 length, u8 flags, u32 *table_index);
77
78void acpi_tb_delete_table(struct acpi_table_desc *table_desc);
79
80void acpi_tb_terminate(void);
81
82void acpi_tb_delete_namespace_by_owner(u32 table_index);
83
84acpi_status acpi_tb_allocate_owner_id(u32 table_index);
85
86acpi_status acpi_tb_release_owner_id(u32 table_index);
87
88acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *owner_id);
89
90u8 acpi_tb_is_table_loaded(u32 table_index);
91
92void acpi_tb_set_table_loaded_flag(u32 table_index, u8 is_loaded);
93
94/*
95 * tbutils - table manager utilities
96 */
97acpi_status acpi_tb_initialize_facs(void);
98
99u8 acpi_tb_tables_loaded(void);
100
101void
102acpi_tb_print_table_header(acpi_physical_address address,
103 struct acpi_table_header *header);
104
105u8 acpi_tb_checksum(u8 *buffer, u32 length);
106
107acpi_status
108acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length);
109
110void
111acpi_tb_install_table(acpi_physical_address address,
112 u8 flags, char *signature, u32 table_index);
113
114acpi_status
115acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags);
116
117#endif /* __ACTABLES_H__ */
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
new file mode 100644
index 000000000000..80d8813484fe
--- /dev/null
+++ b/drivers/acpi/acpica/acutils.h
@@ -0,0 +1,549 @@
1/******************************************************************************
2 *
3 * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef _ACUTILS_H
45#define _ACUTILS_H
46
47extern const u8 acpi_gbl_resource_aml_sizes[];
48
49/* Strings used by the disassembler and debugger resource dump routines */
50
51#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
52
53extern const char *acpi_gbl_bm_decode[];
54extern const char *acpi_gbl_config_decode[];
55extern const char *acpi_gbl_consume_decode[];
56extern const char *acpi_gbl_dec_decode[];
57extern const char *acpi_gbl_he_decode[];
58extern const char *acpi_gbl_io_decode[];
59extern const char *acpi_gbl_ll_decode[];
60extern const char *acpi_gbl_max_decode[];
61extern const char *acpi_gbl_mem_decode[];
62extern const char *acpi_gbl_min_decode[];
63extern const char *acpi_gbl_mtp_decode[];
64extern const char *acpi_gbl_rng_decode[];
65extern const char *acpi_gbl_rw_decode[];
66extern const char *acpi_gbl_shr_decode[];
67extern const char *acpi_gbl_siz_decode[];
68extern const char *acpi_gbl_trs_decode[];
69extern const char *acpi_gbl_ttp_decode[];
70extern const char *acpi_gbl_typ_decode[];
71#endif
72
73/* Types for Resource descriptor entries */
74
75#define ACPI_INVALID_RESOURCE 0
76#define ACPI_FIXED_LENGTH 1
77#define ACPI_VARIABLE_LENGTH 2
78#define ACPI_SMALL_VARIABLE_LENGTH 3
79
80typedef
81acpi_status(*acpi_walk_aml_callback) (u8 * aml,
82 u32 length,
83 u32 offset,
84 u8 resource_index, void **context);
85
86typedef
87acpi_status(*acpi_pkg_callback) (u8 object_type,
88 union acpi_operand_object * source_object,
89 union acpi_generic_state * state,
90 void *context);
91
92struct acpi_pkg_info {
93 u8 *free_space;
94 acpi_size length;
95 u32 object_space;
96 u32 num_packages;
97};
98
99#define REF_INCREMENT (u16) 0
100#define REF_DECREMENT (u16) 1
101#define REF_FORCE_DELETE (u16) 2
102
103/* acpi_ut_dump_buffer */
104
105#define DB_BYTE_DISPLAY 1
106#define DB_WORD_DISPLAY 2
107#define DB_DWORD_DISPLAY 4
108#define DB_QWORD_DISPLAY 8
109
110/*
111 * utglobal - Global data structures and procedures
112 */
113acpi_status acpi_ut_init_globals(void);
114
115#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
116
117char *acpi_ut_get_mutex_name(u32 mutex_id);
118
119const char *acpi_ut_get_notify_name(u32 notify_value);
120
121#endif
122
123char *acpi_ut_get_type_name(acpi_object_type type);
124
125char *acpi_ut_get_node_name(void *object);
126
127char *acpi_ut_get_descriptor_name(void *object);
128
129const char *acpi_ut_get_reference_name(union acpi_operand_object *object);
130
131char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);
132
133char *acpi_ut_get_region_name(u8 space_id);
134
135char *acpi_ut_get_event_name(u32 event_id);
136
137char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position);
138
139u8 acpi_ut_valid_object_type(acpi_object_type type);
140
141/*
142 * utinit - miscellaneous initialization and shutdown
143 */
144acpi_status acpi_ut_hardware_initialize(void);
145
146void acpi_ut_subsystem_shutdown(void);
147
148/*
149 * utclib - Local implementations of C library functions
150 */
151#ifndef ACPI_USE_SYSTEM_CLIBRARY
152
153acpi_size acpi_ut_strlen(const char *string);
154
155char *acpi_ut_strcpy(char *dst_string, const char *src_string);
156
157char *acpi_ut_strncpy(char *dst_string,
158 const char *src_string, acpi_size count);
159
160int acpi_ut_memcmp(const char *buffer1, const char *buffer2, acpi_size count);
161
162int acpi_ut_strncmp(const char *string1, const char *string2, acpi_size count);
163
164int acpi_ut_strcmp(const char *string1, const char *string2);
165
166char *acpi_ut_strcat(char *dst_string, const char *src_string);
167
168char *acpi_ut_strncat(char *dst_string,
169 const char *src_string, acpi_size count);
170
171u32 acpi_ut_strtoul(const char *string, char **terminator, u32 base);
172
173char *acpi_ut_strstr(char *string1, char *string2);
174
175void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count);
176
177void *acpi_ut_memset(void *dest, u8 value, acpi_size count);
178
179int acpi_ut_to_upper(int c);
180
181int acpi_ut_to_lower(int c);
182
183extern const u8 _acpi_ctype[];
184
185#define _ACPI_XA 0x00 /* extra alphabetic - not supported */
186#define _ACPI_XS 0x40 /* extra space */
187#define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */
188#define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */
189#define _ACPI_DI 0x04 /* '0'-'9' */
190#define _ACPI_LO 0x02 /* 'a'-'z' */
191#define _ACPI_PU 0x10 /* punctuation */
192#define _ACPI_SP 0x08 /* space */
193#define _ACPI_UP 0x01 /* 'A'-'Z' */
194#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
195
196#define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
197#define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
198#define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
199#define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
200#define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
201#define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
202#define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
203
204#endif /* ACPI_USE_SYSTEM_CLIBRARY */
205
206/*
207 * utcopy - Object construction and conversion interfaces
208 */
209acpi_status
210acpi_ut_build_simple_object(union acpi_operand_object *obj,
211 union acpi_object *user_obj,
212 u8 * data_space, u32 * buffer_space_used);
213
214acpi_status
215acpi_ut_build_package_object(union acpi_operand_object *obj,
216 u8 * buffer, u32 * space_used);
217
218acpi_status
219acpi_ut_copy_iobject_to_eobject(union acpi_operand_object *obj,
220 struct acpi_buffer *ret_buffer);
221
222acpi_status
223acpi_ut_copy_eobject_to_iobject(union acpi_object *obj,
224 union acpi_operand_object **internal_obj);
225
226acpi_status
227acpi_ut_copy_isimple_to_isimple(union acpi_operand_object *source_obj,
228 union acpi_operand_object *dest_obj);
229
230acpi_status
231acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc,
232 union acpi_operand_object **dest_desc,
233 struct acpi_walk_state *walk_state);
234
235/*
236 * utcreate - Object creation
237 */
238acpi_status
239acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action);
240
241/*
242 * utdebug - Debug interfaces
243 */
244void acpi_ut_init_stack_ptr_trace(void);
245
246void acpi_ut_track_stack_ptr(void);
247
248void
249acpi_ut_trace(u32 line_number,
250 const char *function_name,
251 const char *module_name, u32 component_id);
252
253void
254acpi_ut_trace_ptr(u32 line_number,
255 const char *function_name,
256 const char *module_name, u32 component_id, void *pointer);
257
258void
259acpi_ut_trace_u32(u32 line_number,
260 const char *function_name,
261 const char *module_name, u32 component_id, u32 integer);
262
263void
264acpi_ut_trace_str(u32 line_number,
265 const char *function_name,
266 const char *module_name, u32 component_id, char *string);
267
268void
269acpi_ut_exit(u32 line_number,
270 const char *function_name,
271 const char *module_name, u32 component_id);
272
273void
274acpi_ut_status_exit(u32 line_number,
275 const char *function_name,
276 const char *module_name,
277 u32 component_id, acpi_status status);
278
279void
280acpi_ut_value_exit(u32 line_number,
281 const char *function_name,
282 const char *module_name,
283 u32 component_id, acpi_integer value);
284
285void
286acpi_ut_ptr_exit(u32 line_number,
287 const char *function_name,
288 const char *module_name, u32 component_id, u8 *ptr);
289
290void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id);
291
292void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display);
293
294void acpi_ut_report_error(char *module_name, u32 line_number);
295
296void acpi_ut_report_info(char *module_name, u32 line_number);
297
298void acpi_ut_report_warning(char *module_name, u32 line_number);
299
300/*
301 * utdelete - Object deletion and reference counts
302 */
303void acpi_ut_add_reference(union acpi_operand_object *object);
304
305void acpi_ut_remove_reference(union acpi_operand_object *object);
306
307void acpi_ut_delete_internal_package_object(union acpi_operand_object *object);
308
309void acpi_ut_delete_internal_simple_object(union acpi_operand_object *object);
310
311void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list);
312
313/*
314 * uteval - object evaluation
315 */
316acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state);
317
318acpi_status
319acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
320 char *path,
321 u32 expected_return_btypes,
322 union acpi_operand_object **return_desc);
323
324acpi_status
325acpi_ut_evaluate_numeric_object(char *object_name,
326 struct acpi_namespace_node *device_node,
327 acpi_integer * address);
328
329acpi_status
330acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
331 struct acpica_device_id *hid);
332
333acpi_status
334acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
335 struct acpi_compatible_id_list **return_cid_list);
336
337acpi_status
338acpi_ut_execute_STA(struct acpi_namespace_node *device_node,
339 u32 * status_flags);
340
341acpi_status
342acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
343 struct acpica_device_id *uid);
344
345acpi_status
346acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest);
347
348/*
349 * utobject - internal object create/delete/cache routines
350 */
351union acpi_operand_object *acpi_ut_create_internal_object_dbg(const char
352 *module_name,
353 u32 line_number,
354 u32 component_id,
355 acpi_object_type
356 type);
357
358void *acpi_ut_allocate_object_desc_dbg(const char *module_name,
359 u32 line_number, u32 component_id);
360
361#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t)
362#define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_acpi_module_name,__LINE__,_COMPONENT)
363
364void acpi_ut_delete_object_desc(union acpi_operand_object *object);
365
366u8 acpi_ut_valid_internal_object(void *object);
367
368union acpi_operand_object *acpi_ut_create_package_object(u32 count);
369
370union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size);
371
372union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size);
373
374acpi_status
375acpi_ut_get_object_size(union acpi_operand_object *obj, acpi_size * obj_length);
376
377/*
378 * utstate - Generic state creation/cache routines
379 */
380void
381acpi_ut_push_generic_state(union acpi_generic_state **list_head,
382 union acpi_generic_state *state);
383
384union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_state
385 **list_head);
386
387union acpi_generic_state *acpi_ut_create_generic_state(void);
388
389struct acpi_thread_state *acpi_ut_create_thread_state(void);
390
391union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object
392 *object, u16 action);
393
394union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object,
395 void *external_object,
396 u16 index);
397
398acpi_status
399acpi_ut_create_update_state_and_push(union acpi_operand_object *object,
400 u16 action,
401 union acpi_generic_state **state_list);
402
403#ifdef ACPI_FUTURE_USAGE
404acpi_status
405acpi_ut_create_pkg_state_and_push(void *internal_object,
406 void *external_object,
407 u16 index,
408 union acpi_generic_state **state_list);
409#endif /* ACPI_FUTURE_USAGE */
410
411union acpi_generic_state *acpi_ut_create_control_state(void);
412
413void acpi_ut_delete_generic_state(union acpi_generic_state *state);
414
415/*
416 * utmath
417 */
418acpi_status
419acpi_ut_divide(acpi_integer in_dividend,
420 acpi_integer in_divisor,
421 acpi_integer * out_quotient, acpi_integer * out_remainder);
422
423acpi_status
424acpi_ut_short_divide(acpi_integer in_dividend,
425 u32 divisor,
426 acpi_integer * out_quotient, u32 * out_remainder);
427
428/*
429 * utmisc
430 */
431const char *acpi_ut_validate_exception(acpi_status status);
432
433u8 acpi_ut_is_aml_table(struct acpi_table_header *table);
434
435acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id);
436
437void acpi_ut_release_owner_id(acpi_owner_id * owner_id);
438
439acpi_status
440acpi_ut_walk_package_tree(union acpi_operand_object *source_object,
441 void *target_object,
442 acpi_pkg_callback walk_callback, void *context);
443
444void acpi_ut_strupr(char *src_string);
445
446void acpi_ut_print_string(char *string, u8 max_length);
447
448u8 acpi_ut_valid_acpi_name(u32 name);
449
450acpi_name acpi_ut_repair_name(char *name);
451
452u8 acpi_ut_valid_acpi_char(char character, u32 position);
453
454acpi_status
455acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer);
456
457/* Values for Base above (16=Hex, 10=Decimal) */
458
459#define ACPI_ANY_BASE 0
460
461u32 acpi_ut_dword_byte_swap(u32 value);
462
463void acpi_ut_set_integer_width(u8 revision);
464
465#ifdef ACPI_DEBUG_OUTPUT
466void
467acpi_ut_display_init_pathname(u8 type,
468 struct acpi_namespace_node *obj_handle,
469 char *path);
470#endif
471
472/*
473 * utresrc
474 */
475acpi_status
476acpi_ut_walk_aml_resources(u8 * aml,
477 acpi_size aml_length,
478 acpi_walk_aml_callback user_function,
479 void **context);
480
481acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index);
482
483u32 acpi_ut_get_descriptor_length(void *aml);
484
485u16 acpi_ut_get_resource_length(void *aml);
486
487u8 acpi_ut_get_resource_header_length(void *aml);
488
489u8 acpi_ut_get_resource_type(void *aml);
490
491acpi_status
492acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc,
493 u8 ** end_tag);
494
495/*
496 * utmutex - mutex support
497 */
498acpi_status acpi_ut_mutex_initialize(void);
499
500void acpi_ut_mutex_terminate(void);
501
502acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id);
503
504acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id);
505
506/*
507 * utalloc - memory allocation and object caching
508 */
509acpi_status acpi_ut_create_caches(void);
510
511acpi_status acpi_ut_delete_caches(void);
512
513acpi_status acpi_ut_validate_buffer(struct acpi_buffer *buffer);
514
515acpi_status
516acpi_ut_initialize_buffer(struct acpi_buffer *buffer,
517 acpi_size required_length);
518
519void *acpi_ut_allocate(acpi_size size,
520 u32 component, const char *module, u32 line);
521
522void *acpi_ut_allocate_zeroed(acpi_size size,
523 u32 component, const char *module, u32 line);
524
525#ifdef ACPI_DBG_TRACK_ALLOCATIONS
526void *acpi_ut_allocate_and_track(acpi_size size,
527 u32 component, const char *module, u32 line);
528
529void *acpi_ut_allocate_zeroed_and_track(acpi_size size,
530 u32 component,
531 const char *module, u32 line);
532
533void
534acpi_ut_free_and_track(void *address,
535 u32 component, const char *module, u32 line);
536
537#ifdef ACPI_FUTURE_USAGE
538void acpi_ut_dump_allocation_info(void);
539#endif /* ACPI_FUTURE_USAGE */
540
541void acpi_ut_dump_allocations(u32 component, const char *module);
542
543acpi_status
544acpi_ut_create_list(char *list_name,
545 u16 object_size, struct acpi_memory_list **return_cache);
546
547#endif
548
549#endif /* _ACUTILS_H */
diff --git a/drivers/acpi/acpica/amlcode.h b/drivers/acpi/acpica/amlcode.h
new file mode 100644
index 000000000000..ff851c5df698
--- /dev/null
+++ b/drivers/acpi/acpica/amlcode.h
@@ -0,0 +1,494 @@
1/******************************************************************************
2 *
3 * Name: amlcode.h - Definitions for AML, as included in "definition blocks"
4 * Declarations and definitions contained herein are derived
5 * directly from the ACPI specification.
6 *
7 *****************************************************************************/
8
9/*
10 * Copyright (C) 2000 - 2008, Intel Corp.
11 * All rights reserved.
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions, and the following disclaimer,
18 * without modification.
19 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
20 * substantially similar to the "NO WARRANTY" disclaimer below
21 * ("Disclaimer") and any redistribution must be conditioned upon
22 * including a substantially similar Disclaimer requirement for further
23 * binary redistribution.
24 * 3. Neither the names of the above-listed copyright holders nor the names
25 * of any contributors may be used to endorse or promote products derived
26 * from this software without specific prior written permission.
27 *
28 * Alternatively, this software may be distributed under the terms of the
29 * GNU General Public License ("GPL") version 2 as published by the Free
30 * Software Foundation.
31 *
32 * NO WARRANTY
33 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
35 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
36 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
37 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
41 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
42 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
43 * POSSIBILITY OF SUCH DAMAGES.
44 */
45
46#ifndef __AMLCODE_H__
47#define __AMLCODE_H__
48
49/* primary opcodes */
50
51#define AML_NULL_CHAR (u16) 0x00
52
53#define AML_ZERO_OP (u16) 0x00
54#define AML_ONE_OP (u16) 0x01
55#define AML_UNASSIGNED (u16) 0x02
56#define AML_ALIAS_OP (u16) 0x06
57#define AML_NAME_OP (u16) 0x08
58#define AML_BYTE_OP (u16) 0x0a
59#define AML_WORD_OP (u16) 0x0b
60#define AML_DWORD_OP (u16) 0x0c
61#define AML_STRING_OP (u16) 0x0d
62#define AML_QWORD_OP (u16) 0x0e /* ACPI 2.0 */
63#define AML_SCOPE_OP (u16) 0x10
64#define AML_BUFFER_OP (u16) 0x11
65#define AML_PACKAGE_OP (u16) 0x12
66#define AML_VAR_PACKAGE_OP (u16) 0x13 /* ACPI 2.0 */
67#define AML_METHOD_OP (u16) 0x14
68#define AML_DUAL_NAME_PREFIX (u16) 0x2e
69#define AML_MULTI_NAME_PREFIX_OP (u16) 0x2f
70#define AML_NAME_CHAR_SUBSEQ (u16) 0x30
71#define AML_NAME_CHAR_FIRST (u16) 0x41
72#define AML_EXTENDED_OP_PREFIX (u16) 0x5b
73#define AML_ROOT_PREFIX (u16) 0x5c
74#define AML_PARENT_PREFIX (u16) 0x5e
75#define AML_LOCAL_OP (u16) 0x60
76#define AML_LOCAL0 (u16) 0x60
77#define AML_LOCAL1 (u16) 0x61
78#define AML_LOCAL2 (u16) 0x62
79#define AML_LOCAL3 (u16) 0x63
80#define AML_LOCAL4 (u16) 0x64
81#define AML_LOCAL5 (u16) 0x65
82#define AML_LOCAL6 (u16) 0x66
83#define AML_LOCAL7 (u16) 0x67
84#define AML_ARG_OP (u16) 0x68
85#define AML_ARG0 (u16) 0x68
86#define AML_ARG1 (u16) 0x69
87#define AML_ARG2 (u16) 0x6a
88#define AML_ARG3 (u16) 0x6b
89#define AML_ARG4 (u16) 0x6c
90#define AML_ARG5 (u16) 0x6d
91#define AML_ARG6 (u16) 0x6e
92#define AML_STORE_OP (u16) 0x70
93#define AML_REF_OF_OP (u16) 0x71
94#define AML_ADD_OP (u16) 0x72
95#define AML_CONCAT_OP (u16) 0x73
96#define AML_SUBTRACT_OP (u16) 0x74
97#define AML_INCREMENT_OP (u16) 0x75
98#define AML_DECREMENT_OP (u16) 0x76
99#define AML_MULTIPLY_OP (u16) 0x77
100#define AML_DIVIDE_OP (u16) 0x78
101#define AML_SHIFT_LEFT_OP (u16) 0x79
102#define AML_SHIFT_RIGHT_OP (u16) 0x7a
103#define AML_BIT_AND_OP (u16) 0x7b
104#define AML_BIT_NAND_OP (u16) 0x7c
105#define AML_BIT_OR_OP (u16) 0x7d
106#define AML_BIT_NOR_OP (u16) 0x7e
107#define AML_BIT_XOR_OP (u16) 0x7f
108#define AML_BIT_NOT_OP (u16) 0x80
109#define AML_FIND_SET_LEFT_BIT_OP (u16) 0x81
110#define AML_FIND_SET_RIGHT_BIT_OP (u16) 0x82
111#define AML_DEREF_OF_OP (u16) 0x83
112#define AML_CONCAT_RES_OP (u16) 0x84 /* ACPI 2.0 */
113#define AML_MOD_OP (u16) 0x85 /* ACPI 2.0 */
114#define AML_NOTIFY_OP (u16) 0x86
115#define AML_SIZE_OF_OP (u16) 0x87
116#define AML_INDEX_OP (u16) 0x88
117#define AML_MATCH_OP (u16) 0x89
118#define AML_CREATE_DWORD_FIELD_OP (u16) 0x8a
119#define AML_CREATE_WORD_FIELD_OP (u16) 0x8b
120#define AML_CREATE_BYTE_FIELD_OP (u16) 0x8c
121#define AML_CREATE_BIT_FIELD_OP (u16) 0x8d
122#define AML_TYPE_OP (u16) 0x8e
123#define AML_CREATE_QWORD_FIELD_OP (u16) 0x8f /* ACPI 2.0 */
124#define AML_LAND_OP (u16) 0x90
125#define AML_LOR_OP (u16) 0x91
126#define AML_LNOT_OP (u16) 0x92
127#define AML_LEQUAL_OP (u16) 0x93
128#define AML_LGREATER_OP (u16) 0x94
129#define AML_LLESS_OP (u16) 0x95
130#define AML_TO_BUFFER_OP (u16) 0x96 /* ACPI 2.0 */
131#define AML_TO_DECSTRING_OP (u16) 0x97 /* ACPI 2.0 */
132#define AML_TO_HEXSTRING_OP (u16) 0x98 /* ACPI 2.0 */
133#define AML_TO_INTEGER_OP (u16) 0x99 /* ACPI 2.0 */
134#define AML_TO_STRING_OP (u16) 0x9c /* ACPI 2.0 */
135#define AML_COPY_OP (u16) 0x9d /* ACPI 2.0 */
136#define AML_MID_OP (u16) 0x9e /* ACPI 2.0 */
137#define AML_CONTINUE_OP (u16) 0x9f /* ACPI 2.0 */
138#define AML_IF_OP (u16) 0xa0
139#define AML_ELSE_OP (u16) 0xa1
140#define AML_WHILE_OP (u16) 0xa2
141#define AML_NOOP_OP (u16) 0xa3
142#define AML_RETURN_OP (u16) 0xa4
143#define AML_BREAK_OP (u16) 0xa5
144#define AML_BREAK_POINT_OP (u16) 0xcc
145#define AML_ONES_OP (u16) 0xff
146
147/* prefixed opcodes */
148
149#define AML_EXTENDED_OPCODE (u16) 0x5b00 /* prefix for 2-byte opcodes */
150
151#define AML_MUTEX_OP (u16) 0x5b01
152#define AML_EVENT_OP (u16) 0x5b02
153#define AML_SHIFT_RIGHT_BIT_OP (u16) 0x5b10
154#define AML_SHIFT_LEFT_BIT_OP (u16) 0x5b11
155#define AML_COND_REF_OF_OP (u16) 0x5b12
156#define AML_CREATE_FIELD_OP (u16) 0x5b13
157#define AML_LOAD_TABLE_OP (u16) 0x5b1f /* ACPI 2.0 */
158#define AML_LOAD_OP (u16) 0x5b20
159#define AML_STALL_OP (u16) 0x5b21
160#define AML_SLEEP_OP (u16) 0x5b22
161#define AML_ACQUIRE_OP (u16) 0x5b23
162#define AML_SIGNAL_OP (u16) 0x5b24
163#define AML_WAIT_OP (u16) 0x5b25
164#define AML_RESET_OP (u16) 0x5b26
165#define AML_RELEASE_OP (u16) 0x5b27
166#define AML_FROM_BCD_OP (u16) 0x5b28
167#define AML_TO_BCD_OP (u16) 0x5b29
168#define AML_UNLOAD_OP (u16) 0x5b2a
169#define AML_REVISION_OP (u16) 0x5b30
170#define AML_DEBUG_OP (u16) 0x5b31
171#define AML_FATAL_OP (u16) 0x5b32
172#define AML_TIMER_OP (u16) 0x5b33 /* ACPI 3.0 */
173#define AML_REGION_OP (u16) 0x5b80
174#define AML_FIELD_OP (u16) 0x5b81
175#define AML_DEVICE_OP (u16) 0x5b82
176#define AML_PROCESSOR_OP (u16) 0x5b83
177#define AML_POWER_RES_OP (u16) 0x5b84
178#define AML_THERMAL_ZONE_OP (u16) 0x5b85
179#define AML_INDEX_FIELD_OP (u16) 0x5b86
180#define AML_BANK_FIELD_OP (u16) 0x5b87
181#define AML_DATA_REGION_OP (u16) 0x5b88 /* ACPI 2.0 */
182
183/*
184 * Combination opcodes (actually two one-byte opcodes)
185 * Used by the disassembler and i_aSL compiler
186 */
187#define AML_LGREATEREQUAL_OP (u16) 0x9295
188#define AML_LLESSEQUAL_OP (u16) 0x9294
189#define AML_LNOTEQUAL_OP (u16) 0x9293
190
191/*
192 * Internal opcodes
193 * Use only "Unknown" AML opcodes, don't attempt to use
194 * any valid ACPI ASCII values (A-Z, 0-9, '-')
195 */
196#define AML_INT_NAMEPATH_OP (u16) 0x002d
197#define AML_INT_NAMEDFIELD_OP (u16) 0x0030
198#define AML_INT_RESERVEDFIELD_OP (u16) 0x0031
199#define AML_INT_ACCESSFIELD_OP (u16) 0x0032
200#define AML_INT_BYTELIST_OP (u16) 0x0033
201#define AML_INT_STATICSTRING_OP (u16) 0x0034
202#define AML_INT_METHODCALL_OP (u16) 0x0035
203#define AML_INT_RETURN_VALUE_OP (u16) 0x0036
204#define AML_INT_EVAL_SUBTREE_OP (u16) 0x0037
205
206#define ARG_NONE 0x0
207
208/*
209 * Argument types for the AML Parser
210 * Each field in the arg_types u32 is 5 bits, allowing for a maximum of 6 arguments.
211 * There can be up to 31 unique argument types
212 * Zero is reserved as end-of-list indicator
213 */
214#define ARGP_BYTEDATA 0x01
215#define ARGP_BYTELIST 0x02
216#define ARGP_CHARLIST 0x03
217#define ARGP_DATAOBJ 0x04
218#define ARGP_DATAOBJLIST 0x05
219#define ARGP_DWORDDATA 0x06
220#define ARGP_FIELDLIST 0x07
221#define ARGP_NAME 0x08
222#define ARGP_NAMESTRING 0x09
223#define ARGP_OBJLIST 0x0A
224#define ARGP_PKGLENGTH 0x0B
225#define ARGP_SUPERNAME 0x0C
226#define ARGP_TARGET 0x0D
227#define ARGP_TERMARG 0x0E
228#define ARGP_TERMLIST 0x0F
229#define ARGP_WORDDATA 0x10
230#define ARGP_QWORDDATA 0x11
231#define ARGP_SIMPLENAME 0x12
232
233/*
234 * Resolved argument types for the AML Interpreter
235 * Each field in the arg_types u32 is 5 bits, allowing for a maximum of 6 arguments.
236 * There can be up to 31 unique argument types (0 is end-of-arg-list indicator)
237 *
238 * Note1: These values are completely independent from the ACPI_TYPEs
239 * i.e., ARGI_INTEGER != ACPI_TYPE_INTEGER
240 *
241 * Note2: If and when 5 bits becomes insufficient, it would probably be best
242 * to convert to a 6-byte array of argument types, allowing 8 bits per argument.
243 */
244
245/* Single, simple types */
246
247#define ARGI_ANYTYPE 0x01 /* Don't care */
248#define ARGI_PACKAGE 0x02
249#define ARGI_EVENT 0x03
250#define ARGI_MUTEX 0x04
251#define ARGI_DDBHANDLE 0x05
252
253/* Interchangeable types (via implicit conversion) */
254
255#define ARGI_INTEGER 0x06
256#define ARGI_STRING 0x07
257#define ARGI_BUFFER 0x08
258#define ARGI_BUFFER_OR_STRING 0x09 /* Used by MID op only */
259#define ARGI_COMPUTEDATA 0x0A /* Buffer, String, or Integer */
260
261/* Reference objects */
262
263#define ARGI_INTEGER_REF 0x0B
264#define ARGI_OBJECT_REF 0x0C
265#define ARGI_DEVICE_REF 0x0D
266#define ARGI_REFERENCE 0x0E
267#define ARGI_TARGETREF 0x0F /* Target, subject to implicit conversion */
268#define ARGI_FIXED_TARGET 0x10 /* Target, no implicit conversion */
269#define ARGI_SIMPLE_TARGET 0x11 /* Name, Local, Arg -- no implicit conversion */
270
271/* Multiple/complex types */
272
273#define ARGI_DATAOBJECT 0x12 /* Buffer, String, package or reference to a Node - Used only by size_of operator */
274#define ARGI_COMPLEXOBJ 0x13 /* Buffer, String, or package (Used by INDEX op only) */
275#define ARGI_REF_OR_STRING 0x14 /* Reference or String (Used by DEREFOF op only) */
276#define ARGI_REGION_OR_BUFFER 0x15 /* Used by LOAD op only */
277#define ARGI_DATAREFOBJ 0x16
278
279/* Note: types above can expand to 0x1F maximum */
280
281#define ARGI_INVALID_OPCODE 0xFFFFFFFF
282
283/*
284 * hash offsets
285 */
286#define AML_EXTOP_HASH_OFFSET 22
287#define AML_LNOT_HASH_OFFSET 19
288
289/*
290 * opcode groups and types
291 */
292#define OPGRP_NAMED 0x01
293#define OPGRP_FIELD 0x02
294#define OPGRP_BYTELIST 0x04
295
296/*
297 * Opcode information
298 */
299
300/* Opcode flags */
301
302#define AML_LOGICAL 0x0001
303#define AML_LOGICAL_NUMERIC 0x0002
304#define AML_MATH 0x0004
305#define AML_CREATE 0x0008
306#define AML_FIELD 0x0010
307#define AML_DEFER 0x0020
308#define AML_NAMED 0x0040
309#define AML_NSNODE 0x0080
310#define AML_NSOPCODE 0x0100
311#define AML_NSOBJECT 0x0200
312#define AML_HAS_RETVAL 0x0400
313#define AML_HAS_TARGET 0x0800
314#define AML_HAS_ARGS 0x1000
315#define AML_CONSTANT 0x2000
316#define AML_NO_OPERAND_RESOLVE 0x4000
317
318/* Convenient flag groupings */
319
320#define AML_FLAGS_EXEC_0A_0T_1R AML_HAS_RETVAL
321#define AML_FLAGS_EXEC_1A_0T_0R AML_HAS_ARGS /* Monadic1 */
322#define AML_FLAGS_EXEC_1A_0T_1R AML_HAS_ARGS | AML_HAS_RETVAL /* Monadic2 */
323#define AML_FLAGS_EXEC_1A_1T_0R AML_HAS_ARGS | AML_HAS_TARGET
324#define AML_FLAGS_EXEC_1A_1T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL /* monadic2_r */
325#define AML_FLAGS_EXEC_2A_0T_0R AML_HAS_ARGS /* Dyadic1 */
326#define AML_FLAGS_EXEC_2A_0T_1R AML_HAS_ARGS | AML_HAS_RETVAL /* Dyadic2 */
327#define AML_FLAGS_EXEC_2A_1T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL /* dyadic2_r */
328#define AML_FLAGS_EXEC_2A_2T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL
329#define AML_FLAGS_EXEC_3A_0T_0R AML_HAS_ARGS
330#define AML_FLAGS_EXEC_3A_1T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL
331#define AML_FLAGS_EXEC_6A_0T_1R AML_HAS_ARGS | AML_HAS_RETVAL
332
333/*
334 * The opcode Type is used in a dispatch table, do not change
335 * without updating the table.
336 */
337#define AML_TYPE_EXEC_0A_0T_1R 0x00
338#define AML_TYPE_EXEC_1A_0T_0R 0x01 /* Monadic1 */
339#define AML_TYPE_EXEC_1A_0T_1R 0x02 /* Monadic2 */
340#define AML_TYPE_EXEC_1A_1T_0R 0x03
341#define AML_TYPE_EXEC_1A_1T_1R 0x04 /* monadic2_r */
342#define AML_TYPE_EXEC_2A_0T_0R 0x05 /* Dyadic1 */
343#define AML_TYPE_EXEC_2A_0T_1R 0x06 /* Dyadic2 */
344#define AML_TYPE_EXEC_2A_1T_1R 0x07 /* dyadic2_r */
345#define AML_TYPE_EXEC_2A_2T_1R 0x08
346#define AML_TYPE_EXEC_3A_0T_0R 0x09
347#define AML_TYPE_EXEC_3A_1T_1R 0x0A
348#define AML_TYPE_EXEC_6A_0T_1R 0x0B
349/* End of types used in dispatch table */
350
351#define AML_TYPE_LITERAL 0x0B
352#define AML_TYPE_CONSTANT 0x0C
353#define AML_TYPE_METHOD_ARGUMENT 0x0D
354#define AML_TYPE_LOCAL_VARIABLE 0x0E
355#define AML_TYPE_DATA_TERM 0x0F
356
357/* Generic for an op that returns a value */
358
359#define AML_TYPE_METHOD_CALL 0x10
360
361/* Misc */
362
363#define AML_TYPE_CREATE_FIELD 0x11
364#define AML_TYPE_CREATE_OBJECT 0x12
365#define AML_TYPE_CONTROL 0x13
366#define AML_TYPE_NAMED_NO_OBJ 0x14
367#define AML_TYPE_NAMED_FIELD 0x15
368#define AML_TYPE_NAMED_SIMPLE 0x16
369#define AML_TYPE_NAMED_COMPLEX 0x17
370#define AML_TYPE_RETURN 0x18
371
372#define AML_TYPE_UNDEFINED 0x19
373#define AML_TYPE_BOGUS 0x1A
374
375/* AML Package Length encodings */
376
377#define ACPI_AML_PACKAGE_TYPE1 0x40
378#define ACPI_AML_PACKAGE_TYPE2 0x4000
379#define ACPI_AML_PACKAGE_TYPE3 0x400000
380#define ACPI_AML_PACKAGE_TYPE4 0x40000000
381
382/*
383 * Opcode classes
384 */
385#define AML_CLASS_EXECUTE 0x00
386#define AML_CLASS_CREATE 0x01
387#define AML_CLASS_ARGUMENT 0x02
388#define AML_CLASS_NAMED_OBJECT 0x03
389#define AML_CLASS_CONTROL 0x04
390#define AML_CLASS_ASCII 0x05
391#define AML_CLASS_PREFIX 0x06
392#define AML_CLASS_INTERNAL 0x07
393#define AML_CLASS_RETURN_VALUE 0x08
394#define AML_CLASS_METHOD_CALL 0x09
395#define AML_CLASS_UNKNOWN 0x0A
396
397/* Predefined Operation Region space_iDs */
398
399typedef enum {
400 REGION_MEMORY = 0,
401 REGION_IO,
402 REGION_PCI_CONFIG,
403 REGION_EC,
404 REGION_SMBUS,
405 REGION_CMOS,
406 REGION_PCI_BAR,
407 REGION_DATA_TABLE, /* Internal use only */
408 REGION_FIXED_HW = 0x7F
409} AML_REGION_TYPES;
410
411/* Comparison operation codes for match_op operator */
412
413typedef enum {
414 MATCH_MTR = 0,
415 MATCH_MEQ = 1,
416 MATCH_MLE = 2,
417 MATCH_MLT = 3,
418 MATCH_MGE = 4,
419 MATCH_MGT = 5
420} AML_MATCH_OPERATOR;
421
422#define MAX_MATCH_OPERATOR 5
423
424/*
425 * field_flags
426 *
427 * This byte is extracted from the AML and includes three separate
428 * pieces of information about the field:
429 * 1) The field access type
430 * 2) The field update rule
431 * 3) The lock rule for the field
432 *
433 * Bits 00 - 03 : access_type (any_acc, byte_acc, etc.)
434 * 04 : lock_rule (1 == Lock)
435 * 05 - 06 : update_rule
436 */
437#define AML_FIELD_ACCESS_TYPE_MASK 0x0F
438#define AML_FIELD_LOCK_RULE_MASK 0x10
439#define AML_FIELD_UPDATE_RULE_MASK 0x60
440
441/* 1) Field Access Types */
442
443typedef enum {
444 AML_FIELD_ACCESS_ANY = 0x00,
445 AML_FIELD_ACCESS_BYTE = 0x01,
446 AML_FIELD_ACCESS_WORD = 0x02,
447 AML_FIELD_ACCESS_DWORD = 0x03,
448 AML_FIELD_ACCESS_QWORD = 0x04, /* ACPI 2.0 */
449 AML_FIELD_ACCESS_BUFFER = 0x05 /* ACPI 2.0 */
450} AML_ACCESS_TYPE;
451
452/* 2) Field Lock Rules */
453
454typedef enum {
455 AML_FIELD_LOCK_NEVER = 0x00,
456 AML_FIELD_LOCK_ALWAYS = 0x10
457} AML_LOCK_RULE;
458
459/* 3) Field Update Rules */
460
461typedef enum {
462 AML_FIELD_UPDATE_PRESERVE = 0x00,
463 AML_FIELD_UPDATE_WRITE_AS_ONES = 0x20,
464 AML_FIELD_UPDATE_WRITE_AS_ZEROS = 0x40
465} AML_UPDATE_RULE;
466
467/*
468 * Field Access Attributes.
469 * This byte is extracted from the AML via the
470 * access_as keyword
471 */
472typedef enum {
473 AML_FIELD_ATTRIB_SMB_QUICK = 0x02,
474 AML_FIELD_ATTRIB_SMB_SEND_RCV = 0x04,
475 AML_FIELD_ATTRIB_SMB_BYTE = 0x06,
476 AML_FIELD_ATTRIB_SMB_WORD = 0x08,
477 AML_FIELD_ATTRIB_SMB_BLOCK = 0x0A,
478 AML_FIELD_ATTRIB_SMB_WORD_CALL = 0x0C,
479 AML_FIELD_ATTRIB_SMB_BLOCK_CALL = 0x0D
480} AML_ACCESS_ATTRIBUTE;
481
482/* Bit fields in method_flags byte */
483
484#define AML_METHOD_ARG_COUNT 0x07
485#define AML_METHOD_SERIALIZED 0x08
486#define AML_METHOD_SYNCH_LEVEL 0xF0
487
488/* METHOD_FLAGS_ARG_COUNT is not used internally, define additional flags */
489
490#define AML_METHOD_INTERNAL_ONLY 0x01
491#define AML_METHOD_RESERVED1 0x02
492#define AML_METHOD_RESERVED2 0x04
493
494#endif /* __AMLCODE_H__ */
diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h
new file mode 100644
index 000000000000..7b070e42b7c5
--- /dev/null
+++ b/drivers/acpi/acpica/amlresrc.h
@@ -0,0 +1,311 @@
1
2/******************************************************************************
3 *
4 * Module Name: amlresrc.h - AML resource descriptors
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/* acpisrc:struct_defs -- for acpisrc conversion */
46
47#ifndef __AMLRESRC_H
48#define __AMLRESRC_H
49
50/*
51 * Resource descriptor tags, as defined in the ACPI specification.
52 * Used to symbolically reference fields within a descriptor.
53 */
54#define ACPI_RESTAG_ADDRESS "_ADR"
55#define ACPI_RESTAG_ALIGNMENT "_ALN"
56#define ACPI_RESTAG_ADDRESSSPACE "_ASI"
57#define ACPI_RESTAG_ACCESSSIZE "_ASZ"
58#define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT"
59#define ACPI_RESTAG_BASEADDRESS "_BAS"
60#define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */
61#define ACPI_RESTAG_DECODE "_DEC"
62#define ACPI_RESTAG_DMA "_DMA"
63#define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */
64#define ACPI_RESTAG_GRANULARITY "_GRA"
65#define ACPI_RESTAG_INTERRUPT "_INT"
66#define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */
67#define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */
68#define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */
69#define ACPI_RESTAG_LENGTH "_LEN"
70#define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
71#define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
72#define ACPI_RESTAG_MAXADDR "_MAX"
73#define ACPI_RESTAG_MINADDR "_MIN"
74#define ACPI_RESTAG_MAXTYPE "_MAF"
75#define ACPI_RESTAG_MINTYPE "_MIF"
76#define ACPI_RESTAG_REGISTERBITOFFSET "_RBO"
77#define ACPI_RESTAG_REGISTERBITWIDTH "_RBW"
78#define ACPI_RESTAG_RANGETYPE "_RNG"
79#define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */
80#define ACPI_RESTAG_TRANSLATION "_TRA"
81#define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */
82#define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */
83#define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */
84
85/* Default sizes for "small" resource descriptors */
86
87#define ASL_RDESC_IRQ_SIZE 0x02
88#define ASL_RDESC_DMA_SIZE 0x02
89#define ASL_RDESC_ST_DEPEND_SIZE 0x00
90#define ASL_RDESC_END_DEPEND_SIZE 0x00
91#define ASL_RDESC_IO_SIZE 0x07
92#define ASL_RDESC_FIXED_IO_SIZE 0x03
93#define ASL_RDESC_END_TAG_SIZE 0x01
94
95struct asl_resource_node {
96 u32 buffer_length;
97 void *buffer;
98 struct asl_resource_node *next;
99};
100
101/* Macros used to generate AML resource length fields */
102
103#define ACPI_AML_SIZE_LARGE(r) (sizeof (r) - sizeof (struct aml_resource_large_header))
104#define ACPI_AML_SIZE_SMALL(r) (sizeof (r) - sizeof (struct aml_resource_small_header))
105
106/*
107 * Resource descriptors defined in the ACPI specification.
108 *
109 * Packing/alignment must be BYTE because these descriptors
110 * are used to overlay the raw AML byte stream.
111 */
112#pragma pack(1)
113
114/*
115 * SMALL descriptors
116 */
117#define AML_RESOURCE_SMALL_HEADER_COMMON \
118 u8 descriptor_type;
119
120struct aml_resource_small_header {
121AML_RESOURCE_SMALL_HEADER_COMMON};
122
123struct aml_resource_irq {
124 AML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask;
125 u8 flags;
126};
127
128struct aml_resource_irq_noflags {
129 AML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask;
130};
131
132struct aml_resource_dma {
133 AML_RESOURCE_SMALL_HEADER_COMMON u8 dma_channel_mask;
134 u8 flags;
135};
136
137struct aml_resource_start_dependent {
138 AML_RESOURCE_SMALL_HEADER_COMMON u8 flags;
139};
140
141struct aml_resource_start_dependent_noprio {
142AML_RESOURCE_SMALL_HEADER_COMMON};
143
144struct aml_resource_end_dependent {
145AML_RESOURCE_SMALL_HEADER_COMMON};
146
147struct aml_resource_io {
148 AML_RESOURCE_SMALL_HEADER_COMMON u8 flags;
149 u16 minimum;
150 u16 maximum;
151 u8 alignment;
152 u8 address_length;
153};
154
155struct aml_resource_fixed_io {
156 AML_RESOURCE_SMALL_HEADER_COMMON u16 address;
157 u8 address_length;
158};
159
160struct aml_resource_vendor_small {
161AML_RESOURCE_SMALL_HEADER_COMMON};
162
163struct aml_resource_end_tag {
164 AML_RESOURCE_SMALL_HEADER_COMMON u8 checksum;
165};
166
167/*
168 * LARGE descriptors
169 */
170#define AML_RESOURCE_LARGE_HEADER_COMMON \
171 u8 descriptor_type;\
172 u16 resource_length;
173
174struct aml_resource_large_header {
175AML_RESOURCE_LARGE_HEADER_COMMON};
176
177struct aml_resource_memory24 {
178 AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
179 u16 minimum;
180 u16 maximum;
181 u16 alignment;
182 u16 address_length;
183};
184
185struct aml_resource_vendor_large {
186AML_RESOURCE_LARGE_HEADER_COMMON};
187
188struct aml_resource_memory32 {
189 AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
190 u32 minimum;
191 u32 maximum;
192 u32 alignment;
193 u32 address_length;
194};
195
196struct aml_resource_fixed_memory32 {
197 AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
198 u32 address;
199 u32 address_length;
200};
201
202#define AML_RESOURCE_ADDRESS_COMMON \
203 u8 resource_type; \
204 u8 flags; \
205 u8 specific_flags;
206
207struct aml_resource_address {
208AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON};
209
210struct aml_resource_extended_address64 {
211 AML_RESOURCE_LARGE_HEADER_COMMON
212 AML_RESOURCE_ADDRESS_COMMON u8 revision_iD;
213 u8 reserved;
214 u64 granularity;
215 u64 minimum;
216 u64 maximum;
217 u64 translation_offset;
218 u64 address_length;
219 u64 type_specific;
220};
221
222#define AML_RESOURCE_EXTENDED_ADDRESS_REVISION 1 /* ACPI 3.0 */
223
224struct aml_resource_address64 {
225 AML_RESOURCE_LARGE_HEADER_COMMON
226 AML_RESOURCE_ADDRESS_COMMON u64 granularity;
227 u64 minimum;
228 u64 maximum;
229 u64 translation_offset;
230 u64 address_length;
231};
232
233struct aml_resource_address32 {
234 AML_RESOURCE_LARGE_HEADER_COMMON
235 AML_RESOURCE_ADDRESS_COMMON u32 granularity;
236 u32 minimum;
237 u32 maximum;
238 u32 translation_offset;
239 u32 address_length;
240};
241
242struct aml_resource_address16 {
243 AML_RESOURCE_LARGE_HEADER_COMMON
244 AML_RESOURCE_ADDRESS_COMMON u16 granularity;
245 u16 minimum;
246 u16 maximum;
247 u16 translation_offset;
248 u16 address_length;
249};
250
251struct aml_resource_extended_irq {
252 AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
253 u8 interrupt_count;
254 u32 interrupts[1];
255 /* res_source_index, res_source optional fields follow */
256};
257
258struct aml_resource_generic_register {
259 AML_RESOURCE_LARGE_HEADER_COMMON u8 address_space_id;
260 u8 bit_width;
261 u8 bit_offset;
262 u8 access_size; /* ACPI 3.0, was previously Reserved */
263 u64 address;
264};
265
266/* restore default alignment */
267
268#pragma pack()
269
270/* Union of all resource descriptors, so we can allocate the worst case */
271
272union aml_resource {
273 /* Descriptor headers */
274
275 u8 descriptor_type;
276 struct aml_resource_small_header small_header;
277 struct aml_resource_large_header large_header;
278
279 /* Small resource descriptors */
280
281 struct aml_resource_irq irq;
282 struct aml_resource_dma dma;
283 struct aml_resource_start_dependent start_dpf;
284 struct aml_resource_end_dependent end_dpf;
285 struct aml_resource_io io;
286 struct aml_resource_fixed_io fixed_io;
287 struct aml_resource_vendor_small vendor_small;
288 struct aml_resource_end_tag end_tag;
289
290 /* Large resource descriptors */
291
292 struct aml_resource_memory24 memory24;
293 struct aml_resource_generic_register generic_reg;
294 struct aml_resource_vendor_large vendor_large;
295 struct aml_resource_memory32 memory32;
296 struct aml_resource_fixed_memory32 fixed_memory32;
297 struct aml_resource_address16 address16;
298 struct aml_resource_address32 address32;
299 struct aml_resource_address64 address64;
300 struct aml_resource_extended_address64 ext_address64;
301 struct aml_resource_extended_irq extended_irq;
302
303 /* Utility overlays */
304
305 struct aml_resource_address address;
306 u32 dword_item;
307 u16 word_item;
308 u8 byte_item;
309};
310
311#endif
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index 5fbc24075b44..53e27bc5a734 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -42,12 +42,12 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/amlcode.h> 46#include "amlcode.h"
47#include <acpi/acdispat.h> 47#include "acdispat.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49#include <acpi/acnamesp.h> 49#include "acnamesp.h"
50#include <acpi/acparser.h> 50#include "acparser.h"
51 51
52#define _COMPONENT ACPI_DISPATCHER 52#define _COMPONENT ACPI_DISPATCHER
53ACPI_MODULE_NAME("dsfield") 53ACPI_MODULE_NAME("dsfield")
diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c
index 4f1cdd823fcc..eb144b13d8fa 100644
--- a/drivers/acpi/acpica/dsinit.c
+++ b/drivers/acpi/acpica/dsinit.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acdispat.h> 46#include "acdispat.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/actables.h> 48#include "actables.h"
49 49
50#define _COMPONENT ACPI_DISPATCHER 50#define _COMPONENT ACPI_DISPATCHER
51ACPI_MODULE_NAME("dsinit") 51ACPI_MODULE_NAME("dsinit")
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index 333c8560d9f8..14b8b8ed8023 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -42,11 +42,11 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/amlcode.h> 46#include "amlcode.h"
47#include <acpi/acdispat.h> 47#include "acdispat.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49#include <acpi/acnamesp.h> 49#include "acnamesp.h"
50#ifdef ACPI_DISASSEMBLER 50#ifdef ACPI_DISASSEMBLER
51#include <acpi/acdisasm.h> 51#include <acpi/acdisasm.h>
52#endif 52#endif
diff --git a/drivers/acpi/acpica/dsmthdat.c b/drivers/acpi/acpica/dsmthdat.c
index a1a11996a651..da0f5468184c 100644
--- a/drivers/acpi/acpica/dsmthdat.c
+++ b/drivers/acpi/acpica/dsmthdat.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acdispat.h> 46#include "acdispat.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49 49
50#define _COMPONENT ACPI_DISPATCHER 50#define _COMPONENT ACPI_DISPATCHER
51ACPI_MODULE_NAME("dsmthdat") 51ACPI_MODULE_NAME("dsmthdat")
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c
index 6e6c73cc39ff..15c628e6aa00 100644
--- a/drivers/acpi/acpica/dsobject.c
+++ b/drivers/acpi/acpica/dsobject.c
@@ -42,12 +42,12 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48#include <acpi/acdispat.h> 48#include "acdispat.h"
49#include <acpi/acnamesp.h> 49#include "acnamesp.h"
50#include <acpi/acinterp.h> 50#include "acinterp.h"
51 51
52#define _COMPONENT ACPI_DISPATCHER 52#define _COMPONENT ACPI_DISPATCHER
53ACPI_MODULE_NAME("dsobject") 53ACPI_MODULE_NAME("dsobject")
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index cb8a0d3109f0..0c3b4dd60e8a 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -43,14 +43,14 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acparser.h> 47#include "acparser.h"
48#include <acpi/amlcode.h> 48#include "amlcode.h"
49#include <acpi/acdispat.h> 49#include "acdispat.h"
50#include <acpi/acinterp.h> 50#include "acinterp.h"
51#include <acpi/acnamesp.h> 51#include "acnamesp.h"
52#include <acpi/acevents.h> 52#include "acevents.h"
53#include <acpi/actables.h> 53#include "actables.h"
54 54
55#define _COMPONENT ACPI_DISPATCHER 55#define _COMPONENT ACPI_DISPATCHER
56ACPI_MODULE_NAME("dsopcode") 56ACPI_MODULE_NAME("dsopcode")
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index 9c88846ca2ce..dabc23a46176 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -42,13 +42,13 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48#include <acpi/acdispat.h> 48#include "acdispat.h"
49#include <acpi/acinterp.h> 49#include "acinterp.h"
50#include <acpi/acnamesp.h> 50#include "acnamesp.h"
51#include <acpi/acdebug.h> 51#include "acdebug.h"
52 52
53#define _COMPONENT ACPI_DISPATCHER 53#define _COMPONENT ACPI_DISPATCHER
54ACPI_MODULE_NAME("dsutils") 54ACPI_MODULE_NAME("dsutils")
diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c
index 2482cbd37f25..350e6656bc89 100644
--- a/drivers/acpi/acpica/dswexec.c
+++ b/drivers/acpi/acpica/dswexec.c
@@ -43,13 +43,13 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acparser.h> 47#include "acparser.h"
48#include <acpi/amlcode.h> 48#include "amlcode.h"
49#include <acpi/acdispat.h> 49#include "acdispat.h"
50#include <acpi/acinterp.h> 50#include "acinterp.h"
51#include <acpi/acnamesp.h> 51#include "acnamesp.h"
52#include <acpi/acdebug.h> 52#include "acdebug.h"
53 53
54#define _COMPONENT ACPI_DISPATCHER 54#define _COMPONENT ACPI_DISPATCHER
55ACPI_MODULE_NAME("dswexec") 55ACPI_MODULE_NAME("dswexec")
diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c
index 2d71ceda3d56..3023ceaa8d54 100644
--- a/drivers/acpi/acpica/dswload.c
+++ b/drivers/acpi/acpica/dswload.c
@@ -42,13 +42,13 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48#include <acpi/acdispat.h> 48#include "acdispat.h"
49#include <acpi/acinterp.h> 49#include "acinterp.h"
50#include <acpi/acnamesp.h> 50#include "acnamesp.h"
51#include <acpi/acevents.h> 51#include "acevents.h"
52 52
53#ifdef ACPI_ASL_COMPILER 53#ifdef ACPI_ASL_COMPILER
54#include <acpi/acdisasm.h> 54#include <acpi/acdisasm.h>
diff --git a/drivers/acpi/acpica/dswscope.c b/drivers/acpi/acpica/dswscope.c
index 8030541a49f7..908645e72f03 100644
--- a/drivers/acpi/acpica/dswscope.c
+++ b/drivers/acpi/acpica/dswscope.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acdispat.h> 46#include "acdispat.h"
47 47
48#define _COMPONENT ACPI_DISPATCHER 48#define _COMPONENT ACPI_DISPATCHER
49ACPI_MODULE_NAME("dswscope") 49ACPI_MODULE_NAME("dswscope")
diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c
index a7543c43c151..40f92bf7dce5 100644
--- a/drivers/acpi/acpica/dswstate.c
+++ b/drivers/acpi/acpica/dswstate.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/acdispat.h> 47#include "acdispat.h"
48#include <acpi/acnamesp.h> 48#include "acnamesp.h"
49 49
50#define _COMPONENT ACPI_DISPATCHER 50#define _COMPONENT ACPI_DISPATCHER
51ACPI_MODULE_NAME("dswstate") 51ACPI_MODULE_NAME("dswstate")
diff --git a/drivers/acpi/acpica/evevent.c b/drivers/acpi/acpica/evevent.c
index 86bf08365dad..803edd9e3f6a 100644
--- a/drivers/acpi/acpica/evevent.c
+++ b/drivers/acpi/acpica/evevent.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acevents.h> 46#include "acevents.h"
47 47
48#define _COMPONENT ACPI_EVENTS 48#define _COMPONENT ACPI_EVENTS
49ACPI_MODULE_NAME("evevent") 49ACPI_MODULE_NAME("evevent")
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index d9779608dbd7..f345ced36477 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acevents.h> 46#include "acevents.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_EVENTS 49#define _COMPONENT ACPI_EVENTS
50ACPI_MODULE_NAME("evgpe") 50ACPI_MODULE_NAME("evgpe")
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c
index 2a8d1856038f..484cc0565d5b 100644
--- a/drivers/acpi/acpica/evgpeblk.c
+++ b/drivers/acpi/acpica/evgpeblk.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acevents.h> 46#include "acevents.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_EVENTS 49#define _COMPONENT ACPI_EVENTS
50ACPI_MODULE_NAME("evgpeblk") 50ACPI_MODULE_NAME("evgpeblk")
diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c
index 16f2c1a00167..5f893057bcc6 100644
--- a/drivers/acpi/acpica/evmisc.c
+++ b/drivers/acpi/acpica/evmisc.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acevents.h> 46#include "acevents.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49 49
50#define _COMPONENT ACPI_EVENTS 50#define _COMPONENT ACPI_EVENTS
51ACPI_MODULE_NAME("evmisc") 51ACPI_MODULE_NAME("evmisc")
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c
index 7346093f43ed..665c0887ab4d 100644
--- a/drivers/acpi/acpica/evregion.c
+++ b/drivers/acpi/acpica/evregion.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acevents.h> 46#include "acevents.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49 49
50#define _COMPONENT ACPI_EVENTS 50#define _COMPONENT ACPI_EVENTS
51ACPI_MODULE_NAME("evregion") 51ACPI_MODULE_NAME("evregion")
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c
index 1b7f9fdbef15..f3f1fb45c3dc 100644
--- a/drivers/acpi/acpica/evrgnini.c
+++ b/drivers/acpi/acpica/evrgnini.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acevents.h> 46#include "acevents.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_EVENTS 49#define _COMPONENT ACPI_EVENTS
50ACPI_MODULE_NAME("evrgnini") 50ACPI_MODULE_NAME("evrgnini")
diff --git a/drivers/acpi/acpica/evsci.c b/drivers/acpi/acpica/evsci.c
index 18dce10c5fb1..567b356c85af 100644
--- a/drivers/acpi/acpica/evsci.c
+++ b/drivers/acpi/acpica/evsci.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acevents.h> 47#include "acevents.h"
48 48
49#define _COMPONENT ACPI_EVENTS 49#define _COMPONENT ACPI_EVENTS
50ACPI_MODULE_NAME("evsci") 50ACPI_MODULE_NAME("evsci")
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c
index 3b6a069f5b06..3aca9010a11e 100644
--- a/drivers/acpi/acpica/evxface.c
+++ b/drivers/acpi/acpica/evxface.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47#include <acpi/acevents.h> 47#include "acevents.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49 49
50#define _COMPONENT ACPI_EVENTS 50#define _COMPONENT ACPI_EVENTS
51ACPI_MODULE_NAME("evxface") 51ACPI_MODULE_NAME("evxface")
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c
index f33cc30cb6b8..35485e4b60a6 100644
--- a/drivers/acpi/acpica/evxfevnt.c
+++ b/drivers/acpi/acpica/evxfevnt.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acevents.h> 46#include "acevents.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/actables.h> 48#include "actables.h"
49 49
50#define _COMPONENT ACPI_EVENTS 50#define _COMPONENT ACPI_EVENTS
51ACPI_MODULE_NAME("evxfevnt") 51ACPI_MODULE_NAME("evxfevnt")
diff --git a/drivers/acpi/acpica/evxfregn.c b/drivers/acpi/acpica/evxfregn.c
index b8633947391b..479e7a3721be 100644
--- a/drivers/acpi/acpica/evxfregn.c
+++ b/drivers/acpi/acpica/evxfregn.c
@@ -43,9 +43,9 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/acevents.h> 48#include "acevents.h"
49 49
50#define _COMPONENT ACPI_EVENTS 50#define _COMPONENT ACPI_EVENTS
51ACPI_MODULE_NAME("evxfregn") 51ACPI_MODULE_NAME("evxfregn")
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index be32d0105fe2..932bbc26aa04 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -42,11 +42,11 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acinterp.h> 46#include "acinterp.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/actables.h> 48#include "actables.h"
49#include <acpi/acdispat.h> 49#include "acdispat.h"
50 50
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52ACPI_MODULE_NAME("exconfig") 52ACPI_MODULE_NAME("exconfig")
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index caeead439e8c..0be10188316e 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acinterp.h> 46#include "acinterp.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48 48
49#define _COMPONENT ACPI_EXECUTER 49#define _COMPONENT ACPI_EXECUTER
50ACPI_MODULE_NAME("exconvrt") 50ACPI_MODULE_NAME("exconvrt")
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index 5aa65a214fc2..a57ad2564ab0 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acinterp.h> 46#include "acinterp.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48#include <acpi/acnamesp.h> 48#include "acnamesp.h"
49 49
50#define _COMPONENT ACPI_EXECUTER 50#define _COMPONENT ACPI_EXECUTER
51ACPI_MODULE_NAME("excreate") 51ACPI_MODULE_NAME("excreate")
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c
index 8241b9eff6c1..aa313574b0df 100644
--- a/drivers/acpi/acpica/exdump.c
+++ b/drivers/acpi/acpica/exdump.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acinterp.h> 46#include "acinterp.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48#include <acpi/acnamesp.h> 48#include "acnamesp.h"
49 49
50#define _COMPONENT ACPI_EXECUTER 50#define _COMPONENT ACPI_EXECUTER
51ACPI_MODULE_NAME("exdump") 51ACPI_MODULE_NAME("exdump")
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index 7b6df031039d..a352d0233857 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acdispat.h> 46#include "acdispat.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48 48
49#define _COMPONENT ACPI_EXECUTER 49#define _COMPONENT ACPI_EXECUTER
50ACPI_MODULE_NAME("exfield") 50ACPI_MODULE_NAME("exfield")
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index 33cd17a1064f..ef58ac4e687b 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -42,11 +42,11 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acinterp.h> 46#include "acinterp.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48#include <acpi/acevents.h> 48#include "acevents.h"
49#include <acpi/acdispat.h> 49#include "acdispat.h"
50 50
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52ACPI_MODULE_NAME("exfldio") 52ACPI_MODULE_NAME("exfldio")
diff --git a/drivers/acpi/acpica/exmisc.c b/drivers/acpi/acpica/exmisc.c
index e445463de8a9..6b0747ac683b 100644
--- a/drivers/acpi/acpica/exmisc.c
+++ b/drivers/acpi/acpica/exmisc.c
@@ -43,10 +43,10 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48#include <acpi/amlcode.h> 48#include "amlcode.h"
49#include <acpi/amlresrc.h> 49#include "amlresrc.h"
50 50
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52ACPI_MODULE_NAME("exmisc") 52ACPI_MODULE_NAME("exmisc")
diff --git a/drivers/acpi/acpica/exmutex.c b/drivers/acpi/acpica/exmutex.c
index f86bcee8d656..d301c1f363ef 100644
--- a/drivers/acpi/acpica/exmutex.c
+++ b/drivers/acpi/acpica/exmutex.c
@@ -43,9 +43,9 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48#include <acpi/acevents.h> 48#include "acevents.h"
49 49
50#define _COMPONENT ACPI_EXECUTER 50#define _COMPONENT ACPI_EXECUTER
51ACPI_MODULE_NAME("exmutex") 51ACPI_MODULE_NAME("exmutex")
diff --git a/drivers/acpi/acpica/exnames.c b/drivers/acpi/acpica/exnames.c
index 12d3513531e1..ffdae122d94a 100644
--- a/drivers/acpi/acpica/exnames.c
+++ b/drivers/acpi/acpica/exnames.c
@@ -43,9 +43,9 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48#include <acpi/amlcode.h> 48#include "amlcode.h"
49 49
50#define _COMPONENT ACPI_EXECUTER 50#define _COMPONENT ACPI_EXECUTER
51ACPI_MODULE_NAME("exnames") 51ACPI_MODULE_NAME("exnames")
diff --git a/drivers/acpi/acpica/exoparg1.c b/drivers/acpi/acpica/exoparg1.c
index 52d78b8622be..b530480cc7d5 100644
--- a/drivers/acpi/acpica/exoparg1.c
+++ b/drivers/acpi/acpica/exoparg1.c
@@ -43,12 +43,12 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acparser.h> 47#include "acparser.h"
48#include <acpi/acdispat.h> 48#include "acdispat.h"
49#include <acpi/acinterp.h> 49#include "acinterp.h"
50#include <acpi/amlcode.h> 50#include "amlcode.h"
51#include <acpi/acnamesp.h> 51#include "acnamesp.h"
52 52
53#define _COMPONENT ACPI_EXECUTER 53#define _COMPONENT ACPI_EXECUTER
54ACPI_MODULE_NAME("exoparg1") 54ACPI_MODULE_NAME("exoparg1")
diff --git a/drivers/acpi/acpica/exoparg2.c b/drivers/acpi/acpica/exoparg2.c
index b01980df1365..0b4f513ca885 100644
--- a/drivers/acpi/acpica/exoparg2.c
+++ b/drivers/acpi/acpica/exoparg2.c
@@ -42,11 +42,11 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48#include <acpi/acevents.h> 48#include "acevents.h"
49#include <acpi/amlcode.h> 49#include "amlcode.h"
50 50
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52ACPI_MODULE_NAME("exoparg2") 52ACPI_MODULE_NAME("exoparg2")
diff --git a/drivers/acpi/acpica/exoparg3.c b/drivers/acpi/acpica/exoparg3.c
index 26dbd5c2c1da..c6520bbf882b 100644
--- a/drivers/acpi/acpica/exoparg3.c
+++ b/drivers/acpi/acpica/exoparg3.c
@@ -43,10 +43,10 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48#include <acpi/acparser.h> 48#include "acparser.h"
49#include <acpi/amlcode.h> 49#include "amlcode.h"
50 50
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52ACPI_MODULE_NAME("exoparg3") 52ACPI_MODULE_NAME("exoparg3")
diff --git a/drivers/acpi/acpica/exoparg6.c b/drivers/acpi/acpica/exoparg6.c
index bbbba504979f..ae43f7670a6c 100644
--- a/drivers/acpi/acpica/exoparg6.c
+++ b/drivers/acpi/acpica/exoparg6.c
@@ -43,10 +43,10 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48#include <acpi/acparser.h> 48#include "acparser.h"
49#include <acpi/amlcode.h> 49#include "amlcode.h"
50 50
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52ACPI_MODULE_NAME("exoparg6") 52ACPI_MODULE_NAME("exoparg6")
diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c
index 8f2baa934e95..33c66eb3ae39 100644
--- a/drivers/acpi/acpica/exprep.c
+++ b/drivers/acpi/acpica/exprep.c
@@ -43,10 +43,10 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48#include <acpi/amlcode.h> 48#include "amlcode.h"
49#include <acpi/acnamesp.h> 49#include "acnamesp.h"
50 50
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52ACPI_MODULE_NAME("exprep") 52ACPI_MODULE_NAME("exprep")
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index ceb269e45aba..76ec8ff903b8 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48 48
49#define _COMPONENT ACPI_EXECUTER 49#define _COMPONENT ACPI_EXECUTER
50ACPI_MODULE_NAME("exregion") 50ACPI_MODULE_NAME("exregion")
diff --git a/drivers/acpi/acpica/exresnte.c b/drivers/acpi/acpica/exresnte.c
index 77df6e490e70..a063a74006f6 100644
--- a/drivers/acpi/acpica/exresnte.c
+++ b/drivers/acpi/acpica/exresnte.c
@@ -43,10 +43,10 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acdispat.h> 47#include "acdispat.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49#include <acpi/acnamesp.h> 49#include "acnamesp.h"
50 50
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52ACPI_MODULE_NAME("exresnte") 52ACPI_MODULE_NAME("exresnte")
diff --git a/drivers/acpi/acpica/exresolv.c b/drivers/acpi/acpica/exresolv.c
index 42adde01bc93..3673d2b2c4ac 100644
--- a/drivers/acpi/acpica/exresolv.c
+++ b/drivers/acpi/acpica/exresolv.c
@@ -43,11 +43,11 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48#include <acpi/acdispat.h> 48#include "acdispat.h"
49#include <acpi/acinterp.h> 49#include "acinterp.h"
50#include <acpi/acnamesp.h> 50#include "acnamesp.h"
51 51
52#define _COMPONENT ACPI_EXECUTER 52#define _COMPONENT ACPI_EXECUTER
53ACPI_MODULE_NAME("exresolv") 53ACPI_MODULE_NAME("exresolv")
diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c
index 7602eaf5c479..3c3802764bfb 100644
--- a/drivers/acpi/acpica/exresop.c
+++ b/drivers/acpi/acpica/exresop.c
@@ -43,11 +43,11 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48#include <acpi/acparser.h> 48#include "acparser.h"
49#include <acpi/acinterp.h> 49#include "acinterp.h"
50#include <acpi/acnamesp.h> 50#include "acnamesp.h"
51 51
52#define _COMPONENT ACPI_EXECUTER 52#define _COMPONENT ACPI_EXECUTER
53ACPI_MODULE_NAME("exresop") 53ACPI_MODULE_NAME("exresop")
diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c
index 6f5647fdc006..7c6d7e53e41e 100644
--- a/drivers/acpi/acpica/exstore.c
+++ b/drivers/acpi/acpica/exstore.c
@@ -43,11 +43,11 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acdispat.h> 47#include "acdispat.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49#include <acpi/amlcode.h> 49#include "amlcode.h"
50#include <acpi/acnamesp.h> 50#include "acnamesp.h"
51 51
52#define _COMPONENT ACPI_EXECUTER 52#define _COMPONENT ACPI_EXECUTER
53ACPI_MODULE_NAME("exstore") 53ACPI_MODULE_NAME("exstore")
diff --git a/drivers/acpi/acpica/exstoren.c b/drivers/acpi/acpica/exstoren.c
index ad2047afa463..145d15305f70 100644
--- a/drivers/acpi/acpica/exstoren.c
+++ b/drivers/acpi/acpica/exstoren.c
@@ -44,9 +44,9 @@
44 */ 44 */
45 45
46#include <acpi/acpi.h> 46#include <acpi/acpi.h>
47#include <acpi/accommon.h> 47#include "accommon.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49#include <acpi/amlcode.h> 49#include "amlcode.h"
50 50
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52ACPI_MODULE_NAME("exstoren") 52ACPI_MODULE_NAME("exstoren")
diff --git a/drivers/acpi/acpica/exstorob.c b/drivers/acpi/acpica/exstorob.c
index a48d580d71c2..67340cc70142 100644
--- a/drivers/acpi/acpica/exstorob.c
+++ b/drivers/acpi/acpica/exstorob.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48 48
49#define _COMPONENT ACPI_EXECUTER 49#define _COMPONENT ACPI_EXECUTER
50ACPI_MODULE_NAME("exstorob") 50ACPI_MODULE_NAME("exstorob")
diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c
index a25b2c576eb1..3d00b9357233 100644
--- a/drivers/acpi/acpica/exsystem.c
+++ b/drivers/acpi/acpica/exsystem.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48 48
49#define _COMPONENT ACPI_EXECUTER 49#define _COMPONENT ACPI_EXECUTER
50ACPI_MODULE_NAME("exsystem") 50ACPI_MODULE_NAME("exsystem")
diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c
index 0ecdb70c4980..32b85d68e756 100644
--- a/drivers/acpi/acpica/exutils.c
+++ b/drivers/acpi/acpica/exutils.c
@@ -59,9 +59,9 @@
59#define DEFINE_AML_GLOBALS 59#define DEFINE_AML_GLOBALS
60 60
61#include <acpi/acpi.h> 61#include <acpi/acpi.h>
62#include <acpi/accommon.h> 62#include "accommon.h"
63#include <acpi/acinterp.h> 63#include "acinterp.h"
64#include <acpi/amlcode.h> 64#include "amlcode.h"
65 65
66#define _COMPONENT ACPI_EXECUTER 66#define _COMPONENT ACPI_EXECUTER
67ACPI_MODULE_NAME("exutils") 67ACPI_MODULE_NAME("exutils")
diff --git a/drivers/acpi/acpica/hwacpi.c b/drivers/acpi/acpica/hwacpi.c
index c76e3cd7e749..a9d4fea4167f 100644
--- a/drivers/acpi/acpica/hwacpi.c
+++ b/drivers/acpi/acpica/hwacpi.c
@@ -43,7 +43,7 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47 47
48#define _COMPONENT ACPI_HARDWARE 48#define _COMPONENT ACPI_HARDWARE
49ACPI_MODULE_NAME("hwacpi") 49ACPI_MODULE_NAME("hwacpi")
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c
index 2b4a85a839d1..2013b66745d2 100644
--- a/drivers/acpi/acpica/hwgpe.c
+++ b/drivers/acpi/acpica/hwgpe.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acevents.h> 47#include "acevents.h"
48 48
49#define _COMPONENT ACPI_HARDWARE 49#define _COMPONENT ACPI_HARDWARE
50ACPI_MODULE_NAME("hwgpe") 50ACPI_MODULE_NAME("hwgpe")
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index 4bc3bbba6e9c..4dc43b018517 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -44,9 +44,9 @@
44 */ 44 */
45 45
46#include <acpi/acpi.h> 46#include <acpi/acpi.h>
47#include <acpi/accommon.h> 47#include "accommon.h"
48#include <acpi/acnamesp.h> 48#include "acnamesp.h"
49#include <acpi/acevents.h> 49#include "acevents.h"
50 50
51#define _COMPONENT ACPI_HARDWARE 51#define _COMPONENT ACPI_HARDWARE
52ACPI_MODULE_NAME("hwregs") 52ACPI_MODULE_NAME("hwregs")
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c
index 54dd3ee0760c..a2af2a4f2f26 100644
--- a/drivers/acpi/acpica/hwsleep.c
+++ b/drivers/acpi/acpica/hwsleep.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/actables.h> 47#include "actables.h"
48 48
49#define _COMPONENT ACPI_HARDWARE 49#define _COMPONENT ACPI_HARDWARE
50ACPI_MODULE_NAME("hwsleep") 50ACPI_MODULE_NAME("hwsleep")
diff --git a/drivers/acpi/acpica/hwtimer.c b/drivers/acpi/acpica/hwtimer.c
index d1eac2aad728..b7f522c8f023 100644
--- a/drivers/acpi/acpica/hwtimer.c
+++ b/drivers/acpi/acpica/hwtimer.c
@@ -43,7 +43,7 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47 47
48#define _COMPONENT ACPI_HARDWARE 48#define _COMPONENT ACPI_HARDWARE
49ACPI_MODULE_NAME("hwtimer") 49ACPI_MODULE_NAME("hwtimer")
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index a4456fc9462d..ae597c0ab53f 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_HARDWARE 49#define _COMPONENT ACPI_HARDWARE
50ACPI_MODULE_NAME("hwxface") 50ACPI_MODULE_NAME("hwxface")
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 7954640e69cb..88303ebe924c 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/amlcode.h> 46#include "amlcode.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/acdispat.h> 48#include "acdispat.h"
49 49
50#define _COMPONENT ACPI_NAMESPACE 50#define _COMPONENT ACPI_NAMESPACE
51ACPI_MODULE_NAME("nsaccess") 51ACPI_MODULE_NAME("nsaccess")
diff --git a/drivers/acpi/acpica/nsalloc.c b/drivers/acpi/acpica/nsalloc.c
index cb2afbf4e457..f976d848fe82 100644
--- a/drivers/acpi/acpica/nsalloc.c
+++ b/drivers/acpi/acpica/nsalloc.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47 47
48#define _COMPONENT ACPI_NAMESPACE 48#define _COMPONENT ACPI_NAMESPACE
49ACPI_MODULE_NAME("nsalloc") 49ACPI_MODULE_NAME("nsalloc")
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index 48f02e659f24..0da33c8e9ba2 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47 47
48#define _COMPONENT ACPI_NAMESPACE 48#define _COMPONENT ACPI_NAMESPACE
49ACPI_MODULE_NAME("nsdump") 49ACPI_MODULE_NAME("nsdump")
diff --git a/drivers/acpi/acpica/nsdumpdv.c b/drivers/acpi/acpica/nsdumpdv.c
index cc3df78258ed..41994fe7fbb8 100644
--- a/drivers/acpi/acpica/nsdumpdv.c
+++ b/drivers/acpi/acpica/nsdumpdv.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46 46
47/* TBD: This entire module is apparently obsolete and should be removed */ 47/* TBD: This entire module is apparently obsolete and should be removed */
48 48
@@ -50,7 +50,7 @@
50ACPI_MODULE_NAME("nsdumpdv") 50ACPI_MODULE_NAME("nsdumpdv")
51#ifdef ACPI_OBSOLETE_FUNCTIONS 51#ifdef ACPI_OBSOLETE_FUNCTIONS
52#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 52#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
53#include <acpi/acnamesp.h> 53#include "acnamesp.h"
54/******************************************************************************* 54/*******************************************************************************
55 * 55 *
56 * FUNCTION: acpi_ns_dump_one_device 56 * FUNCTION: acpi_ns_dump_one_device
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c
index a8d7764c73b7..0f3d5f9b5966 100644
--- a/drivers/acpi/acpica/nseval.c
+++ b/drivers/acpi/acpica/nseval.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48#include <acpi/acnamesp.h> 48#include "acnamesp.h"
49 49
50#define _COMPONENT ACPI_NAMESPACE 50#define _COMPONENT ACPI_NAMESPACE
51ACPI_MODULE_NAME("nseval") 51ACPI_MODULE_NAME("nseval")
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index fe470c4b38f7..13501cb81863 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47#include <acpi/acdispat.h> 47#include "acdispat.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49#include <linux/nmi.h> 49#include <linux/nmi.h>
50 50
51#define _COMPONENT ACPI_NAMESPACE 51#define _COMPONENT ACPI_NAMESPACE
diff --git a/drivers/acpi/acpica/nsload.c b/drivers/acpi/acpica/nsload.c
index a6e92b31a06f..a0ba9e12379e 100644
--- a/drivers/acpi/acpica/nsload.c
+++ b/drivers/acpi/acpica/nsload.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47#include <acpi/acdispat.h> 47#include "acdispat.h"
48#include <acpi/actables.h> 48#include "actables.h"
49 49
50#define _COMPONENT ACPI_NAMESPACE 50#define _COMPONENT ACPI_NAMESPACE
51ACPI_MODULE_NAME("nsload") 51ACPI_MODULE_NAME("nsload")
diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c
index b7e301848ba7..ae3dc10a7e81 100644
--- a/drivers/acpi/acpica/nsnames.c
+++ b/drivers/acpi/acpica/nsnames.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/amlcode.h> 46#include "amlcode.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_NAMESPACE 49#define _COMPONENT ACPI_NAMESPACE
50ACPI_MODULE_NAME("nsnames") 50ACPI_MODULE_NAME("nsnames")
diff --git a/drivers/acpi/acpica/nsobject.c b/drivers/acpi/acpica/nsobject.c
index ca9edeea27df..08a97a57f8f9 100644
--- a/drivers/acpi/acpica/nsobject.c
+++ b/drivers/acpi/acpica/nsobject.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_NAMESPACE 49#define _COMPONENT ACPI_NAMESPACE
50ACPI_MODULE_NAME("nsobject") 50ACPI_MODULE_NAME("nsobject")
diff --git a/drivers/acpi/acpica/nsparse.c b/drivers/acpi/acpica/nsparse.c
index bcfcf427c909..b9e8d0070b6f 100644
--- a/drivers/acpi/acpica/nsparse.c
+++ b/drivers/acpi/acpica/nsparse.c
@@ -42,11 +42,11 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47#include <acpi/acparser.h> 47#include "acparser.h"
48#include <acpi/acdispat.h> 48#include "acdispat.h"
49#include <acpi/actables.h> 49#include "actables.h"
50 50
51#define _COMPONENT ACPI_NAMESPACE 51#define _COMPONENT ACPI_NAMESPACE
52ACPI_MODULE_NAME("nsparse") 52ACPI_MODULE_NAME("nsparse")
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index 1e682d03f620..452703290d35 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -43,9 +43,9 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/acpredef.h> 48#include "acpredef.h"
49 49
50#define _COMPONENT ACPI_NAMESPACE 50#define _COMPONENT ACPI_NAMESPACE
51ACPI_MODULE_NAME("nspredef") 51ACPI_MODULE_NAME("nspredef")
diff --git a/drivers/acpi/acpica/nssearch.c b/drivers/acpi/acpica/nssearch.c
index a76c731e3ba5..6fea13f3f52d 100644
--- a/drivers/acpi/acpica/nssearch.c
+++ b/drivers/acpi/acpica/nssearch.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47 47
48#define _COMPONENT ACPI_NAMESPACE 48#define _COMPONENT ACPI_NAMESPACE
49ACPI_MODULE_NAME("nssearch") 49ACPI_MODULE_NAME("nssearch")
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index a443d2805d2c..3e1149bf4aa5 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -43,10 +43,10 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/amlcode.h> 48#include "amlcode.h"
49#include <acpi/actables.h> 49#include "actables.h"
50 50
51#define _COMPONENT ACPI_NAMESPACE 51#define _COMPONENT ACPI_NAMESPACE
52ACPI_MODULE_NAME("nsutils") 52ACPI_MODULE_NAME("nsutils")
diff --git a/drivers/acpi/acpica/nswalk.c b/drivers/acpi/acpica/nswalk.c
index 71b83e9807da..200895fa2728 100644
--- a/drivers/acpi/acpica/nswalk.c
+++ b/drivers/acpi/acpica/nswalk.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47 47
48#define _COMPONENT ACPI_NAMESPACE 48#define _COMPONENT ACPI_NAMESPACE
49ACPI_MODULE_NAME("nswalk") 49ACPI_MODULE_NAME("nswalk")
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index 598393a04e5f..22a7171ac1ed 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -43,9 +43,9 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49 49
50#define _COMPONENT ACPI_NAMESPACE 50#define _COMPONENT ACPI_NAMESPACE
51ACPI_MODULE_NAME("nsxfeval") 51ACPI_MODULE_NAME("nsxfeval")
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index 7d5bfa9e9fe9..9589fea24997 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_NAMESPACE 49#define _COMPONENT ACPI_NAMESPACE
50ACPI_MODULE_NAME("nsxfname") 50ACPI_MODULE_NAME("nsxfname")
diff --git a/drivers/acpi/acpica/nsxfobj.c b/drivers/acpi/acpica/nsxfobj.c
index 80e6322d59c5..1c7efc15225f 100644
--- a/drivers/acpi/acpica/nsxfobj.c
+++ b/drivers/acpi/acpica/nsxfobj.c
@@ -43,8 +43,8 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_NAMESPACE 49#define _COMPONENT ACPI_NAMESPACE
50ACPI_MODULE_NAME("nsxfobj") 50ACPI_MODULE_NAME("nsxfobj")
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index 852f3a83b2e6..b161f3544b51 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -42,11 +42,11 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48#include <acpi/acnamesp.h> 48#include "acnamesp.h"
49#include <acpi/acdispat.h> 49#include "acdispat.h"
50 50
51#define _COMPONENT ACPI_PARSER 51#define _COMPONENT ACPI_PARSER
52ACPI_MODULE_NAME("psargs") 52ACPI_MODULE_NAME("psargs")
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
index fd6648f0d65f..c5f6ce19a401 100644
--- a/drivers/acpi/acpica/psloop.c
+++ b/drivers/acpi/acpica/psloop.c
@@ -50,10 +50,10 @@
50 */ 50 */
51 51
52#include <acpi/acpi.h> 52#include <acpi/acpi.h>
53#include <acpi/accommon.h> 53#include "accommon.h"
54#include <acpi/acparser.h> 54#include "acparser.h"
55#include <acpi/acdispat.h> 55#include "acdispat.h"
56#include <acpi/amlcode.h> 56#include "amlcode.h"
57 57
58#define _COMPONENT ACPI_PARSER 58#define _COMPONENT ACPI_PARSER
59ACPI_MODULE_NAME("psloop") 59ACPI_MODULE_NAME("psloop")
diff --git a/drivers/acpi/acpica/psopcode.c b/drivers/acpi/acpica/psopcode.c
index 3693a121b347..3bc3a60194d6 100644
--- a/drivers/acpi/acpica/psopcode.c
+++ b/drivers/acpi/acpica/psopcode.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/acopcode.h> 47#include "acopcode.h"
48#include <acpi/amlcode.h> 48#include "amlcode.h"
49 49
50#define _COMPONENT ACPI_PARSER 50#define _COMPONENT ACPI_PARSER
51ACPI_MODULE_NAME("psopcode") 51ACPI_MODULE_NAME("psopcode")
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c
index 9da48fdb811a..70838e9b608c 100644
--- a/drivers/acpi/acpica/psparse.c
+++ b/drivers/acpi/acpica/psparse.c
@@ -51,12 +51,12 @@
51 */ 51 */
52 52
53#include <acpi/acpi.h> 53#include <acpi/acpi.h>
54#include <acpi/accommon.h> 54#include "accommon.h"
55#include <acpi/acparser.h> 55#include "acparser.h"
56#include <acpi/acdispat.h> 56#include "acdispat.h"
57#include <acpi/amlcode.h> 57#include "amlcode.h"
58#include <acpi/acnamesp.h> 58#include "acnamesp.h"
59#include <acpi/acinterp.h> 59#include "acinterp.h"
60 60
61#define _COMPONENT ACPI_PARSER 61#define _COMPONENT ACPI_PARSER
62ACPI_MODULE_NAME("psparse") 62ACPI_MODULE_NAME("psparse")
diff --git a/drivers/acpi/acpica/psscope.c b/drivers/acpi/acpica/psscope.c
index 22929ca1ffe4..2feca5ca9581 100644
--- a/drivers/acpi/acpica/psscope.c
+++ b/drivers/acpi/acpica/psscope.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47 47
48#define _COMPONENT ACPI_PARSER 48#define _COMPONENT ACPI_PARSER
49ACPI_MODULE_NAME("psscope") 49ACPI_MODULE_NAME("psscope")
diff --git a/drivers/acpi/acpica/pstree.c b/drivers/acpi/acpica/pstree.c
index 8e73fbf00971..4d3389118ec3 100644
--- a/drivers/acpi/acpica/pstree.c
+++ b/drivers/acpi/acpica/pstree.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48 48
49#define _COMPONENT ACPI_PARSER 49#define _COMPONENT ACPI_PARSER
50ACPI_MODULE_NAME("pstree") 50ACPI_MODULE_NAME("pstree")
diff --git a/drivers/acpi/acpica/psutils.c b/drivers/acpi/acpica/psutils.c
index eec7d624db8e..e636e078ad3d 100644
--- a/drivers/acpi/acpica/psutils.c
+++ b/drivers/acpi/acpica/psutils.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/amlcode.h> 47#include "amlcode.h"
48 48
49#define _COMPONENT ACPI_PARSER 49#define _COMPONENT ACPI_PARSER
50ACPI_MODULE_NAME("psutils") 50ACPI_MODULE_NAME("psutils")
diff --git a/drivers/acpi/acpica/pswalk.c b/drivers/acpi/acpica/pswalk.c
index dacc4228ba1a..78b8b791f2ae 100644
--- a/drivers/acpi/acpica/pswalk.c
+++ b/drivers/acpi/acpica/pswalk.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47 47
48#define _COMPONENT ACPI_PARSER 48#define _COMPONENT ACPI_PARSER
49ACPI_MODULE_NAME("pswalk") 49ACPI_MODULE_NAME("pswalk")
diff --git a/drivers/acpi/acpica/psxface.c b/drivers/acpi/acpica/psxface.c
index 98c31a893706..ff06032c0f06 100644
--- a/drivers/acpi/acpica/psxface.c
+++ b/drivers/acpi/acpica/psxface.c
@@ -42,11 +42,11 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acparser.h> 46#include "acparser.h"
47#include <acpi/acdispat.h> 47#include "acdispat.h"
48#include <acpi/acinterp.h> 48#include "acinterp.h"
49#include <acpi/amlcode.h> 49#include "amlcode.h"
50 50
51#define _COMPONENT ACPI_PARSER 51#define _COMPONENT ACPI_PARSER
52ACPI_MODULE_NAME("psxface") 52ACPI_MODULE_NAME("psxface")
diff --git a/drivers/acpi/acpica/rsaddr.c b/drivers/acpi/acpica/rsaddr.c
index b4aba3aebcb8..1e437bfd8db5 100644
--- a/drivers/acpi/acpica/rsaddr.c
+++ b/drivers/acpi/acpica/rsaddr.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47 47
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsaddr") 49ACPI_MODULE_NAME("rsaddr")
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index 4f2b186fe302..52865ee6bc77 100644
--- a/drivers/acpi/acpica/rscalc.c
+++ b/drivers/acpi/acpica/rscalc.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_RESOURCES 49#define _COMPONENT ACPI_RESOURCES
50ACPI_MODULE_NAME("rscalc") 50ACPI_MODULE_NAME("rscalc")
diff --git a/drivers/acpi/acpica/rscreate.c b/drivers/acpi/acpica/rscreate.c
index 3ca606974d51..9eb3a2a68408 100644
--- a/drivers/acpi/acpica/rscreate.c
+++ b/drivers/acpi/acpica/rscreate.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_RESOURCES 49#define _COMPONENT ACPI_RESOURCES
50ACPI_MODULE_NAME("rscreate") 50ACPI_MODULE_NAME("rscreate")
diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c
index 936a59be39fa..3f0ca5a12d34 100644
--- a/drivers/acpi/acpica/rsdump.c
+++ b/drivers/acpi/acpica/rsdump.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47 47
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsdump") 49ACPI_MODULE_NAME("rsdump")
diff --git a/drivers/acpi/acpica/rsinfo.c b/drivers/acpi/acpica/rsinfo.c
index aac41cc21344..77b25fdb459c 100644
--- a/drivers/acpi/acpica/rsinfo.c
+++ b/drivers/acpi/acpica/rsinfo.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47 47
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsinfo") 49ACPI_MODULE_NAME("rsinfo")
diff --git a/drivers/acpi/acpica/rsio.c b/drivers/acpi/acpica/rsio.c
index d31129aca400..35a49aa95609 100644
--- a/drivers/acpi/acpica/rsio.c
+++ b/drivers/acpi/acpica/rsio.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47 47
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsio") 49ACPI_MODULE_NAME("rsio")
diff --git a/drivers/acpi/acpica/rsirq.c b/drivers/acpi/acpica/rsirq.c
index 9a5a08d67313..2e0256983aa6 100644
--- a/drivers/acpi/acpica/rsirq.c
+++ b/drivers/acpi/acpica/rsirq.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47 47
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsirq") 49ACPI_MODULE_NAME("rsirq")
diff --git a/drivers/acpi/acpica/rslist.c b/drivers/acpi/acpica/rslist.c
index 483389871a50..1b1dbc69f087 100644
--- a/drivers/acpi/acpica/rslist.c
+++ b/drivers/acpi/acpica/rslist.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47 47
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rslist") 49ACPI_MODULE_NAME("rslist")
diff --git a/drivers/acpi/acpica/rsmemory.c b/drivers/acpi/acpica/rsmemory.c
index 5fd3746cca54..ddc76cebdc92 100644
--- a/drivers/acpi/acpica/rsmemory.c
+++ b/drivers/acpi/acpica/rsmemory.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47 47
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsmemory") 49ACPI_MODULE_NAME("rsmemory")
diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c
index 2cd6e8cfaba1..5bc49a553284 100644
--- a/drivers/acpi/acpica/rsmisc.c
+++ b/drivers/acpi/acpica/rsmisc.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47 47
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsmisc") 49ACPI_MODULE_NAME("rsmisc")
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c
index 7450105f8548..bc03d5966829 100644
--- a/drivers/acpi/acpica/rsutils.c
+++ b/drivers/acpi/acpica/rsutils.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47#include <acpi/acresrc.h> 47#include "acresrc.h"
48 48
49#define _COMPONENT ACPI_RESOURCES 49#define _COMPONENT ACPI_RESOURCES
50ACPI_MODULE_NAME("rsutils") 50ACPI_MODULE_NAME("rsutils")
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c
index 0a274356b23e..69a2aa5b5d83 100644
--- a/drivers/acpi/acpica/rsxface.c
+++ b/drivers/acpi/acpica/rsxface.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acresrc.h> 46#include "acresrc.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48 48
49#define _COMPONENT ACPI_RESOURCES 49#define _COMPONENT ACPI_RESOURCES
50ACPI_MODULE_NAME("rsxface") 50ACPI_MODULE_NAME("rsxface")
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
index 87f22e68c6d6..3636e4f8fb73 100644
--- a/drivers/acpi/acpica/tbfadt.c
+++ b/drivers/acpi/acpica/tbfadt.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/actables.h> 46#include "actables.h"
47 47
48#define _COMPONENT ACPI_TABLES 48#define _COMPONENT ACPI_TABLES
49ACPI_MODULE_NAME("tbfadt") 49ACPI_MODULE_NAME("tbfadt")
diff --git a/drivers/acpi/acpica/tbfind.c b/drivers/acpi/acpica/tbfind.c
index 9d20cb6db892..1054dfd49207 100644
--- a/drivers/acpi/acpica/tbfind.c
+++ b/drivers/acpi/acpica/tbfind.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/actables.h> 46#include "actables.h"
47 47
48#define _COMPONENT ACPI_TABLES 48#define _COMPONENT ACPI_TABLES
49ACPI_MODULE_NAME("tbfind") 49ACPI_MODULE_NAME("tbfind")
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 019b0d84cbea..37374b21969d 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47#include <acpi/actables.h> 47#include "actables.h"
48 48
49#define _COMPONENT ACPI_TABLES 49#define _COMPONENT ACPI_TABLES
50ACPI_MODULE_NAME("tbinstal") 50ACPI_MODULE_NAME("tbinstal")
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 4eb7189974ca..3a8d8d2eee92 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/actables.h> 46#include "actables.h"
47 47
48#define _COMPONENT ACPI_TABLES 48#define _COMPONENT ACPI_TABLES
49ACPI_MODULE_NAME("tbutils") 49ACPI_MODULE_NAME("tbutils")
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 115796694a2f..c3e841f3cde9 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -43,9 +43,9 @@
43 */ 43 */
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/accommon.h> 46#include "accommon.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/actables.h> 48#include "actables.h"
49 49
50#define _COMPONENT ACPI_TABLES 50#define _COMPONENT ACPI_TABLES
51ACPI_MODULE_NAME("tbxface") 51ACPI_MODULE_NAME("tbxface")
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index 3495dca4e86b..b7fc8dd43341 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/actables.h> 46#include "actables.h"
47 47
48#define _COMPONENT ACPI_TABLES 48#define _COMPONENT ACPI_TABLES
49ACPI_MODULE_NAME("tbxfroot") 49ACPI_MODULE_NAME("tbxfroot")
diff --git a/drivers/acpi/acpica/utalloc.c b/drivers/acpi/acpica/utalloc.c
index 2a017b29aa41..7580f6b3069e 100644
--- a/drivers/acpi/acpica/utalloc.c
+++ b/drivers/acpi/acpica/utalloc.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acdebug.h> 46#include "acdebug.h"
47 47
48#define _COMPONENT ACPI_UTILITIES 48#define _COMPONENT ACPI_UTILITIES
49ACPI_MODULE_NAME("utalloc") 49ACPI_MODULE_NAME("utalloc")
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c
index e6f3002312e5..b0dcfd3c872a 100644
--- a/drivers/acpi/acpica/utcopy.c
+++ b/drivers/acpi/acpica/utcopy.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47 47
48 48
49#define _COMPONENT ACPI_UTILITIES 49#define _COMPONENT ACPI_UTILITIES
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index 9a3538c497d0..38821f53042c 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46 46
47#define _COMPONENT ACPI_UTILITIES 47#define _COMPONENT ACPI_UTILITIES
48ACPI_MODULE_NAME("utdebug") 48ACPI_MODULE_NAME("utdebug")
diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c
index 5b4e3b1a7523..a0be9e39531e 100644
--- a/drivers/acpi/acpica/utdelete.c
+++ b/drivers/acpi/acpica/utdelete.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acinterp.h> 46#include "acinterp.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/acevents.h> 48#include "acevents.h"
49 49
50#define _COMPONENT ACPI_UTILITIES 50#define _COMPONENT ACPI_UTILITIES
51ACPI_MODULE_NAME("utdelete") 51ACPI_MODULE_NAME("utdelete")
diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c
index e1e438cd54a9..da9450bc60f7 100644
--- a/drivers/acpi/acpica/uteval.c
+++ b/drivers/acpi/acpica/uteval.c
@@ -42,9 +42,9 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47#include <acpi/acinterp.h> 47#include "acinterp.h"
48 48
49#define _COMPONENT ACPI_UTILITIES 49#define _COMPONENT ACPI_UTILITIES
50ACPI_MODULE_NAME("uteval") 50ACPI_MODULE_NAME("uteval")
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c
index 3e28d8c4045d..a3ab9d9da299 100644
--- a/drivers/acpi/acpica/utglobal.c
+++ b/drivers/acpi/acpica/utglobal.c
@@ -44,8 +44,8 @@
44#define DEFINE_ACPI_GLOBALS 44#define DEFINE_ACPI_GLOBALS
45 45
46#include <acpi/acpi.h> 46#include <acpi/acpi.h>
47#include <acpi/accommon.h> 47#include "accommon.h"
48#include <acpi/acnamesp.h> 48#include "acnamesp.h"
49 49
50#define _COMPONENT ACPI_UTILITIES 50#define _COMPONENT ACPI_UTILITIES
51ACPI_MODULE_NAME("utglobal") 51ACPI_MODULE_NAME("utglobal")
diff --git a/drivers/acpi/acpica/utinit.c b/drivers/acpi/acpica/utinit.c
index 9316ec36a836..a54ca84eb362 100644
--- a/drivers/acpi/acpica/utinit.c
+++ b/drivers/acpi/acpica/utinit.c
@@ -42,10 +42,10 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47#include <acpi/acevents.h> 47#include "acevents.h"
48#include <acpi/actables.h> 48#include "actables.h"
49 49
50#define _COMPONENT ACPI_UTILITIES 50#define _COMPONENT ACPI_UTILITIES
51ACPI_MODULE_NAME("utinit") 51ACPI_MODULE_NAME("utinit")
diff --git a/drivers/acpi/acpica/utmath.c b/drivers/acpi/acpica/utmath.c
index 616d7b271c9a..c9f682d640ef 100644
--- a/drivers/acpi/acpica/utmath.c
+++ b/drivers/acpi/acpica/utmath.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46 46
47#define _COMPONENT ACPI_UTILITIES 47#define _COMPONENT ACPI_UTILITIES
48ACPI_MODULE_NAME("utmath") 48ACPI_MODULE_NAME("utmath")
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c
index 8f8b407142ee..c1f7f4e1a72d 100644
--- a/drivers/acpi/acpica/utmisc.c
+++ b/drivers/acpi/acpica/utmisc.c
@@ -44,8 +44,8 @@
44#include <linux/module.h> 44#include <linux/module.h>
45 45
46#include <acpi/acpi.h> 46#include <acpi/acpi.h>
47#include <acpi/accommon.h> 47#include "accommon.h"
48#include <acpi/acnamesp.h> 48#include "acnamesp.h"
49 49
50#define _COMPONENT ACPI_UTILITIES 50#define _COMPONENT ACPI_UTILITIES
51ACPI_MODULE_NAME("utmisc") 51ACPI_MODULE_NAME("utmisc")
diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c
index 7b48ba3f3f8a..14eb52c4d647 100644
--- a/drivers/acpi/acpica/utmutex.c
+++ b/drivers/acpi/acpica/utmutex.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46 46
47#define _COMPONENT ACPI_UTILITIES 47#define _COMPONENT ACPI_UTILITIES
48ACPI_MODULE_NAME("utmutex") 48ACPI_MODULE_NAME("utmutex")
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index 964b23c11610..4279ed3a8782 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acnamesp.h> 46#include "acnamesp.h"
47 47
48#define _COMPONENT ACPI_UTILITIES 48#define _COMPONENT ACPI_UTILITIES
49ACPI_MODULE_NAME("utobject") 49ACPI_MODULE_NAME("utobject")
diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c
index 0755c5cdbe18..91b7c00236f4 100644
--- a/drivers/acpi/acpica/utresrc.c
+++ b/drivers/acpi/acpica/utresrc.c
@@ -42,8 +42,8 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/amlresrc.h> 46#include "amlresrc.h"
47 47
48#define _COMPONENT ACPI_UTILITIES 48#define _COMPONENT ACPI_UTILITIES
49ACPI_MODULE_NAME("utresrc") 49ACPI_MODULE_NAME("utresrc")
diff --git a/drivers/acpi/acpica/utstate.c b/drivers/acpi/acpica/utstate.c
index 54c3461e2f26..0440c958f5a4 100644
--- a/drivers/acpi/acpica/utstate.c
+++ b/drivers/acpi/acpica/utstate.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46 46
47#define _COMPONENT ACPI_UTILITIES 47#define _COMPONENT ACPI_UTILITIES
48ACPI_MODULE_NAME("utstate") 48ACPI_MODULE_NAME("utstate")
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 5b27724a2749..078a22728c6b 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -42,11 +42,11 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/accommon.h> 45#include "accommon.h"
46#include <acpi/acevents.h> 46#include "acevents.h"
47#include <acpi/acnamesp.h> 47#include "acnamesp.h"
48#include <acpi/acdebug.h> 48#include "acdebug.h"
49#include <acpi/actables.h> 49#include "actables.h"
50 50
51#define _COMPONENT ACPI_UTILITIES 51#define _COMPONENT ACPI_UTILITIES
52ACPI_MODULE_NAME("utxface") 52ACPI_MODULE_NAME("utxface")