aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 13:31:12 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-18 13:31:12 -0400
commit3e370b29d35fb01bfb92c2814d6f79bf6a2cb970 (patch)
tree3b8fb467d60bfe6a34686f4abdc3a60050ba40a4 /include/acpi
parent88d1dce3a74367291f65a757fbdcaf17f042f30c (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Merge branch 'linus' into x86/pci-ioapic-boot-irq-quirks
Conflicts: drivers/pci/quirks.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/acdisasm.h1
-rw-r--r--include/acpi/acdispat.h2
-rw-r--r--include/acpi/acexcep.h10
-rw-r--r--include/acpi/acglobal.h2
-rw-r--r--include/acpi/achware.h4
-rw-r--r--include/acpi/acinterp.h5
-rw-r--r--include/acpi/aclocal.h6
-rw-r--r--include/acpi/acmacros.h38
-rw-r--r--include/acpi/acnamesp.h30
-rw-r--r--include/acpi/acpi_bus.h12
-rw-r--r--include/acpi/acpi_drivers.h4
-rw-r--r--include/acpi/acpiosxf.h2
-rw-r--r--include/acpi/acpixf.h12
-rw-r--r--include/acpi/acstruct.h10
-rw-r--r--include/acpi/actables.h27
-rw-r--r--include/acpi/actbl1.h23
-rw-r--r--include/acpi/actypes.h16
-rw-r--r--include/acpi/acutils.h70
-rw-r--r--include/acpi/processor.h2
-rw-r--r--include/acpi/reboot.h14
21 files changed, 159 insertions, 133 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 28fe8bae1037..4eb75a88795a 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -63,7 +63,7 @@
63 63
64/* Current ACPICA subsystem version in YYYYMMDD format */ 64/* Current ACPICA subsystem version in YYYYMMDD format */
65 65
66#define ACPI_CA_VERSION 0x20080321 66#define ACPI_CA_VERSION 0x20080609
67 67
68/* 68/*
69 * OS name, used for the _OS object. The _OS object is essentially obsolete, 69 * OS name, used for the _OS object. The _OS object is essentially obsolete,
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h
index 788f88782012..f53faca8ec80 100644
--- a/include/acpi/acdisasm.h
+++ b/include/acpi/acdisasm.h
@@ -162,6 +162,7 @@ extern struct acpi_dmtable_info acpi_dm_table_info_dmar_hdr[];
162extern struct acpi_dmtable_info acpi_dm_table_info_dmar_scope[]; 162extern struct acpi_dmtable_info acpi_dm_table_info_dmar_scope[];
163extern struct acpi_dmtable_info acpi_dm_table_info_dmar0[]; 163extern struct acpi_dmtable_info acpi_dm_table_info_dmar0[];
164extern struct acpi_dmtable_info acpi_dm_table_info_dmar1[]; 164extern struct acpi_dmtable_info acpi_dm_table_info_dmar1[];
165extern struct acpi_dmtable_info acpi_dm_table_info_dmar2[];
165extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[]; 166extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[];
166extern struct acpi_dmtable_info acpi_dm_table_info_einj[]; 167extern struct acpi_dmtable_info acpi_dm_table_info_einj[];
167extern struct acpi_dmtable_info acpi_dm_table_info_einj0[]; 168extern struct acpi_dmtable_info acpi_dm_table_info_einj0[];
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h
index 910f018d92c7..21a73a105d0a 100644
--- a/include/acpi/acdispat.h
+++ b/include/acpi/acdispat.h
@@ -221,7 +221,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state);
221 * dsinit 221 * dsinit
222 */ 222 */
223acpi_status 223acpi_status
224acpi_ds_initialize_objects(acpi_native_uint table_index, 224acpi_ds_initialize_objects(u32 table_index,
225 struct acpi_namespace_node *start_node); 225 struct acpi_namespace_node *start_node);
226 226
227/* 227/*
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index 1f591171bf31..e5a890ffeb02 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -108,8 +108,9 @@
108#define AE_BAD_HEX_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER) 108#define AE_BAD_HEX_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER)
109#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0008 | AE_CODE_PROGRAMMER) 109#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0008 | AE_CODE_PROGRAMMER)
110#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0009 | AE_CODE_PROGRAMMER) 110#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0009 | AE_CODE_PROGRAMMER)
111#define AE_MISSING_ARGUMENTS (acpi_status) (0x000A | AE_CODE_PROGRAMMER)
111 112
112#define AE_CODE_PGM_MAX 0x0009 113#define AE_CODE_PGM_MAX 0x000A
113 114
114/* 115/*
115 * Acpi table exceptions 116 * Acpi table exceptions
@@ -225,6 +226,7 @@ char const *acpi_gbl_exception_names_env[] = {
225}; 226};
226 227
227char const *acpi_gbl_exception_names_pgm[] = { 228char const *acpi_gbl_exception_names_pgm[] = {
229 NULL,
228 "AE_BAD_PARAMETER", 230 "AE_BAD_PARAMETER",
229 "AE_BAD_CHARACTER", 231 "AE_BAD_CHARACTER",
230 "AE_BAD_PATHNAME", 232 "AE_BAD_PATHNAME",
@@ -233,10 +235,12 @@ char const *acpi_gbl_exception_names_pgm[] = {
233 "AE_ALIGNMENT", 235 "AE_ALIGNMENT",
234 "AE_BAD_HEX_CONSTANT", 236 "AE_BAD_HEX_CONSTANT",
235 "AE_BAD_OCTAL_CONSTANT", 237 "AE_BAD_OCTAL_CONSTANT",
236 "AE_BAD_DECIMAL_CONSTANT" 238 "AE_BAD_DECIMAL_CONSTANT",
239 "AE_MISSING_ARGUMENTS"
237}; 240};
238 241
239char const *acpi_gbl_exception_names_tbl[] = { 242char const *acpi_gbl_exception_names_tbl[] = {
243 NULL,
240 "AE_BAD_SIGNATURE", 244 "AE_BAD_SIGNATURE",
241 "AE_BAD_HEADER", 245 "AE_BAD_HEADER",
242 "AE_BAD_CHECKSUM", 246 "AE_BAD_CHECKSUM",
@@ -246,6 +250,7 @@ char const *acpi_gbl_exception_names_tbl[] = {
246}; 250};
247 251
248char const *acpi_gbl_exception_names_aml[] = { 252char const *acpi_gbl_exception_names_aml[] = {
253 NULL,
249 "AE_AML_ERROR", 254 "AE_AML_ERROR",
250 "AE_AML_PARSE", 255 "AE_AML_PARSE",
251 "AE_AML_BAD_OPCODE", 256 "AE_AML_BAD_OPCODE",
@@ -283,6 +288,7 @@ char const *acpi_gbl_exception_names_aml[] = {
283}; 288};
284 289
285char const *acpi_gbl_exception_names_ctrl[] = { 290char const *acpi_gbl_exception_names_ctrl[] = {
291 NULL,
286 "AE_CTRL_RETURN_VALUE", 292 "AE_CTRL_RETURN_VALUE",
287 "AE_CTRL_PENDING", 293 "AE_CTRL_PENDING",
288 "AE_CTRL_TERMINATE", 294 "AE_CTRL_TERMINATE",
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h
index 74ad971241db..15dda46b70d1 100644
--- a/include/acpi/acglobal.h
+++ b/include/acpi/acglobal.h
@@ -140,7 +140,7 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags;
140 */ 140 */
141ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list; 141ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list;
142ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT; 142ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT;
143extern acpi_native_uint acpi_gbl_permanent_mmap; 143extern u8 acpi_gbl_permanent_mmap;
144 144
145/* These addresses are calculated from FADT address values */ 145/* These addresses are calculated from FADT address values */
146 146
diff --git a/include/acpi/achware.h b/include/acpi/achware.h
index d4fb9bbc903c..97a72b193276 100644
--- a/include/acpi/achware.h
+++ b/include/acpi/achware.h
@@ -87,6 +87,8 @@ acpi_status acpi_hw_clear_acpi_status(void);
87/* 87/*
88 * hwgpe - GPE support 88 * hwgpe - GPE support
89 */ 89 */
90acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info);
91
90acpi_status 92acpi_status
91acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info); 93acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info);
92 94
@@ -100,11 +102,9 @@ acpi_status
100acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, 102acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
101 struct acpi_gpe_block_info *gpe_block); 103 struct acpi_gpe_block_info *gpe_block);
102 104
103#ifdef ACPI_FUTURE_USAGE
104acpi_status 105acpi_status
105acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info, 106acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info,
106 acpi_event_status * event_status); 107 acpi_event_status * event_status);
107#endif /* ACPI_FUTURE_USAGE */
108 108
109acpi_status acpi_hw_disable_all_gpes(void); 109acpi_status acpi_hw_disable_all_gpes(void);
110 110
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h
index e249ce5d3300..e8db7a3143a5 100644
--- a/include/acpi/acinterp.h
+++ b/include/acpi/acinterp.h
@@ -366,10 +366,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth);
366 366
367void 367void
368acpi_ex_dump_operands(union acpi_operand_object **operands, 368acpi_ex_dump_operands(union acpi_operand_object **operands,
369 acpi_interpreter_mode interpreter_mode, 369 const char *opcode_name, u32 num_opcodes);
370 char *ident,
371 u32 num_levels,
372 char *note, char *module_name, u32 line_number);
373 370
374#ifdef ACPI_FUTURE_USAGE 371#ifdef ACPI_FUTURE_USAGE
375void 372void
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index c5cdc32ac2f8..b221c8583ddd 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -98,8 +98,8 @@ union acpi_parse_object;
98 98
99static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = { 99static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
100 "ACPI_MTX_Interpreter", 100 "ACPI_MTX_Interpreter",
101 "ACPI_MTX_Tables",
102 "ACPI_MTX_Namespace", 101 "ACPI_MTX_Namespace",
102 "ACPI_MTX_Tables",
103 "ACPI_MTX_Events", 103 "ACPI_MTX_Events",
104 "ACPI_MTX_Caches", 104 "ACPI_MTX_Caches",
105 "ACPI_MTX_Memory", 105 "ACPI_MTX_Memory",
@@ -282,8 +282,8 @@ struct acpi_predefined_names {
282/* Info structure used to convert external<->internal namestrings */ 282/* Info structure used to convert external<->internal namestrings */
283 283
284struct acpi_namestring_info { 284struct acpi_namestring_info {
285 char *external_name; 285 const char *external_name;
286 char *next_external_char; 286 const char *next_external_char;
287 char *internal_name; 287 char *internal_name;
288 u32 length; 288 u32 length;
289 u32 num_segments; 289 u32 num_segments;
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index fb41a3b802fc..57ab9e9d7593 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -80,12 +80,12 @@
80 */ 80 */
81#define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p)) 81#define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p))
82#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p)) 82#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p))
83#define ACPI_ADD_PTR(t,a,b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_native_uint)(b))) 83#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_size)(b)))
84#define ACPI_PTR_DIFF(a,b) (acpi_native_uint) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b))) 84#define ACPI_PTR_DIFF(a, b) (acpi_size) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b)))
85 85
86/* Pointer/Integer type conversions */ 86/* Pointer/Integer type conversions */
87 87
88#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i) 88#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL, (acpi_size) i)
89#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) 89#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
90#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) 90#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
91#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) 91#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
@@ -296,22 +296,22 @@ struct acpi_integer_overlay {
296/* 296/*
297 * Rounding macros (Power of two boundaries only) 297 * Rounding macros (Power of two boundaries only)
298 */ 298 */
299#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ 299#define ACPI_ROUND_DOWN(value, boundary) (((acpi_size)(value)) & \
300 (~(((acpi_native_uint) boundary)-1))) 300 (~(((acpi_size) boundary)-1)))
301 301
302#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ 302#define ACPI_ROUND_UP(value, boundary) ((((acpi_size)(value)) + \
303 (((acpi_native_uint) boundary)-1)) & \ 303 (((acpi_size) boundary)-1)) & \
304 (~(((acpi_native_uint) boundary)-1))) 304 (~(((acpi_size) boundary)-1)))
305 305
306/* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */ 306/* Note: sizeof(acpi_size) evaluates to either 4 or 8 (32- vs 64-bit mode) */
307 307
308#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4) 308#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4)
309#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8) 309#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8)
310#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint)) 310#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(acpi_size))
311 311
312#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4) 312#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4)
313#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8) 313#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8)
314#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(acpi_native_uint)) 314#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(acpi_size))
315 315
316#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) 316#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
317#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a)) 317#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
@@ -322,7 +322,7 @@ struct acpi_integer_overlay {
322 322
323#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary)) 323#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary))
324 324
325#define ACPI_IS_MISALIGNED(value) (((acpi_native_uint)value) & (sizeof(acpi_native_uint)-1)) 325#define ACPI_IS_MISALIGNED(value) (((acpi_size)value) & (sizeof(acpi_size)-1))
326 326
327/* 327/*
328 * Bitmask creation 328 * Bitmask creation
@@ -414,7 +414,7 @@ struct acpi_integer_overlay {
414 * error messages. The __FILE__ macro is not very useful for this, because it 414 * error messages. The __FILE__ macro is not very useful for this, because it
415 * often includes the entire pathname to the module 415 * often includes the entire pathname to the module
416 */ 416 */
417#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; 417#define ACPI_MODULE_NAME(name) static const char ACPI_UNUSED_VAR _acpi_module_name[] = name;
418#else 418#else
419#define ACPI_MODULE_NAME(name) 419#define ACPI_MODULE_NAME(name)
420#endif 420#endif
@@ -467,19 +467,17 @@ struct acpi_integer_overlay {
467/* 467/*
468 * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header, 468 * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
469 * define it now. This is the case where there the compiler does not support 469 * define it now. This is the case where there the compiler does not support
470 * a __FUNCTION__ macro or equivalent. We save the function name on the 470 * a __FUNCTION__ macro or equivalent.
471 * local stack.
472 */ 471 */
473#ifndef ACPI_GET_FUNCTION_NAME 472#ifndef ACPI_GET_FUNCTION_NAME
474#define ACPI_GET_FUNCTION_NAME _acpi_function_name 473#define ACPI_GET_FUNCTION_NAME _acpi_function_name
475/* 474/*
476 * The Name parameter should be the procedure name as a quoted string. 475 * The Name parameter should be the procedure name as a quoted string.
477 * This is declared as a local string ("MyFunctionName") so that it can 476 * The function name is also used by the function exit macros below.
478 * be also used by the function exit macros below.
479 * Note: (const char) is used to be compatible with the debug interfaces 477 * Note: (const char) is used to be compatible with the debug interfaces
480 * and macros such as __FUNCTION__. 478 * and macros such as __FUNCTION__.
481 */ 479 */
482#define ACPI_FUNCTION_NAME(name) const char *_acpi_function_name = #name; 480#define ACPI_FUNCTION_NAME(name) static const char _acpi_function_name[] = #name;
483 481
484#else 482#else
485/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */ 483/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
@@ -599,7 +597,7 @@ struct acpi_integer_overlay {
599/* Stack and buffer dumping */ 597/* Stack and buffer dumping */
600 598
601#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a),0) 599#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a),0)
602#define ACPI_DUMP_OPERANDS(a,b,c,d,e) acpi_ex_dump_operands(a,b,c,d,e,_acpi_module_name,__LINE__) 600#define ACPI_DUMP_OPERANDS(a,b,c) acpi_ex_dump_operands(a,b,c)
603 601
604#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b) 602#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b)
605#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) 603#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d)
@@ -635,7 +633,7 @@ struct acpi_integer_overlay {
635#define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0) 633#define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0)
636#define ACPI_FUNCTION_ENTRY() do { } while(0) 634#define ACPI_FUNCTION_ENTRY() do { } while(0)
637#define ACPI_DUMP_STACK_ENTRY(a) do { } while(0) 635#define ACPI_DUMP_STACK_ENTRY(a) do { } while(0)
638#define ACPI_DUMP_OPERANDS(a,b,c,d,e) do { } while(0) 636#define ACPI_DUMP_OPERANDS(a,b,c) do { } while(0)
639#define ACPI_DUMP_ENTRY(a,b) do { } while(0) 637#define ACPI_DUMP_ENTRY(a,b) do { } while(0)
640#define ACPI_DUMP_TABLES(a,b) do { } while(0) 638#define ACPI_DUMP_TABLES(a,b) do { } while(0)
641#define ACPI_DUMP_PATHNAME(a,b,c,d) do { } while(0) 639#define ACPI_DUMP_PATHNAME(a,b,c,d) do { } while(0)
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h
index 713b30903fe5..9ed70a050580 100644
--- a/include/acpi/acnamesp.h
+++ b/include/acpi/acnamesp.h
@@ -86,8 +86,7 @@ acpi_status acpi_ns_initialize_devices(void);
86acpi_status acpi_ns_load_namespace(void); 86acpi_status acpi_ns_load_namespace(void);
87 87
88acpi_status 88acpi_status
89acpi_ns_load_table(acpi_native_uint table_index, 89acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node);
90 struct acpi_namespace_node *node);
91 90
92/* 91/*
93 * nswalk - walk the namespace 92 * nswalk - walk the namespace
@@ -108,12 +107,11 @@ struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, struct
108 * nsparse - table parsing 107 * nsparse - table parsing
109 */ 108 */
110acpi_status 109acpi_status
111acpi_ns_parse_table(acpi_native_uint table_index, 110acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node);
112 struct acpi_namespace_node *start_node);
113 111
114acpi_status 112acpi_status
115acpi_ns_one_complete_parse(acpi_native_uint pass_number, 113acpi_ns_one_complete_parse(u32 pass_number,
116 acpi_native_uint table_index, 114 u32 table_index,
117 struct acpi_namespace_node *start_node); 115 struct acpi_namespace_node *start_node);
118 116
119/* 117/*
@@ -201,7 +199,7 @@ acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);
201 199
202acpi_status 200acpi_status
203acpi_ns_get_node(struct acpi_namespace_node *prefix_node, 201acpi_ns_get_node(struct acpi_namespace_node *prefix_node,
204 char *external_pathname, 202 const char *external_pathname,
205 u32 flags, struct acpi_namespace_node **out_node); 203 u32 flags, struct acpi_namespace_node **out_node);
206 204
207acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node); 205acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node);
@@ -265,28 +263,30 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node);
265u32 acpi_ns_local(acpi_object_type type); 263u32 acpi_ns_local(acpi_object_type type);
266 264
267void 265void
268acpi_ns_report_error(char *module_name, 266acpi_ns_report_error(const char *module_name,
269 u32 line_number, 267 u32 line_number,
270 char *internal_name, acpi_status lookup_status); 268 const char *internal_name, acpi_status lookup_status);
271 269
272void 270void
273acpi_ns_report_method_error(char *module_name, 271acpi_ns_report_method_error(const char *module_name,
274 u32 line_number, 272 u32 line_number,
275 char *message, 273 const char *message,
276 struct acpi_namespace_node *node, 274 struct acpi_namespace_node *node,
277 char *path, acpi_status lookup_status); 275 const char *path, acpi_status lookup_status);
278 276
279void acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *msg); 277void
278acpi_ns_print_node_pathname(struct acpi_namespace_node *node, const char *msg);
280 279
281acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info); 280acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info);
282 281
283void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info); 282void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info);
284 283
285acpi_status acpi_ns_internalize_name(char *dotted_name, char **converted_name); 284acpi_status
285acpi_ns_internalize_name(const char *dotted_name, char **converted_name);
286 286
287acpi_status 287acpi_status
288acpi_ns_externalize_name(u32 internal_name_length, 288acpi_ns_externalize_name(u32 internal_name_length,
289 char *internal_name, 289 const char *internal_name,
290 u32 * converted_name_length, char **converted_name); 290 u32 * converted_name_length, char **converted_name);
291 291
292struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle); 292struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle);
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 2f1c68c7a727..a5ac0bc7f52e 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -259,6 +259,7 @@ struct acpi_device_perf {
259/* Wakeup Management */ 259/* Wakeup Management */
260struct acpi_device_wakeup_flags { 260struct acpi_device_wakeup_flags {
261 u8 valid:1; /* Can successfully enable wakeup? */ 261 u8 valid:1; /* Can successfully enable wakeup? */
262 u8 prepared:1; /* Has the wake-up capability been enabled? */
262 u8 run_wake:1; /* Run-Wake GPE devices */ 263 u8 run_wake:1; /* Run-Wake GPE devices */
263}; 264};
264 265
@@ -335,6 +336,8 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context);
335int acpi_bus_get_status(struct acpi_device *device); 336int acpi_bus_get_status(struct acpi_device *device);
336int acpi_bus_get_power(acpi_handle handle, int *state); 337int acpi_bus_get_power(acpi_handle handle, int *state);
337int acpi_bus_set_power(acpi_handle handle, int state); 338int acpi_bus_set_power(acpi_handle handle, int state);
339bool acpi_bus_power_manageable(acpi_handle handle);
340bool acpi_bus_can_wakeup(acpi_handle handle);
338#ifdef CONFIG_ACPI_PROC_EVENT 341#ifdef CONFIG_ACPI_PROC_EVENT
339int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); 342int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data);
340int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data); 343int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data);
@@ -376,14 +379,19 @@ acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
376#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) 379#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle))
377 380
378#ifdef CONFIG_PM_SLEEP 381#ifdef CONFIG_PM_SLEEP
379int acpi_pm_device_sleep_state(struct device *, int, int *); 382int acpi_pm_device_sleep_state(struct device *, int *);
383int acpi_pm_device_sleep_wake(struct device *, bool);
380#else /* !CONFIG_PM_SLEEP */ 384#else /* !CONFIG_PM_SLEEP */
381static inline int acpi_pm_device_sleep_state(struct device *d, int w, int *p) 385static inline int acpi_pm_device_sleep_state(struct device *d, int *p)
382{ 386{
383 if (p) 387 if (p)
384 *p = ACPI_STATE_D0; 388 *p = ACPI_STATE_D0;
385 return ACPI_STATE_D3; 389 return ACPI_STATE_D3;
386} 390}
391static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
392{
393 return -ENODEV;
394}
387#endif /* !CONFIG_PM_SLEEP */ 395#endif /* !CONFIG_PM_SLEEP */
388 396
389#endif /* CONFIG_ACPI */ 397#endif /* CONFIG_ACPI */
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index 9757a040a505..e5f38e5ce86f 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -87,7 +87,9 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain,
87 -------------------------------------------------------------------------- */ 87 -------------------------------------------------------------------------- */
88 88
89#ifdef CONFIG_ACPI_POWER 89#ifdef CONFIG_ACPI_POWER
90int acpi_enable_wakeup_device_power(struct acpi_device *dev); 90int acpi_device_sleep_wake(struct acpi_device *dev,
91 int enable, int sleep_state, int dev_state);
92int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state);
91int acpi_disable_wakeup_device_power(struct acpi_device *dev); 93int acpi_disable_wakeup_device_power(struct acpi_device *dev);
92int acpi_power_get_inferred_state(struct acpi_device *device); 94int acpi_power_get_inferred_state(struct acpi_device *device);
93int acpi_power_transition(struct acpi_device *device, int state); 95int acpi_power_transition(struct acpi_device *device, int state);
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index d4a560d2deb6..3f93a6b4e17f 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -144,7 +144,7 @@ void acpi_os_release_mutex(acpi_mutex handle);
144void *acpi_os_allocate(acpi_size size); 144void *acpi_os_allocate(acpi_size size);
145 145
146void __iomem *acpi_os_map_memory(acpi_physical_address where, 146void __iomem *acpi_os_map_memory(acpi_physical_address where,
147 acpi_native_uint length); 147 acpi_size length);
148 148
149void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size); 149void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
150 150
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 2c3806e6546f..94d94e126e9f 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -98,7 +98,7 @@ void acpi_free(void *address);
98 */ 98 */
99acpi_status acpi_reallocate_root_table(void); 99acpi_status acpi_reallocate_root_table(void);
100 100
101acpi_status acpi_find_root_pointer(acpi_native_uint * rsdp_address); 101acpi_status acpi_find_root_pointer(acpi_size *rsdp_address);
102 102
103acpi_status acpi_load_tables(void); 103acpi_status acpi_load_tables(void);
104 104
@@ -108,15 +108,15 @@ acpi_status acpi_unload_table_id(acpi_owner_id id);
108 108
109acpi_status 109acpi_status
110acpi_get_table_header(acpi_string signature, 110acpi_get_table_header(acpi_string signature,
111 acpi_native_uint instance, 111 u32 instance,
112 struct acpi_table_header *out_table_header); 112 struct acpi_table_header *out_table_header);
113 113
114acpi_status 114acpi_status
115acpi_get_table(acpi_string signature, 115acpi_get_table(acpi_string signature,
116 acpi_native_uint instance, struct acpi_table_header **out_table); 116 u32 instance, struct acpi_table_header **out_table);
117 117
118acpi_status 118acpi_status
119acpi_get_table_by_index(acpi_native_uint table_index, 119acpi_get_table_by_index(u32 table_index,
120 struct acpi_table_header **out_table); 120 struct acpi_table_header **out_table);
121 121
122acpi_status 122acpi_status
@@ -248,9 +248,7 @@ acpi_status acpi_disable_event(u32 event, u32 flags);
248 248
249acpi_status acpi_clear_event(u32 event); 249acpi_status acpi_clear_event(u32 event);
250 250
251#ifdef ACPI_FUTURE_USAGE
252acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); 251acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
253#endif /* ACPI_FUTURE_USAGE */
254 252
255acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type); 253acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type);
256 254
@@ -260,12 +258,10 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
260 258
261acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags); 259acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
262 260
263#ifdef ACPI_FUTURE_USAGE
264acpi_status 261acpi_status
265acpi_get_gpe_status(acpi_handle gpe_device, 262acpi_get_gpe_status(acpi_handle gpe_device,
266 u32 gpe_number, 263 u32 gpe_number,
267 u32 flags, acpi_event_status * event_status); 264 u32 flags, acpi_event_status * event_status);
268#endif /* ACPI_FUTURE_USAGE */
269 265
270acpi_status 266acpi_status
271acpi_install_gpe_block(acpi_handle gpe_device, 267acpi_install_gpe_block(acpi_handle gpe_device,
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h
index a907c67d651e..7980a26bad35 100644
--- a/include/acpi/acstruct.h
+++ b/include/acpi/acstruct.h
@@ -108,7 +108,6 @@ struct acpi_walk_state {
108 union acpi_operand_object **caller_return_desc; 108 union acpi_operand_object **caller_return_desc;
109 union acpi_generic_state *control_state; /* List of control states (nested IFs) */ 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 */ 110 struct acpi_namespace_node *deferred_node; /* Used when executing deferred opcodes */
111 struct acpi_gpe_event_info *gpe_event_info; /* Info for GPE (_Lxx/_Exx methods only */
112 union acpi_operand_object *implicit_return_obj; 111 union acpi_operand_object *implicit_return_obj;
113 struct acpi_namespace_node *method_call_node; /* Called method Node */ 112 struct acpi_namespace_node *method_call_node; /* Called method Node */
114 union acpi_parse_object *method_call_op; /* method_call Op if running a method */ 113 union acpi_parse_object *method_call_op; /* method_call Op if running a method */
@@ -143,7 +142,7 @@ struct acpi_init_walk_info {
143 u16 package_init; 142 u16 package_init;
144 u16 object_count; 143 u16 object_count;
145 acpi_owner_id owner_id; 144 acpi_owner_id owner_id;
146 acpi_native_uint table_index; 145 u32 table_index;
147}; 146};
148 147
149struct acpi_get_devices_info { 148struct acpi_get_devices_info {
@@ -189,17 +188,12 @@ struct acpi_evaluate_info {
189 union acpi_operand_object **parameters; 188 union acpi_operand_object **parameters;
190 struct acpi_namespace_node *resolved_node; 189 struct acpi_namespace_node *resolved_node;
191 union acpi_operand_object *return_object; 190 union acpi_operand_object *return_object;
191 u8 param_count;
192 u8 pass_number; 192 u8 pass_number;
193 u8 parameter_type;
194 u8 return_object_type; 193 u8 return_object_type;
195 u8 flags; 194 u8 flags;
196}; 195};
197 196
198/* Types for parameter_type above */
199
200#define ACPI_PARAM_ARGS 0
201#define ACPI_PARAM_GPE 1
202
203/* Values for Flags above */ 197/* Values for Flags above */
204 198
205#define ACPI_IGNORE_RETURN_VALUE 1 199#define ACPI_IGNORE_RETURN_VALUE 1
diff --git a/include/acpi/actables.h b/include/acpi/actables.h
index 4b36a55b0b3b..0cbe1b9ab522 100644
--- a/include/acpi/actables.h
+++ b/include/acpi/actables.h
@@ -49,7 +49,7 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count);
49/* 49/*
50 * tbfadt - FADT parse/convert/validate 50 * tbfadt - FADT parse/convert/validate
51 */ 51 */
52void acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags); 52void acpi_tb_parse_fadt(u32 table_index, u8 flags);
53 53
54void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length); 54void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);
55 55
@@ -58,8 +58,7 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);
58 */ 58 */
59acpi_status 59acpi_status
60acpi_tb_find_table(char *signature, 60acpi_tb_find_table(char *signature,
61 char *oem_id, 61 char *oem_id, char *oem_table_id, u32 *table_index);
62 char *oem_table_id, acpi_native_uint * table_index);
63 62
64/* 63/*
65 * tbinstal - Table removal and deletion 64 * tbinstal - Table removal and deletion
@@ -69,30 +68,28 @@ acpi_status acpi_tb_resize_root_table_list(void);
69acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc); 68acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc);
70 69
71acpi_status 70acpi_status
72acpi_tb_add_table(struct acpi_table_desc *table_desc, 71acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index);
73 acpi_native_uint * table_index);
74 72
75acpi_status 73acpi_status
76acpi_tb_store_table(acpi_physical_address address, 74acpi_tb_store_table(acpi_physical_address address,
77 struct acpi_table_header *table, 75 struct acpi_table_header *table,
78 u32 length, u8 flags, acpi_native_uint * table_index); 76 u32 length, u8 flags, u32 *table_index);
79 77
80void acpi_tb_delete_table(struct acpi_table_desc *table_desc); 78void acpi_tb_delete_table(struct acpi_table_desc *table_desc);
81 79
82void acpi_tb_terminate(void); 80void acpi_tb_terminate(void);
83 81
84void acpi_tb_delete_namespace_by_owner(acpi_native_uint table_index); 82void acpi_tb_delete_namespace_by_owner(u32 table_index);
85 83
86acpi_status acpi_tb_allocate_owner_id(acpi_native_uint table_index); 84acpi_status acpi_tb_allocate_owner_id(u32 table_index);
87 85
88acpi_status acpi_tb_release_owner_id(acpi_native_uint table_index); 86acpi_status acpi_tb_release_owner_id(u32 table_index);
89 87
90acpi_status 88acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *owner_id);
91acpi_tb_get_owner_id(acpi_native_uint table_index, acpi_owner_id * owner_id);
92 89
93u8 acpi_tb_is_table_loaded(acpi_native_uint table_index); 90u8 acpi_tb_is_table_loaded(u32 table_index);
94 91
95void acpi_tb_set_table_loaded_flag(acpi_native_uint table_index, u8 is_loaded); 92void acpi_tb_set_table_loaded_flag(u32 table_index, u8 is_loaded);
96 93
97/* 94/*
98 * tbutils - table manager utilities 95 * tbutils - table manager utilities
@@ -103,14 +100,14 @@ void
103acpi_tb_print_table_header(acpi_physical_address address, 100acpi_tb_print_table_header(acpi_physical_address address,
104 struct acpi_table_header *header); 101 struct acpi_table_header *header);
105 102
106u8 acpi_tb_checksum(u8 * buffer, acpi_native_uint length); 103u8 acpi_tb_checksum(u8 *buffer, u32 length);
107 104
108acpi_status 105acpi_status
109acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length); 106acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length);
110 107
111void 108void
112acpi_tb_install_table(acpi_physical_address address, 109acpi_tb_install_table(acpi_physical_address address,
113 u8 flags, char *signature, acpi_native_uint table_index); 110 u8 flags, char *signature, u32 table_index);
114 111
115acpi_status 112acpi_status
116acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags); 113acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags);
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 9af239bd1153..d38f9be2f6ee 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -300,6 +300,7 @@ struct acpi_table_dbgp {
300/******************************************************************************* 300/*******************************************************************************
301 * 301 *
302 * DMAR - DMA Remapping table 302 * DMAR - DMA Remapping table
303 * From "Intel Virtualization Technology for Directed I/O", Sept. 2007
303 * 304 *
304 ******************************************************************************/ 305 ******************************************************************************/
305 306
@@ -310,6 +311,10 @@ struct acpi_table_dmar {
310 u8 reserved[10]; 311 u8 reserved[10];
311}; 312};
312 313
314/* Flags */
315
316#define ACPI_DMAR_INTR_REMAP (1)
317
313/* DMAR subtable header */ 318/* DMAR subtable header */
314 319
315struct acpi_dmar_header { 320struct acpi_dmar_header {
@@ -382,6 +387,20 @@ struct acpi_dmar_reserved_memory {
382 387
383#define ACPI_DMAR_ALLOW_ALL (1) 388#define ACPI_DMAR_ALLOW_ALL (1)
384 389
390
391/* 2: Root Port ATS Capability Reporting Structure */
392
393struct acpi_dmar_atsr {
394 struct acpi_dmar_header header;
395 u8 flags;
396 u8 reserved;
397 u16 segment;
398};
399
400/* Flags */
401
402#define ACPI_DMAR_ALL_PORTS (1)
403
385/******************************************************************************* 404/*******************************************************************************
386 * 405 *
387 * ECDT - Embedded Controller Boot Resources Table 406 * ECDT - Embedded Controller Boot Resources Table
@@ -1156,9 +1175,9 @@ struct acpi_srat_mem_affinity {
1156 u16 reserved; /* Reserved, must be zero */ 1175 u16 reserved; /* Reserved, must be zero */
1157 u64 base_address; 1176 u64 base_address;
1158 u64 length; 1177 u64 length;
1159 u32 memory_type; /* See acpi_address_range_id */ 1178 u32 reserved1;
1160 u32 flags; 1179 u32 flags;
1161 u64 reserved1; /* Reserved, must be zero */ 1180 u64 reserved2; /* Reserved, must be zero */
1162}; 1181};
1163 1182
1164/* Flags */ 1183/* Flags */
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index dfea2d440488..4ea4f40bf894 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -110,10 +110,10 @@
110 * usually used for memory allocation, efficient loop counters, and array 110 * usually used for memory allocation, efficient loop counters, and array
111 * indexes. The types are similar to the size_t type in the C library and are 111 * indexes. The types are similar to the size_t type in the C library and are
112 * required because there is no C type that consistently represents the native 112 * required because there is no C type that consistently represents the native
113 * data width. 113 * data width. ACPI_SIZE is needed because there is no guarantee that a
114 * kernel-level C library is present.
114 * 115 *
115 * ACPI_SIZE 16/32/64-bit unsigned value 116 * ACPI_SIZE 16/32/64-bit unsigned value
116 * ACPI_NATIVE_UINT 16/32/64-bit unsigned value
117 * ACPI_NATIVE_INT 16/32/64-bit signed value 117 * ACPI_NATIVE_INT 16/32/64-bit signed value
118 * 118 *
119 */ 119 */
@@ -147,9 +147,9 @@ typedef int INT32;
147 147
148/*! [End] no source code translation !*/ 148/*! [End] no source code translation !*/
149 149
150typedef u64 acpi_native_uint;
151typedef s64 acpi_native_int; 150typedef s64 acpi_native_int;
152 151
152typedef u64 acpi_size;
153typedef u64 acpi_io_address; 153typedef u64 acpi_io_address;
154typedef u64 acpi_physical_address; 154typedef u64 acpi_physical_address;
155 155
@@ -186,9 +186,9 @@ typedef int INT32;
186 186
187/*! [End] no source code translation !*/ 187/*! [End] no source code translation !*/
188 188
189typedef u32 acpi_native_uint;
190typedef s32 acpi_native_int; 189typedef s32 acpi_native_int;
191 190
191typedef u32 acpi_size;
192typedef u32 acpi_io_address; 192typedef u32 acpi_io_address;
193typedef u32 acpi_physical_address; 193typedef u32 acpi_physical_address;
194 194
@@ -202,10 +202,6 @@ typedef u32 acpi_physical_address;
202#error unknown ACPI_MACHINE_WIDTH 202#error unknown ACPI_MACHINE_WIDTH
203#endif 203#endif
204 204
205/* Variable-width type, used instead of clib size_t */
206
207typedef acpi_native_uint acpi_size;
208
209/******************************************************************************* 205/*******************************************************************************
210 * 206 *
211 * OS-dependent and compiler-dependent types 207 * OS-dependent and compiler-dependent types
@@ -219,7 +215,7 @@ typedef acpi_native_uint acpi_size;
219/* Value returned by acpi_os_get_thread_id */ 215/* Value returned by acpi_os_get_thread_id */
220 216
221#ifndef acpi_thread_id 217#ifndef acpi_thread_id
222#define acpi_thread_id acpi_native_uint 218#define acpi_thread_id acpi_size
223#endif 219#endif
224 220
225/* Object returned from acpi_os_create_lock */ 221/* Object returned from acpi_os_create_lock */
@@ -231,7 +227,7 @@ typedef acpi_native_uint acpi_size;
231/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ 227/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */
232 228
233#ifndef acpi_cpu_flags 229#ifndef acpi_cpu_flags
234#define acpi_cpu_flags acpi_native_uint 230#define acpi_cpu_flags acpi_size
235#endif 231#endif
236 232
237/* Object returned from acpi_os_create_cache */ 233/* Object returned from acpi_os_create_cache */
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h
index b42cadf07302..69f8888771ff 100644
--- a/include/acpi/acutils.h
+++ b/include/acpi/acutils.h
@@ -172,7 +172,7 @@ char *acpi_ut_strstr(char *string1, char *string2);
172 172
173void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count); 173void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count);
174 174
175void *acpi_ut_memset(void *dest, acpi_native_uint value, acpi_size count); 175void *acpi_ut_memset(void *dest, u8 value, acpi_size count);
176 176
177int acpi_ut_to_upper(int c); 177int acpi_ut_to_upper(int c);
178 178
@@ -245,41 +245,45 @@ void acpi_ut_track_stack_ptr(void);
245 245
246void 246void
247acpi_ut_trace(u32 line_number, 247acpi_ut_trace(u32 line_number,
248 const char *function_name, char *module_name, u32 component_id); 248 const char *function_name,
249 const char *module_name, u32 component_id);
249 250
250void 251void
251acpi_ut_trace_ptr(u32 line_number, 252acpi_ut_trace_ptr(u32 line_number,
252 const char *function_name, 253 const char *function_name,
253 char *module_name, u32 component_id, void *pointer); 254 const char *module_name, u32 component_id, void *pointer);
254 255
255void 256void
256acpi_ut_trace_u32(u32 line_number, 257acpi_ut_trace_u32(u32 line_number,
257 const char *function_name, 258 const char *function_name,
258 char *module_name, u32 component_id, u32 integer); 259 const char *module_name, u32 component_id, u32 integer);
259 260
260void 261void
261acpi_ut_trace_str(u32 line_number, 262acpi_ut_trace_str(u32 line_number,
262 const char *function_name, 263 const char *function_name,
263 char *module_name, u32 component_id, char *string); 264 const char *module_name, u32 component_id, char *string);
264 265
265void 266void
266acpi_ut_exit(u32 line_number, 267acpi_ut_exit(u32 line_number,
267 const char *function_name, char *module_name, u32 component_id); 268 const char *function_name,
269 const char *module_name, u32 component_id);
268 270
269void 271void
270acpi_ut_status_exit(u32 line_number, 272acpi_ut_status_exit(u32 line_number,
271 const char *function_name, 273 const char *function_name,
272 char *module_name, u32 component_id, acpi_status status); 274 const char *module_name,
275 u32 component_id, acpi_status status);
273 276
274void 277void
275acpi_ut_value_exit(u32 line_number, 278acpi_ut_value_exit(u32 line_number,
276 const char *function_name, 279 const char *function_name,
277 char *module_name, u32 component_id, acpi_integer value); 280 const char *module_name,
281 u32 component_id, acpi_integer value);
278 282
279void 283void
280acpi_ut_ptr_exit(u32 line_number, 284acpi_ut_ptr_exit(u32 line_number,
281 const char *function_name, 285 const char *function_name,
282 char *module_name, u32 component_id, u8 * ptr); 286 const char *module_name, u32 component_id, u8 *ptr);
283 287
284void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); 288void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id);
285 289
@@ -297,33 +301,35 @@ void ACPI_INTERNAL_VAR_XFACE
297acpi_ut_debug_print(u32 requested_debug_level, 301acpi_ut_debug_print(u32 requested_debug_level,
298 u32 line_number, 302 u32 line_number,
299 const char *function_name, 303 const char *function_name,
300 char *module_name, 304 const char *module_name,
301 u32 component_id, char *format, ...) ACPI_PRINTF_LIKE(6); 305 u32 component_id,
306 const char *format, ...) ACPI_PRINTF_LIKE(6);
302 307
303void ACPI_INTERNAL_VAR_XFACE 308void ACPI_INTERNAL_VAR_XFACE
304acpi_ut_debug_print_raw(u32 requested_debug_level, 309acpi_ut_debug_print_raw(u32 requested_debug_level,
305 u32 line_number, 310 u32 line_number,
306 const char *function_name, 311 const char *function_name,
307 char *module_name, 312 const char *module_name,
308 u32 component_id, 313 u32 component_id,
309 char *format, ...) ACPI_PRINTF_LIKE(6); 314 const char *format, ...) ACPI_PRINTF_LIKE(6);
310 315
311void ACPI_INTERNAL_VAR_XFACE 316void ACPI_INTERNAL_VAR_XFACE
312acpi_ut_error(char *module_name, 317acpi_ut_error(const char *module_name,
313 u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); 318 u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
314 319
315void ACPI_INTERNAL_VAR_XFACE 320void ACPI_INTERNAL_VAR_XFACE
316acpi_ut_exception(char *module_name, 321acpi_ut_exception(const char *module_name,
317 u32 line_number, 322 u32 line_number,
318 acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4); 323 acpi_status status,
324 const char *format, ...) ACPI_PRINTF_LIKE(4);
319 325
320void ACPI_INTERNAL_VAR_XFACE 326void ACPI_INTERNAL_VAR_XFACE
321acpi_ut_warning(char *module_name, 327acpi_ut_warning(const char *module_name,
322 u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); 328 u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
323 329
324void ACPI_INTERNAL_VAR_XFACE 330void ACPI_INTERNAL_VAR_XFACE
325acpi_ut_info(char *module_name, 331acpi_ut_info(const char *module_name,
326 u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); 332 u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
327 333
328/* 334/*
329 * utdelete - Object deletion and reference counts 335 * utdelete - Object deletion and reference counts
@@ -376,13 +382,14 @@ acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest);
376/* 382/*
377 * utobject - internal object create/delete/cache routines 383 * utobject - internal object create/delete/cache routines
378 */ 384 */
379union acpi_operand_object *acpi_ut_create_internal_object_dbg(char *module_name, 385union acpi_operand_object *acpi_ut_create_internal_object_dbg(const char
386 *module_name,
380 u32 line_number, 387 u32 line_number,
381 u32 component_id, 388 u32 component_id,
382 acpi_object_type 389 acpi_object_type
383 type); 390 type);
384 391
385void *acpi_ut_allocate_object_desc_dbg(char *module_name, 392void *acpi_ut_allocate_object_desc_dbg(const char *module_name,
386 u32 line_number, u32 component_id); 393 u32 line_number, u32 component_id);
387 394
388#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t) 395#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t)
@@ -476,7 +483,7 @@ u8 acpi_ut_valid_acpi_name(u32 name);
476 483
477acpi_name acpi_ut_repair_name(char *name); 484acpi_name acpi_ut_repair_name(char *name);
478 485
479u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position); 486u8 acpi_ut_valid_acpi_char(char character, u32 position);
480 487
481acpi_status 488acpi_status
482acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); 489acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer);
@@ -543,26 +550,29 @@ acpi_status
543acpi_ut_initialize_buffer(struct acpi_buffer *buffer, 550acpi_ut_initialize_buffer(struct acpi_buffer *buffer,
544 acpi_size required_length); 551 acpi_size required_length);
545 552
546void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); 553void *acpi_ut_allocate(acpi_size size,
554 u32 component, const char *module, u32 line);
547 555
548void *acpi_ut_allocate_zeroed(acpi_size size, 556void *acpi_ut_allocate_zeroed(acpi_size size,
549 u32 component, char *module, u32 line); 557 u32 component, const char *module, u32 line);
550 558
551#ifdef ACPI_DBG_TRACK_ALLOCATIONS 559#ifdef ACPI_DBG_TRACK_ALLOCATIONS
552void *acpi_ut_allocate_and_track(acpi_size size, 560void *acpi_ut_allocate_and_track(acpi_size size,
553 u32 component, char *module, u32 line); 561 u32 component, const char *module, u32 line);
554 562
555void *acpi_ut_allocate_zeroed_and_track(acpi_size size, 563void *acpi_ut_allocate_zeroed_and_track(acpi_size size,
556 u32 component, char *module, u32 line); 564 u32 component,
565 const char *module, u32 line);
557 566
558void 567void
559acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line); 568acpi_ut_free_and_track(void *address,
569 u32 component, const char *module, u32 line);
560 570
561#ifdef ACPI_FUTURE_USAGE 571#ifdef ACPI_FUTURE_USAGE
562void acpi_ut_dump_allocation_info(void); 572void acpi_ut_dump_allocation_info(void);
563#endif /* ACPI_FUTURE_USAGE */ 573#endif /* ACPI_FUTURE_USAGE */
564 574
565void acpi_ut_dump_allocations(u32 component, char *module); 575void acpi_ut_dump_allocations(u32 component, const char *module);
566 576
567acpi_status 577acpi_status
568acpi_ut_create_list(char *list_name, 578acpi_ut_create_list(char *list_name,
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 06ebb6ef72aa..3795590e152a 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -255,7 +255,7 @@ extern void acpi_processor_unregister_performance(struct
255int acpi_processor_notify_smm(struct module *calling_module); 255int acpi_processor_notify_smm(struct module *calling_module);
256 256
257/* for communication between multiple parts of the processor kernel module */ 257/* for communication between multiple parts of the processor kernel module */
258extern struct acpi_processor *processors[NR_CPUS]; 258DECLARE_PER_CPU(struct acpi_processor *, processors);
259extern struct acpi_processor_errata errata; 259extern struct acpi_processor_errata errata;
260 260
261void arch_acpi_processor_init_pdc(struct acpi_processor *pr); 261void arch_acpi_processor_init_pdc(struct acpi_processor *pr);
diff --git a/include/acpi/reboot.h b/include/acpi/reboot.h
index 8857f57e0b78..0419184ce886 100644
--- a/include/acpi/reboot.h
+++ b/include/acpi/reboot.h
@@ -1,9 +1,11 @@
1#ifndef __ACPI_REBOOT_H
2#define __ACPI_REBOOT_H
3
4#ifdef CONFIG_ACPI
5extern void acpi_reboot(void);
6#else
7static inline void acpi_reboot(void) { }
8#endif
1 9
2/*
3 * Dummy placeholder to make the EFI patches apply to the x86 tree.
4 * Andrew/Len, please just kill this file if you encounter it.
5 */
6#ifndef acpi_reboot
7# define acpi_reboot() do { } while (0)
8#endif 10#endif
9 11