diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-02 01:12:54 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-02 01:12:54 -0500 |
commit | 18ee3610040a4c008ce08a40a5dd025241cc7e97 (patch) | |
tree | 32a996a5123726b63c31a1522f230933fb967a32 /include | |
parent | e4e7b89280d1d666e2c09e5ad36cf071796c4c7e (diff) | |
parent | b4103333d7904310d34de18d85e51e3d74f00a3b (diff) |
Merge branch 'master'
Diffstat (limited to 'include')
109 files changed, 1642 insertions, 1177 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 427cff1a3f83..e27dc8f29972 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -61,9 +61,9 @@ | |||
61 | * | 61 | * |
62 | */ | 62 | */ |
63 | 63 | ||
64 | /* Version string */ | 64 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
65 | 65 | ||
66 | #define ACPI_CA_VERSION 0x20050902 | 66 | #define ACPI_CA_VERSION 0x20060127 |
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, |
@@ -83,7 +83,7 @@ | |||
83 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ | 83 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Should the subystem abort the loading of an ACPI table if the | 86 | * Should the subsystem abort the loading of an ACPI table if the |
87 | * table checksum is incorrect? | 87 | * table checksum is incorrect? |
88 | */ | 88 | */ |
89 | #define ACPI_CHECKSUM_ABORT FALSE | 89 | #define ACPI_CHECKSUM_ABORT FALSE |
@@ -98,11 +98,6 @@ | |||
98 | 98 | ||
99 | #define ACPI_CA_SUPPORT_LEVEL 3 | 99 | #define ACPI_CA_SUPPORT_LEVEL 3 |
100 | 100 | ||
101 | /* String size constants */ | ||
102 | |||
103 | #define ACPI_MAX_STRING_LENGTH 512 | ||
104 | #define ACPI_PATHNAME_MAX 256 /* A full namespace pathname */ | ||
105 | |||
106 | /* Maximum count for a semaphore object */ | 101 | /* Maximum count for a semaphore object */ |
107 | 102 | ||
108 | #define ACPI_MAX_SEMAPHORE_COUNT 256 | 103 | #define ACPI_MAX_SEMAPHORE_COUNT 256 |
@@ -115,6 +110,10 @@ | |||
115 | 110 | ||
116 | #define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096 | 111 | #define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096 |
117 | 112 | ||
113 | /* owner_id tracking. 8 entries allows for 255 owner_ids */ | ||
114 | |||
115 | #define ACPI_NUM_OWNERID_MASKS 8 | ||
116 | |||
118 | /****************************************************************************** | 117 | /****************************************************************************** |
119 | * | 118 | * |
120 | * ACPI Specification constants (Do not change unless the specification changes) | 119 | * ACPI Specification constants (Do not change unless the specification changes) |
@@ -134,14 +133,11 @@ | |||
134 | #define ACPI_METHOD_NUM_ARGS 7 | 133 | #define ACPI_METHOD_NUM_ARGS 7 |
135 | #define ACPI_METHOD_MAX_ARG 6 | 134 | #define ACPI_METHOD_MAX_ARG 6 |
136 | 135 | ||
137 | /* Maximum length of resulting string when converting from a buffer */ | 136 | /* Length of _HID, _UID, _CID, and UUID values */ |
138 | |||
139 | #define ACPI_MAX_STRING_CONVERSION 200 | ||
140 | |||
141 | /* Length of _HID, _UID, and _CID values */ | ||
142 | 137 | ||
143 | #define ACPI_DEVICE_ID_LENGTH 0x09 | 138 | #define ACPI_DEVICE_ID_LENGTH 0x09 |
144 | #define ACPI_MAX_CID_LENGTH 48 | 139 | #define ACPI_MAX_CID_LENGTH 48 |
140 | #define ACPI_UUID_LENGTH 16 | ||
145 | 141 | ||
146 | /* | 142 | /* |
147 | * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG | 143 | * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG |
diff --git a/include/acpi/acdebug.h b/include/acpi/acdebug.h index 70ce3b4d006e..d8167095caf3 100644 --- a/include/acpi/acdebug.h +++ b/include/acpi/acdebug.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 3d96dcb1bb4b..11a8fe39cb04 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -57,26 +57,11 @@ struct acpi_external_list { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | extern struct acpi_external_list *acpi_gbl_external_list; | 59 | extern struct acpi_external_list *acpi_gbl_external_list; |
60 | extern const char *acpi_gbl_io_decode[2]; | 60 | |
61 | /* Strings used for decoding flags to ASL keywords */ | ||
62 | |||
61 | extern const char *acpi_gbl_word_decode[4]; | 63 | extern const char *acpi_gbl_word_decode[4]; |
62 | extern const char *acpi_gbl_consume_decode[2]; | ||
63 | extern const char *acpi_gbl_min_decode[2]; | ||
64 | extern const char *acpi_gbl_max_decode[2]; | ||
65 | extern const char *acpi_gbl_DECdecode[2]; | ||
66 | extern const char *acpi_gbl_RNGdecode[4]; | ||
67 | extern const char *acpi_gbl_MEMdecode[4]; | ||
68 | extern const char *acpi_gbl_RWdecode[2]; | ||
69 | extern const char *acpi_gbl_irq_decode[2]; | 64 | extern const char *acpi_gbl_irq_decode[2]; |
70 | extern const char *acpi_gbl_HEdecode[2]; | ||
71 | extern const char *acpi_gbl_LLdecode[2]; | ||
72 | extern const char *acpi_gbl_SHRdecode[2]; | ||
73 | extern const char *acpi_gbl_TYPdecode[4]; | ||
74 | extern const char *acpi_gbl_BMdecode[2]; | ||
75 | extern const char *acpi_gbl_SIZdecode[4]; | ||
76 | extern const char *acpi_gbl_TTPdecode[2]; | ||
77 | extern const char *acpi_gbl_MTPdecode[4]; | ||
78 | extern const char *acpi_gbl_TRSdecode[2]; | ||
79 | |||
80 | extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; | 65 | extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; |
81 | extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; | 66 | extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; |
82 | extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; | 67 | extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; |
@@ -171,11 +156,19 @@ u8 acpi_dm_is_string_buffer(union acpi_parse_object *op); | |||
171 | /* | 156 | /* |
172 | * dmresrc | 157 | * dmresrc |
173 | */ | 158 | */ |
159 | void acpi_dm_dump_integer8(u8 value, char *name); | ||
160 | |||
161 | void acpi_dm_dump_integer16(u16 value, char *name); | ||
162 | |||
163 | void acpi_dm_dump_integer32(u32 value, char *name); | ||
164 | |||
165 | void acpi_dm_dump_integer64(u64 value, char *name); | ||
166 | |||
174 | void | 167 | void |
175 | acpi_dm_resource_descriptor(struct acpi_op_walk_info *info, | 168 | acpi_dm_resource_template(struct acpi_op_walk_info *info, |
176 | u8 * byte_data, u32 byte_count); | 169 | u8 * byte_data, u32 byte_count); |
177 | 170 | ||
178 | u8 acpi_dm_is_resource_descriptor(union acpi_parse_object *op); | 171 | u8 acpi_dm_is_resource_template(union acpi_parse_object *op); |
179 | 172 | ||
180 | void acpi_dm_indent(u32 level); | 173 | void acpi_dm_indent(u32 level); |
181 | 174 | ||
@@ -187,73 +180,69 @@ void acpi_dm_decode_attribute(u8 attribute); | |||
187 | * dmresrcl | 180 | * dmresrcl |
188 | */ | 181 | */ |
189 | void | 182 | void |
190 | acpi_dm_word_descriptor(struct asl_word_address_desc *resource, | 183 | acpi_dm_word_descriptor(union aml_resource *resource, u32 length, u32 level); |
191 | u32 length, u32 level); | ||
192 | 184 | ||
193 | void | 185 | void |
194 | acpi_dm_dword_descriptor(struct asl_dword_address_desc *resource, | 186 | acpi_dm_dword_descriptor(union aml_resource *resource, u32 length, u32 level); |
195 | u32 length, u32 level); | ||
196 | 187 | ||
197 | void | 188 | void |
198 | acpi_dm_extended_descriptor(struct asl_extended_address_desc *resource, | 189 | acpi_dm_extended_descriptor(union aml_resource *resource, |
199 | u32 length, u32 level); | 190 | u32 length, u32 level); |
200 | 191 | ||
201 | void | 192 | void |
202 | acpi_dm_qword_descriptor(struct asl_qword_address_desc *resource, | 193 | acpi_dm_qword_descriptor(union aml_resource *resource, u32 length, u32 level); |
203 | u32 length, u32 level); | ||
204 | 194 | ||
205 | void | 195 | void |
206 | acpi_dm_memory24_descriptor(struct asl_memory_24_desc *resource, | 196 | acpi_dm_memory24_descriptor(union aml_resource *resource, |
207 | u32 length, u32 level); | 197 | u32 length, u32 level); |
208 | 198 | ||
209 | void | 199 | void |
210 | acpi_dm_memory32_descriptor(struct asl_memory_32_desc *resource, | 200 | acpi_dm_memory32_descriptor(union aml_resource *resource, |
211 | u32 length, u32 level); | 201 | u32 length, u32 level); |
212 | 202 | ||
213 | void | 203 | void |
214 | acpi_dm_fixed_mem32_descriptor(struct asl_fixed_memory_32_desc *resource, | 204 | acpi_dm_fixed_memory32_descriptor(union aml_resource *resource, |
215 | u32 length, u32 level); | 205 | u32 length, u32 level); |
216 | 206 | ||
217 | void | 207 | void |
218 | acpi_dm_generic_register_descriptor(struct asl_general_register_desc *resource, | 208 | acpi_dm_generic_register_descriptor(union aml_resource *resource, |
219 | u32 length, u32 level); | 209 | u32 length, u32 level); |
220 | 210 | ||
221 | void | 211 | void |
222 | acpi_dm_interrupt_descriptor(struct asl_extended_xrupt_desc *resource, | 212 | acpi_dm_interrupt_descriptor(union aml_resource *resource, |
223 | u32 length, u32 level); | 213 | u32 length, u32 level); |
224 | 214 | ||
225 | void | 215 | void |
226 | acpi_dm_vendor_large_descriptor(struct asl_large_vendor_desc *resource, | 216 | acpi_dm_vendor_large_descriptor(union aml_resource *resource, |
227 | u32 length, u32 level); | 217 | u32 length, u32 level); |
228 | 218 | ||
219 | void acpi_dm_vendor_common(char *name, u8 * byte_data, u32 length, u32 level); | ||
220 | |||
229 | /* | 221 | /* |
230 | * dmresrcs | 222 | * dmresrcs |
231 | */ | 223 | */ |
232 | void | 224 | void |
233 | acpi_dm_irq_descriptor(struct asl_irq_format_desc *resource, | 225 | acpi_dm_irq_descriptor(union aml_resource *resource, u32 length, u32 level); |
234 | u32 length, u32 level); | ||
235 | 226 | ||
236 | void | 227 | void |
237 | acpi_dm_dma_descriptor(struct asl_dma_format_desc *resource, | 228 | acpi_dm_dma_descriptor(union aml_resource *resource, u32 length, u32 level); |
238 | u32 length, u32 level); | ||
239 | 229 | ||
240 | void | 230 | void acpi_dm_io_descriptor(union aml_resource *resource, u32 length, u32 level); |
241 | acpi_dm_io_descriptor(struct asl_io_port_desc *resource, u32 length, u32 level); | ||
242 | 231 | ||
243 | void | 232 | void |
244 | acpi_dm_fixed_io_descriptor(struct asl_fixed_io_port_desc *resource, | 233 | acpi_dm_fixed_io_descriptor(union aml_resource *resource, |
245 | u32 length, u32 level); | 234 | u32 length, u32 level); |
246 | 235 | ||
247 | void | 236 | void |
248 | acpi_dm_start_dependent_descriptor(struct asl_start_dependent_desc *resource, | 237 | acpi_dm_start_dependent_descriptor(union aml_resource *resource, |
249 | u32 length, u32 level); | 238 | u32 length, u32 level); |
250 | 239 | ||
251 | void | 240 | void |
252 | acpi_dm_end_dependent_descriptor(struct asl_start_dependent_desc *resource, | 241 | acpi_dm_end_dependent_descriptor(union aml_resource *resource, |
253 | u32 length, u32 level); | 242 | u32 length, u32 level); |
254 | 243 | ||
255 | void | 244 | void |
256 | acpi_dm_vendor_small_descriptor(struct asl_small_vendor_desc *resource, | 245 | acpi_dm_vendor_small_descriptor(union aml_resource *resource, |
257 | u32 length, u32 level); | 246 | u32 length, u32 level); |
258 | 247 | ||
259 | /* | 248 | /* |
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h index 065f24a77cfc..c41a926ff317 100644 --- a/include/acpi/acdispat.h +++ b/include/acpi/acdispat.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -201,6 +201,9 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, | |||
201 | union acpi_operand_object *obj_desc, | 201 | union acpi_operand_object *obj_desc, |
202 | struct acpi_namespace_node *calling_method_node); | 202 | struct acpi_namespace_node *calling_method_node); |
203 | 203 | ||
204 | acpi_status | ||
205 | acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state); | ||
206 | |||
204 | /* | 207 | /* |
205 | * dsinit | 208 | * dsinit |
206 | */ | 209 | */ |
diff --git a/include/acpi/acevents.h b/include/acpi/acevents.h index bfa54600ecd9..f2717be4fe0d 100644 --- a/include/acpi/acevents.h +++ b/include/acpi/acevents.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -51,6 +51,8 @@ acpi_status acpi_ev_initialize_events(void); | |||
51 | 51 | ||
52 | acpi_status acpi_ev_install_xrupt_handlers(void); | 52 | acpi_status acpi_ev_install_xrupt_handlers(void); |
53 | 53 | ||
54 | acpi_status acpi_ev_install_fadt_gpes(void); | ||
55 | |||
54 | u32 acpi_ev_fixed_event_detect(void); | 56 | u32 acpi_ev_fixed_event_detect(void); |
55 | 57 | ||
56 | /* | 58 | /* |
@@ -105,6 +107,10 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
105 | u32 interrupt_number, | 107 | u32 interrupt_number, |
106 | struct acpi_gpe_block_info **return_gpe_block); | 108 | struct acpi_gpe_block_info **return_gpe_block); |
107 | 109 | ||
110 | acpi_status | ||
111 | acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, | ||
112 | struct acpi_gpe_block_info *gpe_block); | ||
113 | |||
108 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); | 114 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); |
109 | 115 | ||
110 | u32 | 116 | u32 |
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 4f005eb65928..dc768aa580e4 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index 4ab2ca18b8df..734cc77bf2c7 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -80,6 +80,15 @@ extern u32 acpi_dbg_layer; | |||
80 | 80 | ||
81 | extern u32 acpi_gbl_nesting_level; | 81 | extern u32 acpi_gbl_nesting_level; |
82 | 82 | ||
83 | /* Support for dynamic control method tracing mechanism */ | ||
84 | |||
85 | ACPI_EXTERN u32 acpi_gbl_original_dbg_level; | ||
86 | ACPI_EXTERN u32 acpi_gbl_original_dbg_layer; | ||
87 | ACPI_EXTERN acpi_name acpi_gbl_trace_method_name; | ||
88 | ACPI_EXTERN u32 acpi_gbl_trace_dbg_level; | ||
89 | ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer; | ||
90 | ACPI_EXTERN u32 acpi_gbl_trace_flags; | ||
91 | |||
83 | /***************************************************************************** | 92 | /***************************************************************************** |
84 | * | 93 | * |
85 | * Runtime configuration (static defaults that can be overriden at runtime) | 94 | * Runtime configuration (static defaults that can be overriden at runtime) |
@@ -89,11 +98,15 @@ extern u32 acpi_gbl_nesting_level; | |||
89 | /* | 98 | /* |
90 | * Enable "slack" in the AML interpreter? Default is FALSE, and the | 99 | * Enable "slack" in the AML interpreter? Default is FALSE, and the |
91 | * interpreter strictly follows the ACPI specification. Setting to TRUE | 100 | * interpreter strictly follows the ACPI specification. Setting to TRUE |
92 | * allows the interpreter to forgive certain bad AML constructs. Currently: | 101 | * allows the interpreter to ignore certain errors and/or bad AML constructs. |
102 | * | ||
103 | * Currently, these features are enabled by this flag: | ||
104 | * | ||
93 | * 1) Allow "implicit return" of last value in a control method | 105 | * 1) Allow "implicit return" of last value in a control method |
94 | * 2) Allow access beyond end of operation region | 106 | * 2) Allow access beyond the end of an operation region |
95 | * 3) Allow access to uninitialized locals/args (auto-init to integer 0) | 107 | * 3) Allow access to uninitialized locals/args (auto-init to integer 0) |
96 | * 4) Allow ANY object type to be a source operand for the Store() operator | 108 | * 4) Allow ANY object type to be a source operand for the Store() operator |
109 | * 5) Allow unresolved references (invalid target name) in package objects | ||
97 | */ | 110 | */ |
98 | ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE); | 111 | ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE); |
99 | 112 | ||
@@ -211,9 +224,11 @@ ACPI_EXTERN u32 acpi_gbl_original_mode; | |||
211 | ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; | 224 | ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; |
212 | ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; | 225 | ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; |
213 | ACPI_EXTERN u32 acpi_gbl_ps_find_count; | 226 | ACPI_EXTERN u32 acpi_gbl_ps_find_count; |
214 | ACPI_EXTERN u64 acpi_gbl_owner_id_mask; | 227 | ACPI_EXTERN u32 acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS]; |
215 | ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; | 228 | ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; |
216 | ACPI_EXTERN u16 acpi_gbl_global_lock_handle; | 229 | ACPI_EXTERN u16 acpi_gbl_global_lock_handle; |
230 | ACPI_EXTERN u8 acpi_gbl_last_owner_id_index; | ||
231 | ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset; | ||
217 | ACPI_EXTERN u8 acpi_gbl_debugger_configuration; | 232 | ACPI_EXTERN u8 acpi_gbl_debugger_configuration; |
218 | ACPI_EXTERN u8 acpi_gbl_global_lock_acquired; | 233 | ACPI_EXTERN u8 acpi_gbl_global_lock_acquired; |
219 | ACPI_EXTERN u8 acpi_gbl_step_to_next_call; | 234 | ACPI_EXTERN u8 acpi_gbl_step_to_next_call; |
diff --git a/include/acpi/achware.h b/include/acpi/achware.h index 3644d7248e7e..29b60a8c0593 100644 --- a/include/acpi/achware.h +++ b/include/acpi/achware.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index 2c9c1a1d1b7f..9f22cfcb624b 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -44,7 +44,49 @@ | |||
44 | #ifndef __ACINTERP_H__ | 44 | #ifndef __ACINTERP_H__ |
45 | #define __ACINTERP_H__ | 45 | #define __ACINTERP_H__ |
46 | 46 | ||
47 | #define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1])) | 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 structure to byte alignment, since we | ||
57 | * don't care about performance for debug output | ||
58 | */ | ||
59 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | ||
60 | #pragma pack(1) | ||
61 | #endif | ||
62 | |||
63 | typedef const struct acpi_exdump_info { | ||
64 | u8 opcode; | ||
65 | u8 offset; | ||
66 | char *name; | ||
67 | |||
68 | } acpi_exdump_info; | ||
69 | |||
70 | /* Values for the Opcode field above */ | ||
71 | |||
72 | #define ACPI_EXD_INIT 0 | ||
73 | #define ACPI_EXD_TYPE 1 | ||
74 | #define ACPI_EXD_UINT8 2 | ||
75 | #define ACPI_EXD_UINT16 3 | ||
76 | #define ACPI_EXD_UINT32 4 | ||
77 | #define ACPI_EXD_UINT64 5 | ||
78 | #define ACPI_EXD_LITERAL 6 | ||
79 | #define ACPI_EXD_POINTER 7 | ||
80 | #define ACPI_EXD_ADDRESS 8 | ||
81 | #define ACPI_EXD_STRING 9 | ||
82 | #define ACPI_EXD_BUFFER 10 | ||
83 | #define ACPI_EXD_PACKAGE 11 | ||
84 | #define ACPI_EXD_FIELD 12 | ||
85 | #define ACPI_EXD_REFERENCE 13 | ||
86 | |||
87 | /* restore default alignment */ | ||
88 | |||
89 | #pragma pack() | ||
48 | 90 | ||
49 | /* | 91 | /* |
50 | * exconvrt - object conversion | 92 | * exconvrt - object conversion |
@@ -327,7 +369,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, | |||
327 | void | 369 | void |
328 | acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags); | 370 | acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags); |
329 | 371 | ||
330 | void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags); | 372 | void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags); |
331 | #endif /* ACPI_FUTURE_USAGE */ | 373 | #endif /* ACPI_FUTURE_USAGE */ |
332 | 374 | ||
333 | /* | 375 | /* |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 9fba0fddda90..8361820d2970 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -276,6 +276,37 @@ struct acpi_create_field_info { | |||
276 | u8 field_type; | 276 | u8 field_type; |
277 | }; | 277 | }; |
278 | 278 | ||
279 | /* | ||
280 | * Bitmapped ACPI types. Used internally only | ||
281 | */ | ||
282 | #define ACPI_BTYPE_ANY 0x00000000 | ||
283 | #define ACPI_BTYPE_INTEGER 0x00000001 | ||
284 | #define ACPI_BTYPE_STRING 0x00000002 | ||
285 | #define ACPI_BTYPE_BUFFER 0x00000004 | ||
286 | #define ACPI_BTYPE_PACKAGE 0x00000008 | ||
287 | #define ACPI_BTYPE_FIELD_UNIT 0x00000010 | ||
288 | #define ACPI_BTYPE_DEVICE 0x00000020 | ||
289 | #define ACPI_BTYPE_EVENT 0x00000040 | ||
290 | #define ACPI_BTYPE_METHOD 0x00000080 | ||
291 | #define ACPI_BTYPE_MUTEX 0x00000100 | ||
292 | #define ACPI_BTYPE_REGION 0x00000200 | ||
293 | #define ACPI_BTYPE_POWER 0x00000400 | ||
294 | #define ACPI_BTYPE_PROCESSOR 0x00000800 | ||
295 | #define ACPI_BTYPE_THERMAL 0x00001000 | ||
296 | #define ACPI_BTYPE_BUFFER_FIELD 0x00002000 | ||
297 | #define ACPI_BTYPE_DDB_HANDLE 0x00004000 | ||
298 | #define ACPI_BTYPE_DEBUG_OBJECT 0x00008000 | ||
299 | #define ACPI_BTYPE_REFERENCE 0x00010000 | ||
300 | #define ACPI_BTYPE_RESOURCE 0x00020000 | ||
301 | |||
302 | #define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER) | ||
303 | |||
304 | #define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE) | ||
305 | #define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE) | ||
306 | #define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR) | ||
307 | #define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ | ||
308 | #define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF | ||
309 | |||
279 | /***************************************************************************** | 310 | /***************************************************************************** |
280 | * | 311 | * |
281 | * Event typedefs and structs | 312 | * Event typedefs and structs |
@@ -385,13 +416,13 @@ struct acpi_field_info { | |||
385 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 | 416 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 |
386 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 | 417 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 |
387 | 418 | ||
388 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ | 419 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ |
389 | u8 data_type; /* To differentiate various internal objs */\ | 420 | u8 data_type; /* To differentiate various internal objs */\ |
390 | u8 flags; \ | 421 | u8 flags; \ |
391 | u16 value; \ | 422 | u16 value; \ |
392 | u16 state; \ | 423 | u16 state; \ |
393 | u16 reserved; \ | 424 | u16 reserved; \ |
394 | void *next; \ | 425 | void *next; |
395 | 426 | ||
396 | struct acpi_common_state { | 427 | struct acpi_common_state { |
397 | ACPI_STATE_COMMON}; | 428 | ACPI_STATE_COMMON}; |
@@ -544,8 +575,7 @@ union acpi_parse_value { | |||
544 | char aml_op_name[16]) /* Op name (debug only) */\ | 575 | char aml_op_name[16]) /* Op name (debug only) */\ |
545 | /* NON-DEBUG members below: */\ | 576 | /* NON-DEBUG members below: */\ |
546 | struct acpi_namespace_node *node; /* For use by interpreter */\ | 577 | struct acpi_namespace_node *node; /* For use by interpreter */\ |
547 | union acpi_parse_value value; /* Value or args associated with the opcode */\ | 578 | union acpi_parse_value value; /* Value or args associated with the opcode */ |
548 | |||
549 | 579 | ||
550 | #define ACPI_DASM_BUFFER 0x00 | 580 | #define ACPI_DASM_BUFFER 0x00 |
551 | #define ACPI_DASM_RESOURCE 0x01 | 581 | #define ACPI_DASM_RESOURCE 0x01 |
@@ -573,6 +603,8 @@ struct acpi_parse_obj_named { | |||
573 | 603 | ||
574 | /* The parse node is the fundamental element of the parse tree */ | 604 | /* The parse node is the fundamental element of the parse tree */ |
575 | 605 | ||
606 | #define ACPI_MAX_PARSEOP_NAME 20 | ||
607 | |||
576 | struct acpi_parse_obj_asl { | 608 | struct acpi_parse_obj_asl { |
577 | ACPI_PARSE_COMMON union acpi_parse_object *child; | 609 | ACPI_PARSE_COMMON union acpi_parse_object *child; |
578 | union acpi_parse_object *parent_method; | 610 | union acpi_parse_object *parent_method; |
@@ -597,7 +629,7 @@ struct acpi_parse_obj_asl { | |||
597 | u8 aml_opcode_length; | 629 | u8 aml_opcode_length; |
598 | u8 aml_pkg_len_bytes; | 630 | u8 aml_pkg_len_bytes; |
599 | u8 extra; | 631 | u8 extra; |
600 | char parse_op_name[12]; | 632 | char parse_op_name[ACPI_MAX_PARSEOP_NAME]; |
601 | }; | 633 | }; |
602 | 634 | ||
603 | union acpi_parse_object { | 635 | union acpi_parse_object { |
@@ -735,44 +767,52 @@ struct acpi_bit_register_info { | |||
735 | 767 | ||
736 | /* resource_type values */ | 768 | /* resource_type values */ |
737 | 769 | ||
738 | #define ACPI_RESOURCE_TYPE_MEMORY_RANGE 0 | 770 | #define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0 |
739 | #define ACPI_RESOURCE_TYPE_IO_RANGE 1 | 771 | #define ACPI_ADDRESS_TYPE_IO_RANGE 1 |
740 | #define ACPI_RESOURCE_TYPE_BUS_NUMBER_RANGE 2 | 772 | #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2 |
741 | 773 | ||
742 | /* Resource descriptor types and masks */ | 774 | /* Resource descriptor types and masks */ |
743 | 775 | ||
744 | #define ACPI_RDESC_TYPE_LARGE 0x80 | 776 | #define ACPI_RESOURCE_NAME_LARGE 0x80 |
745 | #define ACPI_RDESC_TYPE_SMALL 0x00 | 777 | #define ACPI_RESOURCE_NAME_SMALL 0x00 |
746 | 778 | ||
747 | #define ACPI_RDESC_TYPE_MASK 0x80 | 779 | #define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 contain the type */ |
748 | #define ACPI_RDESC_SMALL_MASK 0x78 /* Only bits 6:3 contain the type */ | 780 | #define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */ |
781 | #define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the type */ | ||
749 | 782 | ||
750 | /* | 783 | /* |
751 | * Small resource descriptor types | 784 | * Small resource descriptor "names" as defined by the ACPI specification. |
752 | * Note: The 3 length bits (2:0) must be zero | 785 | * Note: Bits 2:0 are used for the descriptor length |
753 | */ | 786 | */ |
754 | #define ACPI_RDESC_TYPE_IRQ_FORMAT 0x20 | 787 | #define ACPI_RESOURCE_NAME_IRQ 0x20 |
755 | #define ACPI_RDESC_TYPE_DMA_FORMAT 0x28 | 788 | #define ACPI_RESOURCE_NAME_DMA 0x28 |
756 | #define ACPI_RDESC_TYPE_START_DEPENDENT 0x30 | 789 | #define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30 |
757 | #define ACPI_RDESC_TYPE_END_DEPENDENT 0x38 | 790 | #define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38 |
758 | #define ACPI_RDESC_TYPE_IO_PORT 0x40 | 791 | #define ACPI_RESOURCE_NAME_IO 0x40 |
759 | #define ACPI_RDESC_TYPE_FIXED_IO_PORT 0x48 | 792 | #define ACPI_RESOURCE_NAME_FIXED_IO 0x48 |
760 | #define ACPI_RDESC_TYPE_SMALL_VENDOR 0x70 | 793 | #define ACPI_RESOURCE_NAME_RESERVED_S1 0x50 |
761 | #define ACPI_RDESC_TYPE_END_TAG 0x78 | 794 | #define ACPI_RESOURCE_NAME_RESERVED_S2 0x58 |
795 | #define ACPI_RESOURCE_NAME_RESERVED_S3 0x60 | ||
796 | #define ACPI_RESOURCE_NAME_RESERVED_S4 0x68 | ||
797 | #define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70 | ||
798 | #define ACPI_RESOURCE_NAME_END_TAG 0x78 | ||
762 | 799 | ||
763 | /* | 800 | /* |
764 | * Large resource descriptor types | 801 | * Large resource descriptor "names" as defined by the ACPI specification. |
802 | * Note: includes the Large Descriptor bit in bit[7] | ||
765 | */ | 803 | */ |
766 | #define ACPI_RDESC_TYPE_MEMORY_24 0x81 | 804 | #define ACPI_RESOURCE_NAME_MEMORY24 0x81 |
767 | #define ACPI_RDESC_TYPE_GENERAL_REGISTER 0x82 | 805 | #define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82 |
768 | #define ACPI_RDESC_TYPE_LARGE_VENDOR 0x84 | 806 | #define ACPI_RESOURCE_NAME_RESERVED_L1 0x83 |
769 | #define ACPI_RDESC_TYPE_MEMORY_32 0x85 | 807 | #define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84 |
770 | #define ACPI_RDESC_TYPE_FIXED_MEMORY_32 0x86 | 808 | #define ACPI_RESOURCE_NAME_MEMORY32 0x85 |
771 | #define ACPI_RDESC_TYPE_DWORD_ADDRESS_SPACE 0x87 | 809 | #define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86 |
772 | #define ACPI_RDESC_TYPE_WORD_ADDRESS_SPACE 0x88 | 810 | #define ACPI_RESOURCE_NAME_ADDRESS32 0x87 |
773 | #define ACPI_RDESC_TYPE_EXTENDED_XRUPT 0x89 | 811 | #define ACPI_RESOURCE_NAME_ADDRESS16 0x88 |
774 | #define ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE 0x8A | 812 | #define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89 |
775 | #define ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE 0x8B | 813 | #define ACPI_RESOURCE_NAME_ADDRESS64 0x8A |
814 | #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B | ||
815 | #define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B | ||
776 | 816 | ||
777 | /***************************************************************************** | 817 | /***************************************************************************** |
778 | * | 818 | * |
@@ -780,7 +820,7 @@ struct acpi_bit_register_info { | |||
780 | * | 820 | * |
781 | ****************************************************************************/ | 821 | ****************************************************************************/ |
782 | 822 | ||
783 | #define ACPI_ASCII_ZERO 0x30 | 823 | #define ACPI_ASCII_ZERO 0x30 |
784 | 824 | ||
785 | /***************************************************************************** | 825 | /***************************************************************************** |
786 | * | 826 | * |
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 702cc4e57f5f..f2be2a881730 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -60,7 +60,7 @@ | |||
60 | 60 | ||
61 | /* | 61 | /* |
62 | * For 16-bit addresses, we have to assume that the upper 32 bits | 62 | * For 16-bit addresses, we have to assume that the upper 32 bits |
63 | * are zero. | 63 | * (out of 64) are zero. |
64 | */ | 64 | */ |
65 | #define ACPI_LODWORD(l) ((u32)(l)) | 65 | #define ACPI_LODWORD(l) ((u32)(l)) |
66 | #define ACPI_HIDWORD(l) ((u32)(0)) | 66 | #define ACPI_HIDWORD(l) ((u32)(0)) |
@@ -104,30 +104,38 @@ | |||
104 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i) | 104 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i) |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Extract a byte of data using a pointer. Any more than a byte and we | 107 | * Extract data using a pointer. Any more than a byte and we |
108 | * get into potential aligment issues -- see the STORE macros below | 108 | * get into potential aligment issues -- see the STORE macros below. |
109 | * Use with care. | ||
109 | */ | 110 | */ |
110 | #define ACPI_GET8(addr) (*(u8*)(addr)) | 111 | #define ACPI_GET8(ptr) *ACPI_CAST_PTR (u8, ptr) |
112 | #define ACPI_GET16(ptr) *ACPI_CAST_PTR (u16, ptr) | ||
113 | #define ACPI_GET32(ptr) *ACPI_CAST_PTR (u32, ptr) | ||
114 | #define ACPI_GET64(ptr) *ACPI_CAST_PTR (u64, ptr) | ||
115 | #define ACPI_SET8(ptr) *ACPI_CAST_PTR (u8, ptr) | ||
116 | #define ACPI_SET16(ptr) *ACPI_CAST_PTR (u16, ptr) | ||
117 | #define ACPI_SET32(ptr) *ACPI_CAST_PTR (u32, ptr) | ||
118 | #define ACPI_SET64(ptr) *ACPI_CAST_PTR (u64, ptr) | ||
111 | 119 | ||
112 | /* Pointer arithmetic */ | 120 | /* |
113 | 121 | * Pointer manipulation | |
114 | #define ACPI_PTR_ADD(t,a,b) (t *) (void *)((char *)(a) + (acpi_native_uint)(b)) | 122 | */ |
115 | #define ACPI_PTR_DIFF(a,b) (acpi_native_uint) ((char *)(a) - (char *)(b)) | 123 | #define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p)) |
124 | #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p)) | ||
125 | #define ACPI_ADD_PTR(t,a,b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_native_uint)(b))) | ||
126 | #define ACPI_PTR_DIFF(a,b) (acpi_native_uint) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b))) | ||
116 | 127 | ||
117 | /* Pointer/Integer type conversions */ | 128 | /* Pointer/Integer type conversions */ |
118 | 129 | ||
119 | #define ACPI_TO_POINTER(i) ACPI_PTR_ADD (void, (void *) NULL,(acpi_native_uint)i) | 130 | #define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i) |
120 | #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) | 131 | #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) |
121 | #define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) | 132 | #define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) |
122 | #define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f) | 133 | #define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f) |
123 | 134 | ||
124 | #define ACPI_CAST_PTR(t, p) ((t *)(void *)(p)) | ||
125 | #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **)(void *)(p)) | ||
126 | |||
127 | #if ACPI_MACHINE_WIDTH == 16 | 135 | #if ACPI_MACHINE_WIDTH == 16 |
128 | #define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s) | 136 | #define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s) |
129 | #define ACPI_PHYSADDR_TO_PTR(i) (void *)(i) | 137 | #define ACPI_PHYSADDR_TO_PTR(i) (void *)(i) |
130 | #define ACPI_PTR_TO_PHYSADDR(i) (u32) (char *)(i) | 138 | #define ACPI_PTR_TO_PHYSADDR(i) (u32) ACPI_CAST_PTR (u8,(i)) |
131 | #else | 139 | #else |
132 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) | 140 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) |
133 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) | 141 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) |
@@ -202,7 +210,7 @@ | |||
202 | 210 | ||
203 | #define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) (buf_offset) | 211 | #define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) (buf_offset) |
204 | 212 | ||
205 | #ifdef ACPI_MISALIGNED_TRANSFERS | 213 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED |
206 | 214 | ||
207 | /* The hardware supports unaligned transfers, just do the little-endian move */ | 215 | /* The hardware supports unaligned transfers, just do the little-endian move */ |
208 | 216 | ||
@@ -326,11 +334,19 @@ | |||
326 | #define ACPI_MUL_16(a) _ACPI_MUL(a,4) | 334 | #define ACPI_MUL_16(a) _ACPI_MUL(a,4) |
327 | #define ACPI_MOD_16(a) _ACPI_MOD(a,16) | 335 | #define ACPI_MOD_16(a) _ACPI_MOD(a,16) |
328 | 336 | ||
337 | #define ACPI_DIV_32(a) _ACPI_DIV(a,5) | ||
338 | #define ACPI_MUL_32(a) _ACPI_MUL(a,5) | ||
339 | #define ACPI_MOD_32(a) _ACPI_MOD(a,32) | ||
340 | |||
329 | /* | 341 | /* |
330 | * Rounding macros (Power of two boundaries only) | 342 | * Rounding macros (Power of two boundaries only) |
331 | */ | 343 | */ |
332 | #define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & (~(((acpi_native_uint) boundary)-1))) | 344 | #define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ |
333 | #define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + (((acpi_native_uint) boundary)-1)) & (~(((acpi_native_uint) boundary)-1))) | 345 | (~(((acpi_native_uint) boundary)-1))) |
346 | |||
347 | #define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ | ||
348 | (((acpi_native_uint) boundary)-1)) & \ | ||
349 | (~(((acpi_native_uint) boundary)-1))) | ||
334 | 350 | ||
335 | #define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) | 351 | #define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) |
336 | #define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) | 352 | #define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) |
@@ -365,6 +381,14 @@ | |||
365 | #define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) | 381 | #define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) |
366 | #define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) | 382 | #define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) |
367 | 383 | ||
384 | /* Generate a UUID */ | ||
385 | |||
386 | #define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ | ||
387 | (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \ | ||
388 | (b) & 0xFF, ((b) >> 8) & 0xFF, \ | ||
389 | (c) & 0xFF, ((c) >> 8) & 0xFF, \ | ||
390 | (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) | ||
391 | |||
368 | /* | 392 | /* |
369 | * An struct acpi_namespace_node * can appear in some contexts, | 393 | * An struct acpi_namespace_node * can appear in some contexts, |
370 | * where a pointer to an union acpi_operand_object can also | 394 | * where a pointer to an union acpi_operand_object can also |
@@ -423,57 +447,52 @@ | |||
423 | #define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) | 447 | #define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) |
424 | #define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) | 448 | #define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) |
425 | 449 | ||
450 | #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) | ||
426 | /* | 451 | /* |
427 | * Reporting macros that are never compiled out | 452 | * Module name is include in both debug and non-debug versions primarily for |
453 | * error messages. The __FILE__ macro is not very useful for this, because it | ||
454 | * often includes the entire pathname to the module | ||
428 | */ | 455 | */ |
429 | #define ACPI_PARAM_LIST(pl) pl | 456 | #define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; |
457 | #else | ||
458 | #define ACPI_MODULE_NAME(name) | ||
459 | #endif | ||
430 | 460 | ||
431 | /* | 461 | /* |
432 | * Error reporting. These versions add callers module and line#. | 462 | * Ascii error messages can be configured out |
433 | * | ||
434 | * Since _acpi_module_name gets compiled out when ACPI_DEBUG_OUTPUT | ||
435 | * isn't defined, only use it in debug mode. | ||
436 | */ | 463 | */ |
437 | #ifdef ACPI_DEBUG_OUTPUT | 464 | #ifndef ACPI_NO_ERROR_MESSAGES |
465 | #define AE_INFO _acpi_module_name, __LINE__ | ||
438 | 466 | ||
439 | #define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_acpi_module_name,__LINE__,_COMPONENT); \ | 467 | /* |
440 | acpi_os_printf ACPI_PARAM_LIST(fp);} | 468 | * Error reporting. Callers module and line number are inserted by AE_INFO, |
441 | #define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error(_acpi_module_name,__LINE__,_COMPONENT); \ | 469 | * the plist contains a set of parens to allow variable-length lists. |
442 | acpi_os_printf ACPI_PARAM_LIST(fp);} | 470 | * These macros are used for both the debug and non-debug versions of the code. |
443 | #define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning(_acpi_module_name,__LINE__,_COMPONENT); \ | 471 | */ |
444 | acpi_os_printf ACPI_PARAM_LIST(fp);} | 472 | #define ACPI_INFO(plist) acpi_ut_info plist |
445 | #define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error(_acpi_module_name,__LINE__,_COMPONENT, s, e); | 473 | #define ACPI_WARNING(plist) acpi_ut_warning plist |
446 | 474 | #define ACPI_EXCEPTION(plist) acpi_ut_exception plist | |
447 | #define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error(_acpi_module_name,__LINE__,_COMPONENT, s, n, p, e); | 475 | #define ACPI_ERROR(plist) acpi_ut_error plist |
476 | #define ACPI_ERROR_NAMESPACE(s,e) acpi_ns_report_error (AE_INFO, s, e); | ||
477 | #define ACPI_ERROR_METHOD(s,n,p,e) acpi_ns_report_method_error (AE_INFO, s, n, p, e); | ||
448 | 478 | ||
449 | #else | 479 | #else |
450 | 480 | ||
451 | #define ACPI_REPORT_INFO(fp) {acpi_ut_report_info("ACPI",__LINE__,_COMPONENT); \ | 481 | /* No error messages */ |
452 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
453 | #define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error("ACPI",__LINE__,_COMPONENT); \ | ||
454 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
455 | #define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning("ACPI",__LINE__,_COMPONENT); \ | ||
456 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
457 | #define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error("ACPI",__LINE__,_COMPONENT, s, e); | ||
458 | 482 | ||
459 | #define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error("ACPI",__LINE__,_COMPONENT, s, n, p, e); | 483 | #define ACPI_INFO(plist) |
484 | #define ACPI_WARNING(plist) | ||
485 | #define ACPI_EXCEPTION(plist) | ||
486 | #define ACPI_ERROR(plist) | ||
487 | #define ACPI_ERROR_NAMESPACE(s,e) | ||
488 | #define ACPI_ERROR_METHOD(s,n,p,e) | ||
460 | 489 | ||
461 | #endif | 490 | #endif |
462 | 491 | ||
463 | /* Error reporting. These versions pass thru the module and line# */ | ||
464 | |||
465 | #define _ACPI_REPORT_INFO(a,b,c,fp) {acpi_ut_report_info(a,b,c); \ | ||
466 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
467 | #define _ACPI_REPORT_ERROR(a,b,c,fp) {acpi_ut_report_error(a,b,c); \ | ||
468 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
469 | #define _ACPI_REPORT_WARNING(a,b,c,fp) {acpi_ut_report_warning(a,b,c); \ | ||
470 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
471 | |||
472 | /* | 492 | /* |
473 | * Debug macros that are conditionally compiled | 493 | * Debug macros that are conditionally compiled |
474 | */ | 494 | */ |
475 | #ifdef ACPI_DEBUG_OUTPUT | 495 | #ifdef ACPI_DEBUG_OUTPUT |
476 | #define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; | ||
477 | 496 | ||
478 | /* | 497 | /* |
479 | * Common parameters used for debug output functions: | 498 | * Common parameters used for debug output functions: |
@@ -509,7 +528,7 @@ | |||
509 | #endif | 528 | #endif |
510 | 529 | ||
511 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ | 530 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ |
512 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) | 531 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) |
513 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ | 532 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ |
514 | acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) | 533 | acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) |
515 | #define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ | 534 | #define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ |
@@ -525,6 +544,9 @@ | |||
525 | * bad form, but having a separate exit macro is very ugly and difficult to maintain. | 544 | * bad form, but having a separate exit macro is very ugly and difficult to maintain. |
526 | * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros | 545 | * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros |
527 | * so that "_acpi_function_name" is defined. | 546 | * so that "_acpi_function_name" is defined. |
547 | * | ||
548 | * Note: the DO_WHILE0 macro is used to prevent some compilers from complaining | ||
549 | * about these constructs. | ||
528 | */ | 550 | */ |
529 | #ifdef ACPI_USE_DO_WHILE_0 | 551 | #ifdef ACPI_USE_DO_WHILE_0 |
530 | #define ACPI_DO_WHILE0(a) do a while(0) | 552 | #define ACPI_DO_WHILE0(a) do a while(0) |
@@ -532,10 +554,55 @@ | |||
532 | #define ACPI_DO_WHILE0(a) a | 554 | #define ACPI_DO_WHILE0(a) a |
533 | #endif | 555 | #endif |
534 | 556 | ||
535 | #define return_VOID ACPI_DO_WHILE0 ({acpi_ut_exit(ACPI_DEBUG_PARAMETERS);return;}) | 557 | #define return_VOID ACPI_DO_WHILE0 ({ \ |
536 | #define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({acpi_ut_status_exit(ACPI_DEBUG_PARAMETERS,(s));return((s));}) | 558 | acpi_ut_exit (ACPI_DEBUG_PARAMETERS); \ |
537 | #define return_VALUE(s) ACPI_DO_WHILE0 ({acpi_ut_value_exit(ACPI_DEBUG_PARAMETERS,(acpi_integer)(s));return((s));}) | 559 | return;}) |
538 | #define return_PTR(s) ACPI_DO_WHILE0 ({acpi_ut_ptr_exit(ACPI_DEBUG_PARAMETERS,(u8 *)(s));return((s));}) | 560 | /* |
561 | * There are two versions of most of the return macros. The default version is | ||
562 | * safer, since it avoids side-effects by guaranteeing that the argument will | ||
563 | * not be evaluated twice. | ||
564 | * | ||
565 | * A less-safe version of the macros is provided for optional use if the | ||
566 | * compiler uses excessive CPU stack (for example, this may happen in the | ||
567 | * debug case if code optimzation is disabled.) | ||
568 | */ | ||
569 | #ifndef ACPI_SIMPLE_RETURN_MACROS | ||
570 | |||
571 | #define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({ \ | ||
572 | register acpi_status _s = (s); \ | ||
573 | acpi_ut_status_exit (ACPI_DEBUG_PARAMETERS, _s); \ | ||
574 | return (_s); }) | ||
575 | #define return_PTR(s) ACPI_DO_WHILE0 ({ \ | ||
576 | register void *_s = (void *) (s); \ | ||
577 | acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) _s); \ | ||
578 | return (_s); }) | ||
579 | #define return_VALUE(s) ACPI_DO_WHILE0 ({ \ | ||
580 | register acpi_integer _s = (s); \ | ||
581 | acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, _s); \ | ||
582 | return (_s); }) | ||
583 | #define return_UINT8(s) ACPI_DO_WHILE0 ({ \ | ||
584 | register u8 _s = (u8) (s); \ | ||
585 | acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \ | ||
586 | return (_s); }) | ||
587 | #define return_UINT32(s) ACPI_DO_WHILE0 ({ \ | ||
588 | register u32 _s = (u32) (s); \ | ||
589 | acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \ | ||
590 | return (_s); }) | ||
591 | #else /* Use original less-safe macros */ | ||
592 | |||
593 | #define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({ \ | ||
594 | acpi_ut_status_exit (ACPI_DEBUG_PARAMETERS, (s)); \ | ||
595 | return((s)); }) | ||
596 | #define return_PTR(s) ACPI_DO_WHILE0 ({ \ | ||
597 | acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) (s)); \ | ||
598 | return((s)); }) | ||
599 | #define return_VALUE(s) ACPI_DO_WHILE0 ({ \ | ||
600 | acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) (s)); \ | ||
601 | return((s)); }) | ||
602 | #define return_UINT8(s) return_VALUE(s) | ||
603 | #define return_UINT32(s) return_VALUE(s) | ||
604 | |||
605 | #endif /* ACPI_SIMPLE_RETURN_MACROS */ | ||
539 | 606 | ||
540 | /* Conditional execution */ | 607 | /* Conditional execution */ |
541 | 608 | ||
@@ -555,18 +622,6 @@ | |||
555 | #define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) | 622 | #define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) |
556 | #define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) | 623 | #define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) |
557 | #define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) | 624 | #define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) |
558 | #define ACPI_BREAK_MSG(a) acpi_os_signal (ACPI_SIGNAL_BREAKPOINT,(a)) | ||
559 | |||
560 | /* | ||
561 | * Generate INT3 on ACPI_ERROR (Debug only!) | ||
562 | */ | ||
563 | #define ACPI_ERROR_BREAK | ||
564 | #ifdef ACPI_ERROR_BREAK | ||
565 | #define ACPI_BREAK_ON_ERROR(lvl) if ((lvl)&ACPI_ERROR) \ | ||
566 | acpi_os_signal(ACPI_SIGNAL_BREAKPOINT,"Fatal error encountered\n") | ||
567 | #else | ||
568 | #define ACPI_BREAK_ON_ERROR(lvl) | ||
569 | #endif | ||
570 | 625 | ||
571 | /* | 626 | /* |
572 | * Master debug print macros | 627 | * Master debug print macros |
@@ -574,17 +629,14 @@ | |||
574 | * 1) Debug print for the current component is enabled | 629 | * 1) Debug print for the current component is enabled |
575 | * 2) Debug error level or trace level for the print statement is enabled | 630 | * 2) Debug error level or trace level for the print statement is enabled |
576 | */ | 631 | */ |
577 | #define ACPI_DEBUG_PRINT(pl) acpi_ut_debug_print ACPI_PARAM_LIST(pl) | 632 | #define ACPI_DEBUG_PRINT(plist) acpi_ut_debug_print plist |
578 | #define ACPI_DEBUG_PRINT_RAW(pl) acpi_ut_debug_print_raw ACPI_PARAM_LIST(pl) | 633 | #define ACPI_DEBUG_PRINT_RAW(plist) acpi_ut_debug_print_raw plist |
579 | 634 | ||
580 | #else | 635 | #else |
581 | /* | 636 | /* |
582 | * This is the non-debug case -- make everything go away, | 637 | * This is the non-debug case -- make everything go away, |
583 | * leaving no executable debug code! | 638 | * leaving no executable debug code! |
584 | */ | 639 | */ |
585 | #define ACPI_MODULE_NAME(name) | ||
586 | #define _acpi_module_name "" | ||
587 | |||
588 | #define ACPI_DEBUG_EXEC(a) | 640 | #define ACPI_DEBUG_EXEC(a) |
589 | #define ACPI_NORMAL_EXEC(a) a; | 641 | #define ACPI_NORMAL_EXEC(a) a; |
590 | 642 | ||
@@ -607,11 +659,12 @@ | |||
607 | #define ACPI_DUMP_BUFFER(a,b) | 659 | #define ACPI_DUMP_BUFFER(a,b) |
608 | #define ACPI_DEBUG_PRINT(pl) | 660 | #define ACPI_DEBUG_PRINT(pl) |
609 | #define ACPI_DEBUG_PRINT_RAW(pl) | 661 | #define ACPI_DEBUG_PRINT_RAW(pl) |
610 | #define ACPI_BREAK_MSG(a) | ||
611 | 662 | ||
612 | #define return_VOID return | 663 | #define return_VOID return |
613 | #define return_ACPI_STATUS(s) return(s) | 664 | #define return_ACPI_STATUS(s) return(s) |
614 | #define return_VALUE(s) return(s) | 665 | #define return_VALUE(s) return(s) |
666 | #define return_UINT8(s) return(s) | ||
667 | #define return_UINT32(s) return(s) | ||
615 | #define return_PTR(s) return(s) | 668 | #define return_PTR(s) return(s) |
616 | 669 | ||
617 | #endif | 670 | #endif |
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 4f9063f3e951..b67da3636899 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h index dd3501f7e5d6..b667a804fc8a 100644 --- a/include/acpi/acnamesp.h +++ b/include/acpi/acnamesp.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -263,13 +263,11 @@ u32 acpi_ns_local(acpi_object_type type); | |||
263 | void | 263 | void |
264 | acpi_ns_report_error(char *module_name, | 264 | acpi_ns_report_error(char *module_name, |
265 | u32 line_number, | 265 | u32 line_number, |
266 | u32 component_id, | ||
267 | char *internal_name, acpi_status lookup_status); | 266 | char *internal_name, acpi_status lookup_status); |
268 | 267 | ||
269 | void | 268 | void |
270 | acpi_ns_report_method_error(char *module_name, | 269 | acpi_ns_report_method_error(char *module_name, |
271 | u32 line_number, | 270 | u32 line_number, |
272 | u32 component_id, | ||
273 | char *message, | 271 | char *message, |
274 | struct acpi_namespace_node *node, | 272 | struct acpi_namespace_node *node, |
275 | char *path, acpi_status lookup_status); | 273 | char *path, acpi_status lookup_status); |
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 4a326ba6d482..d130cfed8d55 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -69,7 +69,7 @@ | |||
69 | u8 type; /* acpi_object_type */\ | 69 | u8 type; /* acpi_object_type */\ |
70 | u16 reference_count; /* For object deletion management */\ | 70 | u16 reference_count; /* For object deletion management */\ |
71 | union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ | 71 | union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ |
72 | u8 flags; \ | 72 | u8 flags; |
73 | 73 | ||
74 | /* Values for flag byte above */ | 74 | /* Values for flag byte above */ |
75 | 75 | ||
diff --git a/include/acpi/acopcode.h b/include/acpi/acopcode.h index 64da42992199..e6d78bd9e90a 100644 --- a/include/acpi/acopcode.h +++ b/include/acpi/acopcode.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 68d7edf0f697..7785d481dc3e 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -137,13 +137,19 @@ | |||
137 | 137 | ||
138 | /* Exception level -- used in the global "debug_level" */ | 138 | /* Exception level -- used in the global "debug_level" */ |
139 | 139 | ||
140 | #define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR) | ||
141 | #define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN) | ||
142 | #define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) | 140 | #define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) |
143 | #define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) | 141 | #define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) |
144 | #define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO) | 142 | #define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO) |
145 | #define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS) | 143 | #define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS) |
146 | 144 | ||
145 | /* | ||
146 | * These two levels are essentially obsolete, all instances in the | ||
147 | * ACPICA core code have been replaced by REPORT_ERROR and REPORT_WARNING | ||
148 | * (Kept here because some drivers may still use them) | ||
149 | */ | ||
150 | #define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR) | ||
151 | #define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN) | ||
152 | |||
147 | /* Trace level -- also used in the global "debug_level" */ | 153 | /* Trace level -- also used in the global "debug_level" */ |
148 | 154 | ||
149 | #define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES) | 155 | #define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES) |
diff --git a/include/acpi/acparser.h b/include/acpi/acparser.h index d352d40de1f3..5a1ff484af33 100644 --- a/include/acpi/acparser.h +++ b/include/acpi/acparser.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h index ccf34f9dac64..b9a39d1009bd 100644 --- a/include/acpi/acpi.h +++ b/include/acpi/acpi.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index c1b4e1f882e4..b425f9bb6d43 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -52,8 +52,8 @@ | |||
52 | /* ACPI PCI Interrupt Link (pci_link.c) */ | 52 | /* ACPI PCI Interrupt Link (pci_link.c) */ |
53 | 53 | ||
54 | int acpi_irq_penalty_init(void); | 54 | int acpi_irq_penalty_init(void); |
55 | int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *edge_level, | 55 | int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, |
56 | int *active_high_low, char **name); | 56 | int *polarity, char **name); |
57 | int acpi_pci_link_free_irq(acpi_handle handle); | 57 | int acpi_pci_link_free_irq(acpi_handle handle); |
58 | 58 | ||
59 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ | 59 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 98e0b8cd14ed..970e9a6372c3 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -8,7 +8,7 @@ | |||
8 | *****************************************************************************/ | 8 | *****************************************************************************/ |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Copyright (C) 2000 - 2005, R. Byron Moore | 11 | * Copyright (C) 2000 - 2006, R. Byron Moore |
12 | * All rights reserved. | 12 | * All rights reserved. |
13 | * | 13 | * |
14 | * Redistribution and use in source and binary forms, with or without | 14 | * Redistribution and use in source and binary forms, with or without |
@@ -108,9 +108,9 @@ acpi_status acpi_os_create_lock(acpi_handle * out_handle); | |||
108 | 108 | ||
109 | void acpi_os_delete_lock(acpi_handle handle); | 109 | void acpi_os_delete_lock(acpi_handle handle); |
110 | 110 | ||
111 | unsigned long acpi_os_acquire_lock(acpi_handle handle); | 111 | acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle); |
112 | 112 | ||
113 | void acpi_os_release_lock(acpi_handle handle, unsigned long flags); | 113 | void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags); |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Memory allocation and mapping | 116 | * Memory allocation and mapping |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 2a9dbc13b0f2..66cf2ecef57a 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -149,6 +149,9 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler); | |||
149 | acpi_status | 149 | acpi_status |
150 | acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data); | 150 | acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data); |
151 | 151 | ||
152 | acpi_status | ||
153 | acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags); | ||
154 | |||
152 | /* | 155 | /* |
153 | * Object manipulation and enumeration | 156 | * Object manipulation and enumeration |
154 | */ | 157 | */ |
@@ -269,6 +272,12 @@ acpi_status(*ACPI_WALK_RESOURCE_CALLBACK) (struct acpi_resource * resource, | |||
269 | void *context); | 272 | void *context); |
270 | 273 | ||
271 | acpi_status | 274 | acpi_status |
275 | acpi_get_vendor_resource(acpi_handle device_handle, | ||
276 | char *name, | ||
277 | struct acpi_vendor_uuid *uuid, | ||
278 | struct acpi_buffer *ret_buffer); | ||
279 | |||
280 | acpi_status | ||
272 | acpi_get_current_resources(acpi_handle device_handle, | 281 | acpi_get_current_resources(acpi_handle device_handle, |
273 | struct acpi_buffer *ret_buffer); | 282 | struct acpi_buffer *ret_buffer); |
274 | 283 | ||
@@ -280,7 +289,7 @@ acpi_get_possible_resources(acpi_handle device_handle, | |||
280 | 289 | ||
281 | acpi_status | 290 | acpi_status |
282 | acpi_walk_resources(acpi_handle device_handle, | 291 | acpi_walk_resources(acpi_handle device_handle, |
283 | char *path, | 292 | char *name, |
284 | ACPI_WALK_RESOURCE_CALLBACK user_function, void *context); | 293 | ACPI_WALK_RESOURCE_CALLBACK user_function, void *context); |
285 | 294 | ||
286 | acpi_status | 295 | acpi_status |
diff --git a/include/acpi/acresrc.h b/include/acpi/acresrc.h index 38e798b05d08..fa02e8083381 100644 --- a/include/acpi/acresrc.h +++ b/include/acpi/acresrc.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -44,216 +44,284 @@ | |||
44 | #ifndef __ACRESRC_H__ | 44 | #ifndef __ACRESRC_H__ |
45 | #define __ACRESRC_H__ | 45 | #define __ACRESRC_H__ |
46 | 46 | ||
47 | /* | 47 | /* Need the AML resource descriptor structs */ |
48 | * Function prototypes called from Acpi* APIs | ||
49 | */ | ||
50 | acpi_status | ||
51 | acpi_rs_get_prt_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); | ||
52 | 48 | ||
53 | acpi_status | 49 | #include "amlresrc.h" |
54 | acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); | ||
55 | 50 | ||
56 | #ifdef ACPI_FUTURE_USAGE | 51 | /* |
57 | acpi_status | 52 | * If possible, pack the following structures to byte alignment, since we |
58 | acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); | 53 | * don't care about performance for debug output |
59 | #endif /* ACPI_FUTURE_USAGE */ | 54 | */ |
60 | 55 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | |
61 | acpi_status | 56 | #pragma pack(1) |
62 | acpi_rs_get_method_data(acpi_handle handle, | 57 | #endif |
63 | char *path, struct acpi_buffer *ret_buffer); | ||
64 | 58 | ||
65 | acpi_status | 59 | /* |
66 | acpi_rs_set_srs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); | 60 | * Individual entry for the resource conversion tables |
61 | */ | ||
62 | typedef const struct acpi_rsconvert_info { | ||
63 | u8 opcode; | ||
64 | u8 resource_offset; | ||
65 | u8 aml_offset; | ||
66 | u8 value; | ||
67 | |||
68 | } acpi_rsconvert_info; | ||
69 | |||
70 | /* Resource conversion opcodes */ | ||
71 | |||
72 | #define ACPI_RSC_INITGET 0 | ||
73 | #define ACPI_RSC_INITSET 1 | ||
74 | #define ACPI_RSC_FLAGINIT 2 | ||
75 | #define ACPI_RSC_1BITFLAG 3 | ||
76 | #define ACPI_RSC_2BITFLAG 4 | ||
77 | #define ACPI_RSC_COUNT 5 | ||
78 | #define ACPI_RSC_COUNT16 6 | ||
79 | #define ACPI_RSC_LENGTH 7 | ||
80 | #define ACPI_RSC_MOVE8 8 | ||
81 | #define ACPI_RSC_MOVE16 9 | ||
82 | #define ACPI_RSC_MOVE32 10 | ||
83 | #define ACPI_RSC_MOVE64 11 | ||
84 | #define ACPI_RSC_SET8 12 | ||
85 | #define ACPI_RSC_DATA8 13 | ||
86 | #define ACPI_RSC_ADDRESS 14 | ||
87 | #define ACPI_RSC_SOURCE 15 | ||
88 | #define ACPI_RSC_SOURCEX 16 | ||
89 | #define ACPI_RSC_BITMASK 17 | ||
90 | #define ACPI_RSC_BITMASK16 18 | ||
91 | #define ACPI_RSC_EXIT_NE 19 | ||
92 | #define ACPI_RSC_EXIT_LE 20 | ||
93 | |||
94 | /* Resource Conversion sub-opcodes */ | ||
95 | |||
96 | #define ACPI_RSC_COMPARE_AML_LENGTH 0 | ||
97 | #define ACPI_RSC_COMPARE_VALUE 1 | ||
98 | |||
99 | #define ACPI_RSC_TABLE_SIZE(d) (sizeof (d) / sizeof (struct acpi_rsconvert_info)) | ||
100 | |||
101 | #define ACPI_RS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_resource,f) | ||
102 | #define AML_OFFSET(f) (u8) ACPI_OFFSET (union aml_resource,f) | ||
103 | |||
104 | typedef const struct acpi_rsdump_info { | ||
105 | u8 opcode; | ||
106 | u8 offset; | ||
107 | char *name; | ||
108 | const char **pointer; | ||
109 | |||
110 | } acpi_rsdump_info; | ||
111 | |||
112 | /* Values for the Opcode field above */ | ||
113 | |||
114 | #define ACPI_RSD_TITLE 0 | ||
115 | #define ACPI_RSD_LITERAL 1 | ||
116 | #define ACPI_RSD_STRING 2 | ||
117 | #define ACPI_RSD_UINT8 3 | ||
118 | #define ACPI_RSD_UINT16 4 | ||
119 | #define ACPI_RSD_UINT32 5 | ||
120 | #define ACPI_RSD_UINT64 6 | ||
121 | #define ACPI_RSD_1BITFLAG 7 | ||
122 | #define ACPI_RSD_2BITFLAG 8 | ||
123 | #define ACPI_RSD_SHORTLIST 9 | ||
124 | #define ACPI_RSD_LONGLIST 10 | ||
125 | #define ACPI_RSD_DWORDLIST 11 | ||
126 | #define ACPI_RSD_ADDRESS 12 | ||
127 | #define ACPI_RSD_SOURCE 13 | ||
128 | |||
129 | /* restore default alignment */ | ||
130 | |||
131 | #pragma pack() | ||
132 | |||
133 | /* Resource tables indexed by internal resource type */ | ||
134 | |||
135 | extern const u8 acpi_gbl_aml_resource_sizes[]; | ||
136 | extern struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[]; | ||
137 | |||
138 | /* Resource tables indexed by raw AML resource descriptor type */ | ||
139 | |||
140 | extern const u8 acpi_gbl_resource_struct_sizes[]; | ||
141 | extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[]; | ||
142 | |||
143 | struct acpi_vendor_walk_info { | ||
144 | struct acpi_vendor_uuid *uuid; | ||
145 | struct acpi_buffer *buffer; | ||
146 | acpi_status status; | ||
147 | }; | ||
67 | 148 | ||
149 | /* | ||
150 | * rscreate | ||
151 | */ | ||
68 | acpi_status | 152 | acpi_status |
69 | acpi_rs_create_resource_list(union acpi_operand_object *byte_stream_buffer, | 153 | acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer, |
70 | struct acpi_buffer *output_buffer); | 154 | struct acpi_buffer *output_buffer); |
71 | 155 | ||
72 | acpi_status | 156 | acpi_status |
73 | acpi_rs_create_byte_stream(struct acpi_resource *linked_list_buffer, | 157 | acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer, |
74 | struct acpi_buffer *output_buffer); | 158 | struct acpi_buffer *output_buffer); |
75 | 159 | ||
76 | acpi_status | 160 | acpi_status |
77 | acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | 161 | acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, |
78 | struct acpi_buffer *output_buffer); | 162 | struct acpi_buffer *output_buffer); |
79 | 163 | ||
80 | /* | 164 | /* |
81 | * rsdump | 165 | * rsutils |
82 | */ | 166 | */ |
83 | #ifdef ACPI_FUTURE_USAGE | ||
84 | void acpi_rs_dump_resource_list(struct acpi_resource *resource); | ||
85 | |||
86 | void acpi_rs_dump_irq_list(u8 * route_table); | ||
87 | #endif /* ACPI_FUTURE_USAGE */ | ||
88 | |||
89 | /* | ||
90 | * rscalc | ||
91 | */ | ||
92 | acpi_status | ||
93 | acpi_rs_get_byte_stream_start(u8 * byte_stream_buffer, | ||
94 | u8 ** byte_stream_start, u32 * size); | ||
95 | |||
96 | acpi_status | ||
97 | acpi_rs_get_list_length(u8 * byte_stream_buffer, | ||
98 | u32 byte_stream_buffer_length, acpi_size * size_needed); | ||
99 | |||
100 | acpi_status | ||
101 | acpi_rs_get_byte_stream_length(struct acpi_resource *linked_list_buffer, | ||
102 | acpi_size * size_needed); | ||
103 | |||
104 | acpi_status | ||
105 | acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, | ||
106 | acpi_size * buffer_size_needed); | ||
107 | |||
108 | acpi_status | ||
109 | acpi_rs_byte_stream_to_list(u8 * byte_stream_buffer, | ||
110 | u32 byte_stream_buffer_length, u8 * output_buffer); | ||
111 | |||
112 | acpi_status | ||
113 | acpi_rs_list_to_byte_stream(struct acpi_resource *linked_list, | ||
114 | acpi_size byte_stream_size_needed, | ||
115 | u8 * output_buffer); | ||
116 | |||
117 | acpi_status | ||
118 | acpi_rs_io_resource(u8 * byte_stream_buffer, | ||
119 | acpi_size * bytes_consumed, | ||
120 | u8 ** output_buffer, acpi_size * structure_size); | ||
121 | |||
122 | acpi_status | ||
123 | acpi_rs_fixed_io_resource(u8 * byte_stream_buffer, | ||
124 | acpi_size * bytes_consumed, | ||
125 | u8 ** output_buffer, acpi_size * structure_size); | ||
126 | |||
127 | acpi_status | 167 | acpi_status |
128 | acpi_rs_io_stream(struct acpi_resource *linked_list, | 168 | acpi_rs_get_prt_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
129 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
130 | |||
131 | acpi_status | ||
132 | acpi_rs_fixed_io_stream(struct acpi_resource *linked_list, | ||
133 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
134 | |||
135 | acpi_status | ||
136 | acpi_rs_irq_resource(u8 * byte_stream_buffer, | ||
137 | acpi_size * bytes_consumed, | ||
138 | u8 ** output_buffer, acpi_size * structure_size); | ||
139 | |||
140 | acpi_status | ||
141 | acpi_rs_irq_stream(struct acpi_resource *linked_list, | ||
142 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
143 | |||
144 | acpi_status | ||
145 | acpi_rs_dma_resource(u8 * byte_stream_buffer, | ||
146 | acpi_size * bytes_consumed, | ||
147 | u8 ** output_buffer, acpi_size * structure_size); | ||
148 | 169 | ||
149 | acpi_status | 170 | acpi_status |
150 | acpi_rs_dma_stream(struct acpi_resource *linked_list, | 171 | acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
151 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
152 | 172 | ||
173 | #ifdef ACPI_FUTURE_USAGE | ||
153 | acpi_status | 174 | acpi_status |
154 | acpi_rs_address16_resource(u8 * byte_stream_buffer, | 175 | acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
155 | acpi_size * bytes_consumed, | 176 | #endif /* ACPI_FUTURE_USAGE */ |
156 | u8 ** output_buffer, acpi_size * structure_size); | ||
157 | 177 | ||
158 | acpi_status | 178 | acpi_status |
159 | acpi_rs_address16_stream(struct acpi_resource *linked_list, | 179 | acpi_rs_get_method_data(acpi_handle handle, |
160 | u8 ** output_buffer, acpi_size * bytes_consumed); | 180 | char *path, struct acpi_buffer *ret_buffer); |
161 | 181 | ||
162 | acpi_status | 182 | acpi_status |
163 | acpi_rs_address32_resource(u8 * byte_stream_buffer, | 183 | acpi_rs_set_srs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
164 | acpi_size * bytes_consumed, | ||
165 | u8 ** output_buffer, acpi_size * structure_size); | ||
166 | 184 | ||
185 | /* | ||
186 | * rscalc | ||
187 | */ | ||
167 | acpi_status | 188 | acpi_status |
168 | acpi_rs_address32_stream(struct acpi_resource *linked_list, | 189 | acpi_rs_get_list_length(u8 * aml_buffer, |
169 | u8 ** output_buffer, acpi_size * bytes_consumed); | 190 | u32 aml_buffer_length, acpi_size * size_needed); |
170 | 191 | ||
171 | acpi_status | 192 | acpi_status |
172 | acpi_rs_address64_resource(u8 * byte_stream_buffer, | 193 | acpi_rs_get_aml_length(struct acpi_resource *linked_list_buffer, |
173 | acpi_size * bytes_consumed, | 194 | acpi_size * size_needed); |
174 | u8 ** output_buffer, acpi_size * structure_size); | ||
175 | 195 | ||
176 | acpi_status | 196 | acpi_status |
177 | acpi_rs_address64_stream(struct acpi_resource *linked_list, | 197 | acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, |
178 | u8 ** output_buffer, acpi_size * bytes_consumed); | 198 | acpi_size * buffer_size_needed); |
179 | 199 | ||
180 | acpi_status | 200 | acpi_status |
181 | acpi_rs_start_depend_fns_resource(u8 * byte_stream_buffer, | 201 | acpi_rs_convert_aml_to_resources(u8 * aml_buffer, |
182 | acpi_size * bytes_consumed, | 202 | u32 aml_buffer_length, u8 * output_buffer); |
183 | u8 ** output_buffer, | ||
184 | acpi_size * structure_size); | ||
185 | 203 | ||
186 | acpi_status | 204 | acpi_status |
187 | acpi_rs_end_depend_fns_resource(u8 * byte_stream_buffer, | 205 | acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, |
188 | acpi_size * bytes_consumed, | 206 | acpi_size aml_size_needed, u8 * output_buffer); |
189 | u8 ** output_buffer, | ||
190 | acpi_size * structure_size); | ||
191 | 207 | ||
192 | acpi_status | 208 | /* |
193 | acpi_rs_start_depend_fns_stream(struct acpi_resource *linked_list, | 209 | * rsaddr |
194 | u8 ** output_buffer, | 210 | */ |
195 | acpi_size * bytes_consumed); | 211 | void |
212 | acpi_rs_set_address_common(union aml_resource *aml, | ||
213 | struct acpi_resource *resource); | ||
196 | 214 | ||
197 | acpi_status | 215 | u8 |
198 | acpi_rs_end_depend_fns_stream(struct acpi_resource *linked_list, | 216 | acpi_rs_get_address_common(struct acpi_resource *resource, |
199 | u8 ** output_buffer, acpi_size * bytes_consumed); | 217 | union aml_resource *aml); |
200 | 218 | ||
219 | /* | ||
220 | * rsmisc | ||
221 | */ | ||
201 | acpi_status | 222 | acpi_status |
202 | acpi_rs_memory24_resource(u8 * byte_stream_buffer, | 223 | acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, |
203 | acpi_size * bytes_consumed, | 224 | union aml_resource *aml, |
204 | u8 ** output_buffer, acpi_size * structure_size); | 225 | struct acpi_rsconvert_info *info); |
205 | 226 | ||
206 | acpi_status | 227 | acpi_status |
207 | acpi_rs_memory24_stream(struct acpi_resource *linked_list, | 228 | acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, |
208 | u8 ** output_buffer, acpi_size * bytes_consumed); | 229 | union aml_resource *aml, |
230 | struct acpi_rsconvert_info *info); | ||
209 | 231 | ||
210 | acpi_status | 232 | /* |
211 | acpi_rs_memory32_range_resource(u8 * byte_stream_buffer, | 233 | * rsutils |
212 | acpi_size * bytes_consumed, | 234 | */ |
213 | u8 ** output_buffer, | 235 | void |
214 | acpi_size * structure_size); | 236 | acpi_rs_move_data(void *destination, |
237 | void *source, u16 item_count, u8 move_type); | ||
215 | 238 | ||
216 | acpi_status | 239 | u8 acpi_rs_decode_bitmask(u16 mask, u8 * list); |
217 | acpi_rs_fixed_memory32_resource(u8 * byte_stream_buffer, | ||
218 | acpi_size * bytes_consumed, | ||
219 | u8 ** output_buffer, | ||
220 | acpi_size * structure_size); | ||
221 | 240 | ||
222 | acpi_status | 241 | u16 acpi_rs_encode_bitmask(u8 * list, u8 count); |
223 | acpi_rs_memory32_range_stream(struct acpi_resource *linked_list, | ||
224 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
225 | 242 | ||
226 | acpi_status | 243 | acpi_rs_length |
227 | acpi_rs_fixed_memory32_stream(struct acpi_resource *linked_list, | 244 | acpi_rs_get_resource_source(acpi_rs_length resource_length, |
228 | u8 ** output_buffer, acpi_size * bytes_consumed); | 245 | acpi_rs_length minimum_length, |
246 | struct acpi_resource_source *resource_source, | ||
247 | union aml_resource *aml, char *string_ptr); | ||
229 | 248 | ||
230 | acpi_status | 249 | acpi_rsdesc_size |
231 | acpi_rs_extended_irq_resource(u8 * byte_stream_buffer, | 250 | acpi_rs_set_resource_source(union aml_resource *aml, |
232 | acpi_size * bytes_consumed, | 251 | acpi_rs_length minimum_length, |
233 | u8 ** output_buffer, acpi_size * structure_size); | 252 | struct acpi_resource_source *resource_source); |
234 | 253 | ||
235 | acpi_status | 254 | void |
236 | acpi_rs_extended_irq_stream(struct acpi_resource *linked_list, | 255 | acpi_rs_set_resource_header(u8 descriptor_type, |
237 | u8 ** output_buffer, acpi_size * bytes_consumed); | 256 | acpi_rsdesc_size total_length, |
257 | union aml_resource *aml); | ||
238 | 258 | ||
239 | acpi_status | 259 | void |
240 | acpi_rs_end_tag_resource(u8 * byte_stream_buffer, | 260 | acpi_rs_set_resource_length(acpi_rsdesc_size total_length, |
241 | acpi_size * bytes_consumed, | 261 | union aml_resource *aml); |
242 | u8 ** output_buffer, acpi_size * structure_size); | ||
243 | 262 | ||
244 | acpi_status | 263 | /* |
245 | acpi_rs_end_tag_stream(struct acpi_resource *linked_list, | 264 | * rsdump |
246 | u8 ** output_buffer, acpi_size * bytes_consumed); | 265 | */ |
266 | void acpi_rs_dump_resource_list(struct acpi_resource *resource); | ||
247 | 267 | ||
248 | acpi_status | 268 | void acpi_rs_dump_irq_list(u8 * route_table); |
249 | acpi_rs_vendor_resource(u8 * byte_stream_buffer, | ||
250 | acpi_size * bytes_consumed, | ||
251 | u8 ** output_buffer, acpi_size * structure_size); | ||
252 | 269 | ||
253 | acpi_status | 270 | /* |
254 | acpi_rs_vendor_stream(struct acpi_resource *linked_list, | 271 | * Resource conversion tables |
255 | u8 ** output_buffer, acpi_size * bytes_consumed); | 272 | */ |
273 | extern struct acpi_rsconvert_info acpi_rs_convert_dma[]; | ||
274 | extern struct acpi_rsconvert_info acpi_rs_convert_end_dpf[]; | ||
275 | extern struct acpi_rsconvert_info acpi_rs_convert_io[]; | ||
276 | extern struct acpi_rsconvert_info acpi_rs_convert_fixed_io[]; | ||
277 | extern struct acpi_rsconvert_info acpi_rs_convert_end_tag[]; | ||
278 | extern struct acpi_rsconvert_info acpi_rs_convert_memory24[]; | ||
279 | extern struct acpi_rsconvert_info acpi_rs_convert_generic_reg[]; | ||
280 | extern struct acpi_rsconvert_info acpi_rs_convert_memory32[]; | ||
281 | extern struct acpi_rsconvert_info acpi_rs_convert_fixed_memory32[]; | ||
282 | extern struct acpi_rsconvert_info acpi_rs_convert_address32[]; | ||
283 | extern struct acpi_rsconvert_info acpi_rs_convert_address16[]; | ||
284 | extern struct acpi_rsconvert_info acpi_rs_convert_ext_irq[]; | ||
285 | extern struct acpi_rsconvert_info acpi_rs_convert_address64[]; | ||
286 | extern struct acpi_rsconvert_info acpi_rs_convert_ext_address64[]; | ||
287 | |||
288 | /* These resources require separate get/set tables */ | ||
289 | |||
290 | extern struct acpi_rsconvert_info acpi_rs_get_irq[]; | ||
291 | extern struct acpi_rsconvert_info acpi_rs_get_start_dpf[]; | ||
292 | extern struct acpi_rsconvert_info acpi_rs_get_vendor_small[]; | ||
293 | extern struct acpi_rsconvert_info acpi_rs_get_vendor_large[]; | ||
294 | |||
295 | extern struct acpi_rsconvert_info acpi_rs_set_irq[]; | ||
296 | extern struct acpi_rsconvert_info acpi_rs_set_start_dpf[]; | ||
297 | extern struct acpi_rsconvert_info acpi_rs_set_vendor[]; | ||
298 | |||
299 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | ||
300 | /* | ||
301 | * rsinfo | ||
302 | */ | ||
303 | extern struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[]; | ||
256 | 304 | ||
257 | u8 acpi_rs_get_resource_type(u8 resource_start_byte); | 305 | /* |
306 | * rsdump | ||
307 | */ | ||
308 | extern struct acpi_rsdump_info acpi_rs_dump_irq[]; | ||
309 | extern struct acpi_rsdump_info acpi_rs_dump_dma[]; | ||
310 | extern struct acpi_rsdump_info acpi_rs_dump_start_dpf[]; | ||
311 | extern struct acpi_rsdump_info acpi_rs_dump_end_dpf[]; | ||
312 | extern struct acpi_rsdump_info acpi_rs_dump_io[]; | ||
313 | extern struct acpi_rsdump_info acpi_rs_dump_fixed_io[]; | ||
314 | extern struct acpi_rsdump_info acpi_rs_dump_vendor[]; | ||
315 | extern struct acpi_rsdump_info acpi_rs_dump_end_tag[]; | ||
316 | extern struct acpi_rsdump_info acpi_rs_dump_memory24[]; | ||
317 | extern struct acpi_rsdump_info acpi_rs_dump_memory32[]; | ||
318 | extern struct acpi_rsdump_info acpi_rs_dump_fixed_memory32[]; | ||
319 | extern struct acpi_rsdump_info acpi_rs_dump_address16[]; | ||
320 | extern struct acpi_rsdump_info acpi_rs_dump_address32[]; | ||
321 | extern struct acpi_rsdump_info acpi_rs_dump_address64[]; | ||
322 | extern struct acpi_rsdump_info acpi_rs_dump_ext_address64[]; | ||
323 | extern struct acpi_rsdump_info acpi_rs_dump_ext_irq[]; | ||
324 | extern struct acpi_rsdump_info acpi_rs_dump_generic_reg[]; | ||
325 | #endif | ||
258 | 326 | ||
259 | #endif /* __ACRESRC_H__ */ | 327 | #endif /* __ACRESRC_H__ */ |
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h index 99d235339801..d8c1c2cdac0c 100644 --- a/include/acpi/acstruct.h +++ b/include/acpi/acstruct.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actables.h b/include/acpi/actables.h index f92c1858b808..30a47542e1c8 100644 --- a/include/acpi/actables.h +++ b/include/acpi/actables.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index a46f406e1c94..ed53f842dad4 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -45,6 +45,12 @@ | |||
45 | #define __ACTBL_H__ | 45 | #define __ACTBL_H__ |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. | ||
49 | * This is the only type that is even remotely portable. Anything else is not | ||
50 | * portable, so do not use any other bitfield types. | ||
51 | */ | ||
52 | |||
53 | /* | ||
48 | * Values for description table header signatures | 54 | * Values for description table header signatures |
49 | */ | 55 | */ |
50 | #define RSDP_NAME "RSDP" | 56 | #define RSDP_NAME "RSDP" |
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 67312c3a915a..cd428d57add0 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 50305ce2681a..dfc7ac1094bb 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 6213b27516e8..7ca89cde706e 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -44,7 +44,15 @@ | |||
44 | #ifndef __ACTYPES_H__ | 44 | #ifndef __ACTYPES_H__ |
45 | #define __ACTYPES_H__ | 45 | #define __ACTYPES_H__ |
46 | 46 | ||
47 | /*! [Begin] no source code translation (keep the typedefs) */ | 47 | /* |
48 | * ACPI_MACHINE_WIDTH must be specified in an OS- or compiler-dependent header | ||
49 | * and must be either 16, 32, or 64 | ||
50 | */ | ||
51 | #ifndef ACPI_MACHINE_WIDTH | ||
52 | #error ACPI_MACHINE_WIDTH not defined | ||
53 | #endif | ||
54 | |||
55 | /*! [Begin] no source code translation */ | ||
48 | 56 | ||
49 | /* | 57 | /* |
50 | * Data type ranges | 58 | * Data type ranges |
@@ -58,87 +66,150 @@ | |||
58 | #define ACPI_UINT64_MAX (UINT64)(~((UINT64) 0)) /* 0xFFFFFFFFFFFFFFFF */ | 66 | #define ACPI_UINT64_MAX (UINT64)(~((UINT64) 0)) /* 0xFFFFFFFFFFFFFFFF */ |
59 | #define ACPI_ASCII_MAX 0x7F | 67 | #define ACPI_ASCII_MAX 0x7F |
60 | 68 | ||
61 | #ifdef DEFINE_ALTERNATE_TYPES | ||
62 | /* | 69 | /* |
63 | * Types used only in translated source, defined here to enable | 70 | * Architecture-specific ACPICA Subsystem Data Types |
64 | * cross-platform compilation only. | 71 | * |
72 | * The goal of these types is to provide source code portability across | ||
73 | * 16-bit, 32-bit, and 64-bit targets. | ||
74 | * | ||
75 | * 1) The following types are of fixed size for all targets (16/32/64): | ||
76 | * | ||
77 | * BOOLEAN Logical boolean | ||
78 | * | ||
79 | * UINT8 8-bit (1 byte) unsigned value | ||
80 | * UINT16 16-bit (2 byte) unsigned value | ||
81 | * UINT32 32-bit (4 byte) unsigned value | ||
82 | * UINT64 64-bit (8 byte) unsigned value | ||
83 | * | ||
84 | * INT16 16-bit (2 byte) signed value | ||
85 | * INT32 32-bit (4 byte) signed value | ||
86 | * INT64 64-bit (8 byte) signed value | ||
87 | * | ||
88 | * COMPILER_DEPENDENT_UINT64/INT64 - These types are defined in the | ||
89 | * compiler-dependent header(s) and were introduced because there is no common | ||
90 | * 64-bit integer type across the various compilation models, as shown in | ||
91 | * the table below. | ||
92 | * | ||
93 | * Datatype LP64 ILP64 LLP64 ILP32 LP32 16bit | ||
94 | * char 8 8 8 8 8 8 | ||
95 | * short 16 16 16 16 16 16 | ||
96 | * _int32 32 | ||
97 | * int 32 64 32 32 16 16 | ||
98 | * long 64 64 32 32 32 32 | ||
99 | * long long 64 64 | ||
100 | * pointer 64 64 64 32 32 32 | ||
101 | * | ||
102 | * Note: ILP64 and LP32 are currently not supported. | ||
103 | * | ||
104 | * | ||
105 | * 2) These types represent the native word size of the target mode of the | ||
106 | * processor, and may be 16-bit, 32-bit, or 64-bit as required. They are | ||
107 | * usually used for memory allocation, efficient loop counters, and array | ||
108 | * indexes. The types are similar to the size_t type in the C library and are | ||
109 | * required because there is no C type that consistently represents the native | ||
110 | * data width. | ||
111 | * | ||
112 | * ACPI_SIZE 16/32/64-bit unsigned value | ||
113 | * ACPI_NATIVE_UINT 16/32/64-bit unsigned value | ||
114 | * ACPI_NATIVE_INT 16/32/64-bit signed value | ||
115 | * | ||
65 | */ | 116 | */ |
66 | typedef int s32; | ||
67 | typedef unsigned char u8; | ||
68 | typedef unsigned short u16; | ||
69 | typedef unsigned int u32; | ||
70 | typedef COMPILER_DEPENDENT_UINT64 u64; | ||
71 | |||
72 | #endif | ||
73 | 117 | ||
74 | /* | 118 | /******************************************************************************* |
75 | * Data types - Fixed across all compilation models (16/32/64) | ||
76 | * | 119 | * |
77 | * BOOLEAN Logical Boolean. | 120 | * Common types for all compilers, all targets |
78 | * INT8 8-bit (1 byte) signed value | 121 | * |
79 | * UINT8 8-bit (1 byte) unsigned value | 122 | ******************************************************************************/ |
80 | * INT16 16-bit (2 byte) signed value | ||
81 | * UINT16 16-bit (2 byte) unsigned value | ||
82 | * INT32 32-bit (4 byte) signed value | ||
83 | * UINT32 32-bit (4 byte) unsigned value | ||
84 | * INT64 64-bit (8 byte) signed value | ||
85 | * UINT64 64-bit (8 byte) unsigned value | ||
86 | * ACPI_NATIVE_INT 32-bit on IA-32, 64-bit on IA-64 signed value | ||
87 | * ACPI_NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value | ||
88 | */ | ||
89 | 123 | ||
90 | #ifndef ACPI_MACHINE_WIDTH | 124 | typedef unsigned char BOOLEAN; |
91 | #error ACPI_MACHINE_WIDTH not defined | 125 | typedef unsigned char UINT8; |
92 | #endif | 126 | typedef unsigned short UINT16; |
127 | typedef COMPILER_DEPENDENT_UINT64 UINT64; | ||
128 | typedef COMPILER_DEPENDENT_INT64 INT64; | ||
129 | |||
130 | /*! [End] no source code translation !*/ | ||
131 | |||
132 | /******************************************************************************* | ||
133 | * | ||
134 | * Types specific to 64-bit targets | ||
135 | * | ||
136 | ******************************************************************************/ | ||
93 | 137 | ||
94 | #if ACPI_MACHINE_WIDTH == 64 | 138 | #if ACPI_MACHINE_WIDTH == 64 |
95 | 139 | ||
96 | /*! [Begin] no source code translation (keep the typedefs) */ | 140 | /*! [Begin] no source code translation (keep the typedefs as-is) */ |
97 | 141 | ||
98 | /* | ||
99 | * 64-bit type definitions | ||
100 | */ | ||
101 | typedef unsigned char UINT8; | ||
102 | typedef unsigned char BOOLEAN; | ||
103 | typedef unsigned short UINT16; | ||
104 | typedef int INT32; | ||
105 | typedef unsigned int UINT32; | 142 | typedef unsigned int UINT32; |
106 | typedef COMPILER_DEPENDENT_INT64 INT64; | 143 | typedef int INT32; |
107 | typedef COMPILER_DEPENDENT_UINT64 UINT64; | ||
108 | 144 | ||
109 | /*! [End] no source code translation !*/ | 145 | /*! [End] no source code translation !*/ |
110 | 146 | ||
111 | typedef s64 acpi_native_int; | ||
112 | typedef u64 acpi_native_uint; | 147 | typedef u64 acpi_native_uint; |
148 | typedef s64 acpi_native_int; | ||
113 | 149 | ||
114 | typedef u64 acpi_table_ptr; | 150 | typedef u64 acpi_table_ptr; |
115 | typedef u64 acpi_io_address; | 151 | typedef u64 acpi_io_address; |
116 | typedef u64 acpi_physical_address; | 152 | typedef u64 acpi_physical_address; |
117 | typedef u64 acpi_size; | ||
118 | 153 | ||
119 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000008 /* No hardware alignment support in IA64 */ | ||
120 | #define ACPI_USE_NATIVE_DIVIDE /* Native 64-bit integer support */ | ||
121 | #define ACPI_MAX_PTR ACPI_UINT64_MAX | 154 | #define ACPI_MAX_PTR ACPI_UINT64_MAX |
122 | #define ACPI_SIZE_MAX ACPI_UINT64_MAX | 155 | #define ACPI_SIZE_MAX ACPI_UINT64_MAX |
123 | 156 | ||
124 | #elif ACPI_MACHINE_WIDTH == 16 | 157 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000008 |
125 | 158 | #define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */ | |
126 | /*! [Begin] no source code translation (keep the typedefs) */ | ||
127 | 159 | ||
128 | /* | 160 | /* |
129 | * 16-bit type definitions | 161 | * In the case of the Itanium Processor Family (IPF), the hardware does not |
162 | * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED flag | ||
163 | * to indicate that special precautions must be taken to avoid alignment faults. | ||
164 | * (IA64 or ia64 is currently used by existing compilers to indicate IPF.) | ||
165 | * | ||
166 | * Note: Em64_t and other X86-64 processors support misaligned transfers, | ||
167 | * so there is no need to define this flag. | ||
130 | */ | 168 | */ |
131 | typedef unsigned char UINT8; | 169 | #if defined (__IA64__) || defined (__ia64__) |
132 | typedef unsigned char BOOLEAN; | 170 | #define ACPI_MISALIGNMENT_NOT_SUPPORTED |
133 | typedef unsigned int UINT16; | 171 | #endif |
134 | typedef long INT32; | ||
135 | typedef int INT16; | ||
136 | typedef unsigned long UINT32; | ||
137 | 172 | ||
138 | struct { | 173 | /******************************************************************************* |
139 | UINT32 Lo; | 174 | * |
140 | UINT32 Hi; | 175 | * Types specific to 32-bit targets |
141 | }; | 176 | * |
177 | ******************************************************************************/ | ||
178 | |||
179 | #elif ACPI_MACHINE_WIDTH == 32 | ||
180 | |||
181 | /*! [Begin] no source code translation (keep the typedefs as-is) */ | ||
182 | |||
183 | typedef unsigned int UINT32; | ||
184 | typedef int INT32; | ||
185 | |||
186 | /*! [End] no source code translation !*/ | ||
187 | |||
188 | typedef u32 acpi_native_uint; | ||
189 | typedef s32 acpi_native_int; | ||
190 | |||
191 | typedef u64 acpi_table_ptr; | ||
192 | typedef u32 acpi_io_address; | ||
193 | typedef u64 acpi_physical_address; | ||
194 | |||
195 | #define ACPI_MAX_PTR ACPI_UINT32_MAX | ||
196 | #define ACPI_SIZE_MAX ACPI_UINT32_MAX | ||
197 | |||
198 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000004 | ||
199 | |||
200 | /******************************************************************************* | ||
201 | * | ||
202 | * Types specific to 16-bit targets | ||
203 | * | ||
204 | ******************************************************************************/ | ||
205 | |||
206 | #elif ACPI_MACHINE_WIDTH == 16 | ||
207 | |||
208 | /*! [Begin] no source code translation (keep the typedefs as-is) */ | ||
209 | |||
210 | typedef unsigned long UINT32; | ||
211 | typedef short INT16; | ||
212 | typedef long INT32; | ||
142 | 213 | ||
143 | /*! [End] no source code translation !*/ | 214 | /*! [End] no source code translation !*/ |
144 | 215 | ||
@@ -148,61 +219,84 @@ typedef s16 acpi_native_int; | |||
148 | typedef u32 acpi_table_ptr; | 219 | typedef u32 acpi_table_ptr; |
149 | typedef u32 acpi_io_address; | 220 | typedef u32 acpi_io_address; |
150 | typedef char *acpi_physical_address; | 221 | typedef char *acpi_physical_address; |
151 | typedef u16 acpi_size; | ||
152 | 222 | ||
153 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000002 | ||
154 | #define ACPI_MISALIGNED_TRANSFERS | ||
155 | #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */ | ||
156 | #define ACPI_MAX_PTR ACPI_UINT16_MAX | 223 | #define ACPI_MAX_PTR ACPI_UINT16_MAX |
157 | #define ACPI_SIZE_MAX ACPI_UINT16_MAX | 224 | #define ACPI_SIZE_MAX ACPI_UINT16_MAX |
158 | 225 | ||
159 | /* | 226 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000002 |
160 | * (16-bit only) internal integers must be 32-bits, so | 227 | #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */ |
161 | * 64-bit integers cannot be supported | 228 | |
162 | */ | 229 | /* 64-bit integers cannot be supported */ |
230 | |||
163 | #define ACPI_NO_INTEGER64_SUPPORT | 231 | #define ACPI_NO_INTEGER64_SUPPORT |
164 | 232 | ||
165 | #elif ACPI_MACHINE_WIDTH == 32 | 233 | #else |
166 | 234 | ||
167 | /*! [Begin] no source code translation (keep the typedefs) */ | 235 | /* ACPI_MACHINE_WIDTH must be either 64, 32, or 16 */ |
168 | 236 | ||
169 | /* | 237 | #error unknown ACPI_MACHINE_WIDTH |
170 | * 32-bit type definitions (default) | 238 | #endif |
171 | */ | ||
172 | typedef unsigned char UINT8; | ||
173 | typedef unsigned char BOOLEAN; | ||
174 | typedef unsigned short UINT16; | ||
175 | typedef int INT32; | ||
176 | typedef unsigned int UINT32; | ||
177 | typedef COMPILER_DEPENDENT_INT64 INT64; | ||
178 | typedef COMPILER_DEPENDENT_UINT64 UINT64; | ||
179 | 239 | ||
180 | /*! [End] no source code translation !*/ | 240 | /* Variable-width type, used instead of clib size_t */ |
181 | 241 | ||
182 | typedef s32 acpi_native_int; | 242 | typedef acpi_native_uint acpi_size; |
183 | typedef u32 acpi_native_uint; | ||
184 | 243 | ||
185 | typedef u64 acpi_table_ptr; | 244 | /******************************************************************************* |
186 | typedef u32 acpi_io_address; | 245 | * |
187 | typedef u64 acpi_physical_address; | 246 | * OS- or compiler-dependent types |
188 | typedef u32 acpi_size; | 247 | * |
248 | * If the defaults below are not appropriate for the host system, they can | ||
249 | * be defined in the compiler-specific or OS-specific header, and this will | ||
250 | * take precedence. | ||
251 | * | ||
252 | ******************************************************************************/ | ||
189 | 253 | ||
190 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000004 | 254 | /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ |
191 | #define ACPI_MISALIGNED_TRANSFERS | ||
192 | #define ACPI_MAX_PTR ACPI_UINT32_MAX | ||
193 | #define ACPI_SIZE_MAX ACPI_UINT32_MAX | ||
194 | 255 | ||
195 | #else | 256 | #ifndef acpi_uintptr_t |
196 | #error unknown ACPI_MACHINE_WIDTH | 257 | #define acpi_uintptr_t void * |
197 | #endif | 258 | #endif |
198 | 259 | ||
199 | /* | 260 | /* |
200 | * This type is used for bitfields in ACPI tables. The only type that is | 261 | * If acpi_cache_t was not defined in the OS-dependent header, |
201 | * even remotely portable is u8. Anything else is not portable, so | 262 | * define it now. This is typically the case where the local cache |
202 | * do not add any more bitfield types. | 263 | * manager implementation is to be used (ACPI_USE_LOCAL_CACHE) |
264 | */ | ||
265 | #ifndef acpi_cache_t | ||
266 | #define acpi_cache_t struct acpi_memory_list | ||
267 | #endif | ||
268 | |||
269 | /* | ||
270 | * Allow the CPU flags word to be defined per-OS to simplify the use of the | ||
271 | * lock and unlock OSL interfaces. | ||
272 | */ | ||
273 | #ifndef acpi_cpu_flags | ||
274 | #define acpi_cpu_flags acpi_native_uint | ||
275 | #endif | ||
276 | |||
277 | /* | ||
278 | * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because | ||
279 | * some compilers can catch printf format string problems | ||
203 | */ | 280 | */ |
204 | typedef u8 UINT8_BIT; | 281 | #ifndef ACPI_PRINTF_LIKE |
205 | typedef acpi_native_uint ACPI_PTRDIFF; | 282 | #define ACPI_PRINTF_LIKE(c) |
283 | #endif | ||
284 | |||
285 | /* | ||
286 | * Some compilers complain about unused variables. Sometimes we don't want to | ||
287 | * use all the variables (for example, _acpi_module_name). This allows us | ||
288 | * to to tell the compiler in a per-variable manner that a variable | ||
289 | * is unused | ||
290 | */ | ||
291 | #ifndef ACPI_UNUSED_VAR | ||
292 | #define ACPI_UNUSED_VAR | ||
293 | #endif | ||
294 | |||
295 | /******************************************************************************* | ||
296 | * | ||
297 | * Independent types | ||
298 | * | ||
299 | ******************************************************************************/ | ||
206 | 300 | ||
207 | /* | 301 | /* |
208 | * Pointer overlays to avoid lots of typecasting for | 302 | * Pointer overlays to avoid lots of typecasting for |
@@ -234,18 +328,8 @@ struct acpi_pointer { | |||
234 | #define ACPI_LOGMODE_PHYSPTR ACPI_LOGICAL_ADDRESSING | ACPI_PHYSICAL_POINTER | 328 | #define ACPI_LOGMODE_PHYSPTR ACPI_LOGICAL_ADDRESSING | ACPI_PHYSICAL_POINTER |
235 | #define ACPI_LOGMODE_LOGPTR ACPI_LOGICAL_ADDRESSING | ACPI_LOGICAL_POINTER | 329 | #define ACPI_LOGMODE_LOGPTR ACPI_LOGICAL_ADDRESSING | ACPI_LOGICAL_POINTER |
236 | 330 | ||
237 | /* | 331 | /* Logical defines and NULL */ |
238 | * If acpi_cache_t was not defined in the OS-dependent header, | ||
239 | * define it now. This is typically the case where the local cache | ||
240 | * manager implementation is to be used (ACPI_USE_LOCAL_CACHE) | ||
241 | */ | ||
242 | #ifndef acpi_cache_t | ||
243 | #define acpi_cache_t struct acpi_memory_list | ||
244 | #endif | ||
245 | 332 | ||
246 | /* | ||
247 | * Useful defines | ||
248 | */ | ||
249 | #ifdef FALSE | 333 | #ifdef FALSE |
250 | #undef FALSE | 334 | #undef FALSE |
251 | #endif | 335 | #endif |
@@ -261,12 +345,12 @@ struct acpi_pointer { | |||
261 | #endif | 345 | #endif |
262 | 346 | ||
263 | /* | 347 | /* |
264 | * Local datatypes | 348 | * Mescellaneous types |
265 | */ | 349 | */ |
266 | typedef u32 acpi_status; /* All ACPI Exceptions */ | 350 | typedef u32 acpi_status; /* All ACPI Exceptions */ |
267 | typedef u32 acpi_name; /* 4-byte ACPI name */ | 351 | typedef u32 acpi_name; /* 4-byte ACPI name */ |
268 | typedef char *acpi_string; /* Null terminated ASCII string */ | 352 | typedef char *acpi_string; /* Null terminated ASCII string */ |
269 | typedef void *acpi_handle; /* Actually a ptr to an Node */ | 353 | typedef void *acpi_handle; /* Actually a ptr to a NS Node */ |
270 | 354 | ||
271 | struct uint64_struct { | 355 | struct uint64_struct { |
272 | u32 lo; | 356 | u32 lo; |
@@ -323,7 +407,7 @@ typedef u64 acpi_integer; | |||
323 | /* | 407 | /* |
324 | * Constants with special meanings | 408 | * Constants with special meanings |
325 | */ | 409 | */ |
326 | #define ACPI_ROOT_OBJECT (acpi_handle) ACPI_PTR_ADD (char, NULL, ACPI_MAX_PTR) | 410 | #define ACPI_ROOT_OBJECT ACPI_ADD_PTR (acpi_handle, NULL, ACPI_MAX_PTR) |
327 | 411 | ||
328 | /* | 412 | /* |
329 | * Initialization sequence | 413 | * Initialization sequence |
@@ -470,37 +554,6 @@ typedef u32 acpi_object_type; | |||
470 | #define ACPI_TYPE_NOT_FOUND 0xFF | 554 | #define ACPI_TYPE_NOT_FOUND 0xFF |
471 | 555 | ||
472 | /* | 556 | /* |
473 | * Bitmapped ACPI types. Used internally only | ||
474 | */ | ||
475 | #define ACPI_BTYPE_ANY 0x00000000 | ||
476 | #define ACPI_BTYPE_INTEGER 0x00000001 | ||
477 | #define ACPI_BTYPE_STRING 0x00000002 | ||
478 | #define ACPI_BTYPE_BUFFER 0x00000004 | ||
479 | #define ACPI_BTYPE_PACKAGE 0x00000008 | ||
480 | #define ACPI_BTYPE_FIELD_UNIT 0x00000010 | ||
481 | #define ACPI_BTYPE_DEVICE 0x00000020 | ||
482 | #define ACPI_BTYPE_EVENT 0x00000040 | ||
483 | #define ACPI_BTYPE_METHOD 0x00000080 | ||
484 | #define ACPI_BTYPE_MUTEX 0x00000100 | ||
485 | #define ACPI_BTYPE_REGION 0x00000200 | ||
486 | #define ACPI_BTYPE_POWER 0x00000400 | ||
487 | #define ACPI_BTYPE_PROCESSOR 0x00000800 | ||
488 | #define ACPI_BTYPE_THERMAL 0x00001000 | ||
489 | #define ACPI_BTYPE_BUFFER_FIELD 0x00002000 | ||
490 | #define ACPI_BTYPE_DDB_HANDLE 0x00004000 | ||
491 | #define ACPI_BTYPE_DEBUG_OBJECT 0x00008000 | ||
492 | #define ACPI_BTYPE_REFERENCE 0x00010000 | ||
493 | #define ACPI_BTYPE_RESOURCE 0x00020000 | ||
494 | |||
495 | #define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER) | ||
496 | |||
497 | #define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE) | ||
498 | #define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE) | ||
499 | #define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR) | ||
500 | #define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ | ||
501 | #define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF | ||
502 | |||
503 | /* | ||
504 | * All I/O | 557 | * All I/O |
505 | */ | 558 | */ |
506 | #define ACPI_READ 0 | 559 | #define ACPI_READ 0 |
@@ -853,6 +906,14 @@ struct acpi_compatible_id_list { | |||
853 | #define ACPI_VALID_CID 0x0010 | 906 | #define ACPI_VALID_CID 0x0010 |
854 | #define ACPI_VALID_SXDS 0x0020 | 907 | #define ACPI_VALID_SXDS 0x0020 |
855 | 908 | ||
909 | /* Flags for _STA method */ | ||
910 | |||
911 | #define ACPI_STA_DEVICE_PRESENT 0x01 | ||
912 | #define ACPI_STA_DEVICE_ENABLED 0x02 | ||
913 | #define ACPI_STA_DEVICE_UI 0x04 | ||
914 | #define ACPI_STA_DEVICE_OK 0x08 | ||
915 | #define ACPI_STA_BATTERY_PRESENT 0x10 | ||
916 | |||
856 | #define ACPI_COMMON_OBJ_INFO \ | 917 | #define ACPI_COMMON_OBJ_INFO \ |
857 | acpi_object_type type; /* ACPI object type */ \ | 918 | acpi_object_type type; /* ACPI object type */ \ |
858 | acpi_name name /* ACPI object Name */ | 919 | acpi_name name /* ACPI object Name */ |
@@ -895,6 +956,8 @@ struct acpi_mem_space_context { | |||
895 | /* | 956 | /* |
896 | * Definitions for Resource Attributes | 957 | * Definitions for Resource Attributes |
897 | */ | 958 | */ |
959 | typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 bits */ | ||
960 | typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (length+3) = (64_k-1)+3 */ | ||
898 | 961 | ||
899 | /* | 962 | /* |
900 | * Memory Attributes | 963 | * Memory Attributes |
@@ -916,7 +979,9 @@ struct acpi_mem_space_context { | |||
916 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 | 979 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 |
917 | #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) | 980 | #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) |
918 | 981 | ||
919 | #define ACPI_SPARSE_TRANSLATION (u8) 0x03 | 982 | /* Type of translation - 1=Sparse, 0=Dense */ |
983 | |||
984 | #define ACPI_SPARSE_TRANSLATION (u8) 0x01 | ||
920 | 985 | ||
921 | /* | 986 | /* |
922 | * IO Port Descriptor Decode | 987 | * IO Port Descriptor Decode |
@@ -927,8 +992,8 @@ struct acpi_mem_space_context { | |||
927 | /* | 992 | /* |
928 | * IRQ Attributes | 993 | * IRQ Attributes |
929 | */ | 994 | */ |
930 | #define ACPI_EDGE_SENSITIVE (u8) 0x00 | 995 | #define ACPI_LEVEL_SENSITIVE (u8) 0x00 |
931 | #define ACPI_LEVEL_SENSITIVE (u8) 0x01 | 996 | #define ACPI_EDGE_SENSITIVE (u8) 0x01 |
932 | 997 | ||
933 | #define ACPI_ACTIVE_HIGH (u8) 0x00 | 998 | #define ACPI_ACTIVE_HIGH (u8) 0x00 |
934 | #define ACPI_ACTIVE_LOW (u8) 0x01 | 999 | #define ACPI_ACTIVE_LOW (u8) 0x01 |
@@ -975,27 +1040,45 @@ struct acpi_mem_space_context { | |||
975 | #define ACPI_CONSUMER (u8) 0x01 | 1040 | #define ACPI_CONSUMER (u8) 0x01 |
976 | 1041 | ||
977 | /* | 1042 | /* |
1043 | * If possible, pack the following structures to byte alignment | ||
1044 | */ | ||
1045 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | ||
1046 | #pragma pack(1) | ||
1047 | #endif | ||
1048 | |||
1049 | /* UUID data structures for use in vendor-defined resource descriptors */ | ||
1050 | |||
1051 | struct acpi_uuid { | ||
1052 | u8 data[ACPI_UUID_LENGTH]; | ||
1053 | }; | ||
1054 | |||
1055 | struct acpi_vendor_uuid { | ||
1056 | u8 subtype; | ||
1057 | u8 data[ACPI_UUID_LENGTH]; | ||
1058 | }; | ||
1059 | |||
1060 | /* | ||
978 | * Structures used to describe device resources | 1061 | * Structures used to describe device resources |
979 | */ | 1062 | */ |
980 | struct acpi_resource_irq { | 1063 | struct acpi_resource_irq { |
981 | u32 edge_level; | 1064 | u8 triggering; |
982 | u32 active_high_low; | 1065 | u8 polarity; |
983 | u32 shared_exclusive; | 1066 | u8 sharable; |
984 | u32 number_of_interrupts; | 1067 | u8 interrupt_count; |
985 | u32 interrupts[1]; | 1068 | u8 interrupts[1]; |
986 | }; | 1069 | }; |
987 | 1070 | ||
988 | struct acpi_resource_dma { | 1071 | struct acpi_resource_dma { |
989 | u32 type; | 1072 | u8 type; |
990 | u32 bus_master; | 1073 | u8 bus_master; |
991 | u32 transfer; | 1074 | u8 transfer; |
992 | u32 number_of_channels; | 1075 | u8 channel_count; |
993 | u32 channels[1]; | 1076 | u8 channels[1]; |
994 | }; | 1077 | }; |
995 | 1078 | ||
996 | struct acpi_resource_start_dpf { | 1079 | struct acpi_resource_start_dependent { |
997 | u32 compatibility_priority; | 1080 | u8 compatibility_priority; |
998 | u32 performance_robustness; | 1081 | u8 performance_robustness; |
999 | }; | 1082 | }; |
1000 | 1083 | ||
1001 | /* | 1084 | /* |
@@ -1004,179 +1087,217 @@ struct acpi_resource_start_dpf { | |||
1004 | */ | 1087 | */ |
1005 | 1088 | ||
1006 | struct acpi_resource_io { | 1089 | struct acpi_resource_io { |
1007 | u32 io_decode; | 1090 | u8 io_decode; |
1008 | u32 min_base_address; | 1091 | u8 alignment; |
1009 | u32 max_base_address; | 1092 | u8 address_length; |
1010 | u32 alignment; | 1093 | u16 minimum; |
1011 | u32 range_length; | 1094 | u16 maximum; |
1012 | }; | 1095 | }; |
1013 | 1096 | ||
1014 | struct acpi_resource_fixed_io { | 1097 | struct acpi_resource_fixed_io { |
1015 | u32 base_address; | 1098 | u16 address; |
1016 | u32 range_length; | 1099 | u8 address_length; |
1017 | }; | 1100 | }; |
1018 | 1101 | ||
1019 | struct acpi_resource_vendor { | 1102 | struct acpi_resource_vendor { |
1020 | u32 length; | 1103 | u16 byte_length; |
1021 | u8 reserved[1]; | 1104 | u8 byte_data[1]; |
1105 | }; | ||
1106 | |||
1107 | /* Vendor resource with UUID info (introduced in ACPI 3.0) */ | ||
1108 | |||
1109 | struct acpi_resource_vendor_typed { | ||
1110 | u16 byte_length; | ||
1111 | u8 uuid_subtype; | ||
1112 | u8 uuid[ACPI_UUID_LENGTH]; | ||
1113 | u8 byte_data[1]; | ||
1022 | }; | 1114 | }; |
1023 | 1115 | ||
1024 | struct acpi_resource_end_tag { | 1116 | struct acpi_resource_end_tag { |
1025 | u8 checksum; | 1117 | u8 checksum; |
1026 | }; | 1118 | }; |
1027 | 1119 | ||
1028 | struct acpi_resource_mem24 { | 1120 | struct acpi_resource_memory24 { |
1029 | u32 read_write_attribute; | 1121 | u8 write_protect; |
1030 | u32 min_base_address; | 1122 | u16 minimum; |
1031 | u32 max_base_address; | 1123 | u16 maximum; |
1032 | u32 alignment; | 1124 | u16 alignment; |
1033 | u32 range_length; | 1125 | u16 address_length; |
1034 | }; | 1126 | }; |
1035 | 1127 | ||
1036 | struct acpi_resource_mem32 { | 1128 | struct acpi_resource_memory32 { |
1037 | u32 read_write_attribute; | 1129 | u8 write_protect; |
1038 | u32 min_base_address; | 1130 | u32 minimum; |
1039 | u32 max_base_address; | 1131 | u32 maximum; |
1040 | u32 alignment; | 1132 | u32 alignment; |
1041 | u32 range_length; | 1133 | u32 address_length; |
1042 | }; | 1134 | }; |
1043 | 1135 | ||
1044 | struct acpi_resource_fixed_mem32 { | 1136 | struct acpi_resource_fixed_memory32 { |
1045 | u32 read_write_attribute; | 1137 | u8 write_protect; |
1046 | u32 range_base_address; | 1138 | u32 address; |
1047 | u32 range_length; | 1139 | u32 address_length; |
1048 | }; | 1140 | }; |
1049 | 1141 | ||
1050 | struct acpi_memory_attribute { | 1142 | struct acpi_memory_attribute { |
1051 | u16 cache_attribute; | 1143 | u8 write_protect; |
1052 | u16 read_write_attribute; | 1144 | u8 caching; |
1145 | u8 range_type; | ||
1146 | u8 translation; | ||
1053 | }; | 1147 | }; |
1054 | 1148 | ||
1055 | struct acpi_io_attribute { | 1149 | struct acpi_io_attribute { |
1056 | u16 range_attribute; | 1150 | u8 range_type; |
1057 | u16 translation_attribute; | 1151 | u8 translation; |
1058 | }; | 1152 | u8 translation_type; |
1059 | 1153 | u8 reserved1; | |
1060 | struct acpi_bus_attribute { | ||
1061 | u16 reserved1; | ||
1062 | u16 reserved2; | ||
1063 | }; | 1154 | }; |
1064 | 1155 | ||
1065 | union acpi_resource_attribute { | 1156 | union acpi_resource_attribute { |
1066 | struct acpi_memory_attribute memory; | 1157 | struct acpi_memory_attribute mem; |
1067 | struct acpi_io_attribute io; | 1158 | struct acpi_io_attribute io; |
1068 | struct acpi_bus_attribute bus; | 1159 | |
1160 | /* Used for the *word_space macros */ | ||
1161 | |||
1162 | u8 type_specific; | ||
1069 | }; | 1163 | }; |
1070 | 1164 | ||
1071 | struct acpi_resource_source { | 1165 | struct acpi_resource_source { |
1072 | u32 index; | 1166 | u8 index; |
1073 | u32 string_length; | 1167 | u16 string_length; |
1074 | char *string_ptr; | 1168 | char *string_ptr; |
1075 | }; | 1169 | }; |
1076 | 1170 | ||
1077 | /* Fields common to all address descriptors, 16/32/64 bit */ | 1171 | /* Fields common to all address descriptors, 16/32/64 bit */ |
1078 | 1172 | ||
1079 | #define ACPI_RESOURCE_ADDRESS_COMMON \ | 1173 | #define ACPI_RESOURCE_ADDRESS_COMMON \ |
1080 | u32 resource_type; \ | 1174 | u8 resource_type; \ |
1081 | u32 producer_consumer; \ | 1175 | u8 producer_consumer; \ |
1082 | u32 decode; \ | 1176 | u8 decode; \ |
1083 | u32 min_address_fixed; \ | 1177 | u8 min_address_fixed; \ |
1084 | u32 max_address_fixed; \ | 1178 | u8 max_address_fixed; \ |
1085 | union acpi_resource_attribute attribute; | 1179 | union acpi_resource_attribute info; |
1086 | 1180 | ||
1087 | struct acpi_resource_address { | 1181 | struct acpi_resource_address { |
1088 | ACPI_RESOURCE_ADDRESS_COMMON}; | 1182 | ACPI_RESOURCE_ADDRESS_COMMON}; |
1089 | 1183 | ||
1090 | struct acpi_resource_address16 { | 1184 | struct acpi_resource_address16 { |
1091 | ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; | 1185 | ACPI_RESOURCE_ADDRESS_COMMON u16 granularity; |
1092 | u32 min_address_range; | 1186 | u16 minimum; |
1093 | u32 max_address_range; | 1187 | u16 maximum; |
1094 | u32 address_translation_offset; | 1188 | u16 translation_offset; |
1095 | u32 address_length; | 1189 | u16 address_length; |
1096 | struct acpi_resource_source resource_source; | 1190 | struct acpi_resource_source resource_source; |
1097 | }; | 1191 | }; |
1098 | 1192 | ||
1099 | struct acpi_resource_address32 { | 1193 | struct acpi_resource_address32 { |
1100 | ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; | 1194 | ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; |
1101 | u32 min_address_range; | 1195 | u32 minimum; |
1102 | u32 max_address_range; | 1196 | u32 maximum; |
1103 | u32 address_translation_offset; | 1197 | u32 translation_offset; |
1104 | u32 address_length; | 1198 | u32 address_length; |
1105 | struct acpi_resource_source resource_source; | 1199 | struct acpi_resource_source resource_source; |
1106 | }; | 1200 | }; |
1107 | 1201 | ||
1108 | struct acpi_resource_address64 { | 1202 | struct acpi_resource_address64 { |
1109 | ACPI_RESOURCE_ADDRESS_COMMON u64 granularity; | 1203 | ACPI_RESOURCE_ADDRESS_COMMON u64 granularity; |
1110 | u64 min_address_range; | 1204 | u64 minimum; |
1111 | u64 max_address_range; | 1205 | u64 maximum; |
1112 | u64 address_translation_offset; | 1206 | u64 translation_offset; |
1113 | u64 address_length; | 1207 | u64 address_length; |
1114 | u64 type_specific_attributes; | ||
1115 | struct acpi_resource_source resource_source; | 1208 | struct acpi_resource_source resource_source; |
1116 | }; | 1209 | }; |
1117 | 1210 | ||
1118 | struct acpi_resource_ext_irq { | 1211 | struct acpi_resource_extended_address64 { |
1119 | u32 producer_consumer; | 1212 | ACPI_RESOURCE_ADDRESS_COMMON u8 revision_iD; |
1120 | u32 edge_level; | 1213 | u64 granularity; |
1121 | u32 active_high_low; | 1214 | u64 minimum; |
1122 | u32 shared_exclusive; | 1215 | u64 maximum; |
1123 | u32 number_of_interrupts; | 1216 | u64 translation_offset; |
1217 | u64 address_length; | ||
1218 | u64 type_specific; | ||
1219 | }; | ||
1220 | |||
1221 | struct acpi_resource_extended_irq { | ||
1222 | u8 producer_consumer; | ||
1223 | u8 triggering; | ||
1224 | u8 polarity; | ||
1225 | u8 sharable; | ||
1226 | u8 interrupt_count; | ||
1124 | struct acpi_resource_source resource_source; | 1227 | struct acpi_resource_source resource_source; |
1125 | u32 interrupts[1]; | 1228 | u32 interrupts[1]; |
1126 | }; | 1229 | }; |
1127 | 1230 | ||
1231 | struct acpi_resource_generic_register { | ||
1232 | u8 space_id; | ||
1233 | u8 bit_width; | ||
1234 | u8 bit_offset; | ||
1235 | u8 access_size; | ||
1236 | u64 address; | ||
1237 | }; | ||
1238 | |||
1128 | /* ACPI_RESOURCE_TYPEs */ | 1239 | /* ACPI_RESOURCE_TYPEs */ |
1129 | 1240 | ||
1130 | #define ACPI_RSTYPE_IRQ 0 | 1241 | #define ACPI_RESOURCE_TYPE_IRQ 0 |
1131 | #define ACPI_RSTYPE_DMA 1 | 1242 | #define ACPI_RESOURCE_TYPE_DMA 1 |
1132 | #define ACPI_RSTYPE_START_DPF 2 | 1243 | #define ACPI_RESOURCE_TYPE_START_DEPENDENT 2 |
1133 | #define ACPI_RSTYPE_END_DPF 3 | 1244 | #define ACPI_RESOURCE_TYPE_END_DEPENDENT 3 |
1134 | #define ACPI_RSTYPE_IO 4 | 1245 | #define ACPI_RESOURCE_TYPE_IO 4 |
1135 | #define ACPI_RSTYPE_FIXED_IO 5 | 1246 | #define ACPI_RESOURCE_TYPE_FIXED_IO 5 |
1136 | #define ACPI_RSTYPE_VENDOR 6 | 1247 | #define ACPI_RESOURCE_TYPE_VENDOR 6 |
1137 | #define ACPI_RSTYPE_END_TAG 7 | 1248 | #define ACPI_RESOURCE_TYPE_END_TAG 7 |
1138 | #define ACPI_RSTYPE_MEM24 8 | 1249 | #define ACPI_RESOURCE_TYPE_MEMORY24 8 |
1139 | #define ACPI_RSTYPE_MEM32 9 | 1250 | #define ACPI_RESOURCE_TYPE_MEMORY32 9 |
1140 | #define ACPI_RSTYPE_FIXED_MEM32 10 | 1251 | #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10 |
1141 | #define ACPI_RSTYPE_ADDRESS16 11 | 1252 | #define ACPI_RESOURCE_TYPE_ADDRESS16 11 |
1142 | #define ACPI_RSTYPE_ADDRESS32 12 | 1253 | #define ACPI_RESOURCE_TYPE_ADDRESS32 12 |
1143 | #define ACPI_RSTYPE_ADDRESS64 13 | 1254 | #define ACPI_RESOURCE_TYPE_ADDRESS64 13 |
1144 | #define ACPI_RSTYPE_EXT_IRQ 14 | 1255 | #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ |
1145 | 1256 | #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 | |
1146 | typedef u32 acpi_resource_type; | 1257 | #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 |
1258 | #define ACPI_RESOURCE_TYPE_MAX 16 | ||
1147 | 1259 | ||
1148 | union acpi_resource_data { | 1260 | union acpi_resource_data { |
1149 | struct acpi_resource_irq irq; | 1261 | struct acpi_resource_irq irq; |
1150 | struct acpi_resource_dma dma; | 1262 | struct acpi_resource_dma dma; |
1151 | struct acpi_resource_start_dpf start_dpf; | 1263 | struct acpi_resource_start_dependent start_dpf; |
1152 | struct acpi_resource_io io; | 1264 | struct acpi_resource_io io; |
1153 | struct acpi_resource_fixed_io fixed_io; | 1265 | struct acpi_resource_fixed_io fixed_io; |
1154 | struct acpi_resource_vendor vendor_specific; | 1266 | struct acpi_resource_vendor vendor; |
1267 | struct acpi_resource_vendor_typed vendor_typed; | ||
1155 | struct acpi_resource_end_tag end_tag; | 1268 | struct acpi_resource_end_tag end_tag; |
1156 | struct acpi_resource_mem24 memory24; | 1269 | struct acpi_resource_memory24 memory24; |
1157 | struct acpi_resource_mem32 memory32; | 1270 | struct acpi_resource_memory32 memory32; |
1158 | struct acpi_resource_fixed_mem32 fixed_memory32; | 1271 | struct acpi_resource_fixed_memory32 fixed_memory32; |
1159 | struct acpi_resource_address address; /* Common 16/32/64 address fields */ | ||
1160 | struct acpi_resource_address16 address16; | 1272 | struct acpi_resource_address16 address16; |
1161 | struct acpi_resource_address32 address32; | 1273 | struct acpi_resource_address32 address32; |
1162 | struct acpi_resource_address64 address64; | 1274 | struct acpi_resource_address64 address64; |
1163 | struct acpi_resource_ext_irq extended_irq; | 1275 | struct acpi_resource_extended_address64 ext_address64; |
1276 | struct acpi_resource_extended_irq extended_irq; | ||
1277 | struct acpi_resource_generic_register generic_reg; | ||
1278 | |||
1279 | /* Common fields */ | ||
1280 | |||
1281 | struct acpi_resource_address address; /* Common 16/32/64 address fields */ | ||
1164 | }; | 1282 | }; |
1165 | 1283 | ||
1166 | struct acpi_resource { | 1284 | struct acpi_resource { |
1167 | acpi_resource_type id; | 1285 | u32 type; |
1168 | u32 length; | 1286 | u32 length; |
1169 | union acpi_resource_data data; | 1287 | union acpi_resource_data data; |
1170 | }; | 1288 | }; |
1171 | 1289 | ||
1172 | #define ACPI_RESOURCE_LENGTH 12 | 1290 | /* restore default alignment */ |
1173 | #define ACPI_RESOURCE_LENGTH_NO_DATA 8 /* Id + Length fields */ | 1291 | |
1292 | #pragma pack() | ||
1174 | 1293 | ||
1175 | #define ACPI_SIZEOF_RESOURCE(type) (ACPI_RESOURCE_LENGTH_NO_DATA + sizeof (type)) | 1294 | #define ACPI_RS_SIZE_MIN 12 |
1295 | #define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */ | ||
1296 | #define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type)) | ||
1176 | 1297 | ||
1177 | #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) | 1298 | #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) |
1178 | 1299 | ||
1179 | #ifdef ACPI_MISALIGNED_TRANSFERS | 1300 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED |
1180 | #define ACPI_ALIGN_RESOURCE_SIZE(length) (length) | 1301 | #define ACPI_ALIGN_RESOURCE_SIZE(length) (length) |
1181 | #else | 1302 | #else |
1182 | #define ACPI_ALIGN_RESOURCE_SIZE(length) ACPI_ROUND_UP_TO_NATIVE_WORD(length) | 1303 | #define ACPI_ALIGN_RESOURCE_SIZE(length) ACPI_ROUND_UP_TO_NATIVE_WORD(length) |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index c1086452696e..0927765df6aa 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -44,6 +44,39 @@ | |||
44 | #ifndef _ACUTILS_H | 44 | #ifndef _ACUTILS_H |
45 | #define _ACUTILS_H | 45 | #define _ACUTILS_H |
46 | 46 | ||
47 | extern 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 | |||
53 | extern const char *acpi_gbl_BMdecode[2]; | ||
54 | extern const char *acpi_gbl_config_decode[4]; | ||
55 | extern const char *acpi_gbl_consume_decode[2]; | ||
56 | extern const char *acpi_gbl_DECdecode[2]; | ||
57 | extern const char *acpi_gbl_HEdecode[2]; | ||
58 | extern const char *acpi_gbl_io_decode[2]; | ||
59 | extern const char *acpi_gbl_LLdecode[2]; | ||
60 | extern const char *acpi_gbl_max_decode[2]; | ||
61 | extern const char *acpi_gbl_MEMdecode[4]; | ||
62 | extern const char *acpi_gbl_min_decode[2]; | ||
63 | extern const char *acpi_gbl_MTPdecode[4]; | ||
64 | extern const char *acpi_gbl_RNGdecode[4]; | ||
65 | extern const char *acpi_gbl_RWdecode[2]; | ||
66 | extern const char *acpi_gbl_SHRdecode[2]; | ||
67 | extern const char *acpi_gbl_SIZdecode[4]; | ||
68 | extern const char *acpi_gbl_TRSdecode[2]; | ||
69 | extern const char *acpi_gbl_TTPdecode[2]; | ||
70 | extern const char *acpi_gbl_TYPdecode[4]; | ||
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 | |||
47 | typedef | 80 | typedef |
48 | acpi_status(*acpi_pkg_callback) (u8 object_type, | 81 | acpi_status(*acpi_pkg_callback) (u8 object_type, |
49 | union acpi_operand_object * source_object, | 82 | union acpi_operand_object * source_object, |
@@ -159,7 +192,6 @@ extern const u8 _acpi_ctype[]; | |||
159 | #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) | 192 | #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) |
160 | #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) | 193 | #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) |
161 | #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) | 194 | #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) |
162 | #define ACPI_IS_ASCII(c) ((c) < 0x80) | ||
163 | 195 | ||
164 | #endif /* ACPI_USE_SYSTEM_CLIBRARY */ | 196 | #endif /* ACPI_USE_SYSTEM_CLIBRARY */ |
165 | 197 | ||
@@ -243,21 +275,22 @@ acpi_ut_ptr_exit(u32 line_number, | |||
243 | const char *function_name, | 275 | const char *function_name, |
244 | char *module_name, u32 component_id, u8 * ptr); | 276 | char *module_name, u32 component_id, u8 * ptr); |
245 | 277 | ||
246 | void acpi_ut_report_info(char *module_name, u32 line_number, u32 component_id); | 278 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); |
247 | 279 | ||
248 | void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id); | 280 | void acpi_ut_report_error(char *module_name, u32 line_number); |
249 | 281 | ||
250 | void | 282 | void acpi_ut_report_info(char *module_name, u32 line_number); |
251 | acpi_ut_report_warning(char *module_name, u32 line_number, u32 component_id); | ||
252 | 283 | ||
253 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); | 284 | void acpi_ut_report_warning(char *module_name, u32 line_number); |
285 | |||
286 | /* Error and message reporting interfaces */ | ||
254 | 287 | ||
255 | void ACPI_INTERNAL_VAR_XFACE | 288 | void ACPI_INTERNAL_VAR_XFACE |
256 | acpi_ut_debug_print(u32 requested_debug_level, | 289 | acpi_ut_debug_print(u32 requested_debug_level, |
257 | u32 line_number, | 290 | u32 line_number, |
258 | const char *function_name, | 291 | const char *function_name, |
259 | char *module_name, | 292 | char *module_name, |
260 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 293 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE(6); |
261 | 294 | ||
262 | void ACPI_INTERNAL_VAR_XFACE | 295 | void ACPI_INTERNAL_VAR_XFACE |
263 | acpi_ut_debug_print_raw(u32 requested_debug_level, | 296 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
@@ -265,7 +298,24 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, | |||
265 | const char *function_name, | 298 | const char *function_name, |
266 | char *module_name, | 299 | char *module_name, |
267 | u32 component_id, | 300 | u32 component_id, |
268 | char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 301 | char *format, ...) ACPI_PRINTF_LIKE(6); |
302 | |||
303 | void ACPI_INTERNAL_VAR_XFACE | ||
304 | acpi_ut_error(char *module_name, | ||
305 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
306 | |||
307 | void ACPI_INTERNAL_VAR_XFACE | ||
308 | acpi_ut_exception(char *module_name, | ||
309 | u32 line_number, | ||
310 | acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4); | ||
311 | |||
312 | void ACPI_INTERNAL_VAR_XFACE | ||
313 | acpi_ut_warning(char *module_name, | ||
314 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
315 | |||
316 | void ACPI_INTERNAL_VAR_XFACE | ||
317 | acpi_ut_info(char *module_name, | ||
318 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
269 | 319 | ||
270 | /* | 320 | /* |
271 | * utdelete - Object deletion and reference counts | 321 | * utdelete - Object deletion and reference counts |
@@ -419,7 +469,19 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); | |||
419 | 469 | ||
420 | #define ACPI_ANY_BASE 0 | 470 | #define ACPI_ANY_BASE 0 |
421 | 471 | ||
422 | u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc); | 472 | acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); |
473 | |||
474 | u32 acpi_ut_get_descriptor_length(void *aml); | ||
475 | |||
476 | u16 acpi_ut_get_resource_length(void *aml); | ||
477 | |||
478 | u8 acpi_ut_get_resource_header_length(void *aml); | ||
479 | |||
480 | u8 acpi_ut_get_resource_type(void *aml); | ||
481 | |||
482 | acpi_status | ||
483 | acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, | ||
484 | u8 ** end_tag); | ||
423 | 485 | ||
424 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); | 486 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); |
425 | 487 | ||
diff --git a/include/acpi/amlcode.h b/include/acpi/amlcode.h index 7fdf5299f501..37964a59aef8 100644 --- a/include/acpi/amlcode.h +++ b/include/acpi/amlcode.h | |||
@@ -7,7 +7,7 @@ | |||
7 | *****************************************************************************/ | 7 | *****************************************************************************/ |
8 | 8 | ||
9 | /* | 9 | /* |
10 | * Copyright (C) 2000 - 2005, R. Byron Moore | 10 | * Copyright (C) 2000 - 2006, R. Byron Moore |
11 | * All rights reserved. | 11 | * All rights reserved. |
12 | * | 12 | * |
13 | * Redistribution and use in source and binary forms, with or without | 13 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h index 051786e4b210..fb4735315ad3 100644 --- a/include/acpi/amlresrc.h +++ b/include/acpi/amlresrc.h | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -92,182 +92,168 @@ struct asl_resource_node { | |||
92 | struct asl_resource_node *next; | 92 | struct asl_resource_node *next; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | /* Macros used to generate AML resource length fields */ | ||
96 | |||
97 | #define ACPI_AML_SIZE_LARGE(r) (sizeof (r) - sizeof (struct aml_resource_large_header)) | ||
98 | #define ACPI_AML_SIZE_SMALL(r) (sizeof (r) - sizeof (struct aml_resource_small_header)) | ||
99 | |||
95 | /* | 100 | /* |
96 | * Resource descriptors defined in the ACPI specification. | 101 | * Resource descriptors defined in the ACPI specification. |
97 | * | 102 | * |
98 | * Packing/alignment must be BYTE because these descriptors | 103 | * Packing/alignment must be BYTE because these descriptors |
99 | * are used to overlay the AML byte stream. | 104 | * are used to overlay the raw AML byte stream. |
100 | */ | 105 | */ |
101 | #pragma pack(1) | 106 | #pragma pack(1) |
102 | 107 | ||
103 | struct asl_irq_format_desc { | 108 | /* |
104 | u8 descriptor_type; | 109 | * SMALL descriptors |
105 | u16 irq_mask; | 110 | */ |
111 | #define AML_RESOURCE_SMALL_HEADER_COMMON \ | ||
112 | u8 descriptor_type; | ||
113 | |||
114 | struct aml_resource_small_header { | ||
115 | AML_RESOURCE_SMALL_HEADER_COMMON}; | ||
116 | |||
117 | struct aml_resource_irq { | ||
118 | AML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask; | ||
106 | u8 flags; | 119 | u8 flags; |
107 | }; | 120 | }; |
108 | 121 | ||
109 | struct asl_irq_noflags_desc { | 122 | struct aml_resource_irq_noflags { |
110 | u8 descriptor_type; | 123 | AML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask; |
111 | u16 irq_mask; | ||
112 | }; | 124 | }; |
113 | 125 | ||
114 | struct asl_dma_format_desc { | 126 | struct aml_resource_dma { |
115 | u8 descriptor_type; | 127 | AML_RESOURCE_SMALL_HEADER_COMMON u8 dma_channel_mask; |
116 | u8 dma_channel_mask; | ||
117 | u8 flags; | 128 | u8 flags; |
118 | }; | 129 | }; |
119 | 130 | ||
120 | struct asl_start_dependent_desc { | 131 | struct aml_resource_start_dependent { |
121 | u8 descriptor_type; | 132 | AML_RESOURCE_SMALL_HEADER_COMMON u8 flags; |
122 | u8 flags; | ||
123 | }; | 133 | }; |
124 | 134 | ||
125 | struct asl_start_dependent_noprio_desc { | 135 | struct aml_resource_start_dependent_noprio { |
126 | u8 descriptor_type; | 136 | AML_RESOURCE_SMALL_HEADER_COMMON}; |
127 | }; | ||
128 | 137 | ||
129 | struct asl_end_dependent_desc { | 138 | struct aml_resource_end_dependent { |
130 | u8 descriptor_type; | 139 | AML_RESOURCE_SMALL_HEADER_COMMON}; |
131 | }; | ||
132 | 140 | ||
133 | struct asl_io_port_desc { | 141 | struct aml_resource_io { |
134 | u8 descriptor_type; | 142 | AML_RESOURCE_SMALL_HEADER_COMMON u8 flags; |
135 | u8 information; | 143 | u16 minimum; |
136 | u16 address_min; | 144 | u16 maximum; |
137 | u16 address_max; | ||
138 | u8 alignment; | 145 | u8 alignment; |
139 | u8 length; | 146 | u8 address_length; |
140 | }; | 147 | }; |
141 | 148 | ||
142 | struct asl_fixed_io_port_desc { | 149 | struct aml_resource_fixed_io { |
143 | u8 descriptor_type; | 150 | AML_RESOURCE_SMALL_HEADER_COMMON u16 address; |
144 | u16 base_address; | 151 | u8 address_length; |
145 | u8 length; | ||
146 | }; | 152 | }; |
147 | 153 | ||
148 | struct asl_small_vendor_desc { | 154 | struct aml_resource_vendor_small { |
149 | u8 descriptor_type; | 155 | AML_RESOURCE_SMALL_HEADER_COMMON}; |
150 | u8 vendor_defined[7]; | ||
151 | }; | ||
152 | 156 | ||
153 | struct asl_end_tag_desc { | 157 | struct aml_resource_end_tag { |
154 | u8 descriptor_type; | 158 | AML_RESOURCE_SMALL_HEADER_COMMON u8 checksum; |
155 | u8 checksum; | ||
156 | }; | 159 | }; |
157 | 160 | ||
158 | /* LARGE descriptors */ | 161 | /* |
162 | * LARGE descriptors | ||
163 | */ | ||
164 | #define AML_RESOURCE_LARGE_HEADER_COMMON \ | ||
165 | u8 descriptor_type;\ | ||
166 | u16 resource_length; | ||
167 | |||
168 | struct aml_resource_large_header { | ||
169 | AML_RESOURCE_LARGE_HEADER_COMMON}; | ||
159 | 170 | ||
160 | struct asl_memory_24_desc { | 171 | struct aml_resource_memory24 { |
161 | u8 descriptor_type; | 172 | AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; |
162 | u16 length; | 173 | u16 minimum; |
163 | u8 information; | 174 | u16 maximum; |
164 | u16 address_min; | ||
165 | u16 address_max; | ||
166 | u16 alignment; | 175 | u16 alignment; |
167 | u16 range_length; | 176 | u16 address_length; |
168 | }; | 177 | }; |
169 | 178 | ||
170 | struct asl_large_vendor_desc { | 179 | struct aml_resource_vendor_large { |
171 | u8 descriptor_type; | 180 | AML_RESOURCE_LARGE_HEADER_COMMON}; |
172 | u16 length; | ||
173 | u8 vendor_defined[1]; | ||
174 | }; | ||
175 | 181 | ||
176 | struct asl_memory_32_desc { | 182 | struct aml_resource_memory32 { |
177 | u8 descriptor_type; | 183 | AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; |
178 | u16 length; | 184 | u32 minimum; |
179 | u8 information; | 185 | u32 maximum; |
180 | u32 address_min; | ||
181 | u32 address_max; | ||
182 | u32 alignment; | 186 | u32 alignment; |
183 | u32 range_length; | 187 | u32 address_length; |
184 | }; | 188 | }; |
185 | 189 | ||
186 | struct asl_fixed_memory_32_desc { | 190 | struct aml_resource_fixed_memory32 { |
187 | u8 descriptor_type; | 191 | AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; |
188 | u16 length; | 192 | u32 address; |
189 | u8 information; | 193 | u32 address_length; |
190 | u32 base_address; | ||
191 | u32 range_length; | ||
192 | }; | 194 | }; |
193 | 195 | ||
194 | struct asl_extended_address_desc { | 196 | #define AML_RESOURCE_ADDRESS_COMMON \ |
195 | u8 descriptor_type; | 197 | u8 resource_type; \ |
196 | u16 length; | 198 | u8 flags; \ |
197 | u8 resource_type; | 199 | u8 specific_flags; |
198 | u8 flags; | 200 | |
199 | u8 specific_flags; | 201 | struct aml_resource_address { |
200 | u8 revision_iD; | 202 | AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON}; |
203 | |||
204 | struct aml_resource_extended_address64 { | ||
205 | AML_RESOURCE_LARGE_HEADER_COMMON | ||
206 | AML_RESOURCE_ADDRESS_COMMON u8 revision_iD; | ||
201 | u8 reserved; | 207 | u8 reserved; |
202 | u64 granularity; | 208 | u64 granularity; |
203 | u64 address_min; | 209 | u64 minimum; |
204 | u64 address_max; | 210 | u64 maximum; |
205 | u64 translation_offset; | 211 | u64 translation_offset; |
206 | u64 address_length; | 212 | u64 address_length; |
207 | u64 type_specific_attributes; | 213 | u64 type_specific; |
208 | u8 optional_fields[2]; /* Used for length calculation only */ | ||
209 | }; | 214 | }; |
210 | 215 | ||
211 | #define ASL_EXTENDED_ADDRESS_DESC_REVISION 1 /* ACPI 3.0 */ | 216 | #define AML_RESOURCE_EXTENDED_ADDRESS_REVISION 1 /* ACPI 3.0 */ |
212 | 217 | ||
213 | struct asl_qword_address_desc { | 218 | struct aml_resource_address64 { |
214 | u8 descriptor_type; | 219 | AML_RESOURCE_LARGE_HEADER_COMMON |
215 | u16 length; | 220 | AML_RESOURCE_ADDRESS_COMMON u64 granularity; |
216 | u8 resource_type; | 221 | u64 minimum; |
217 | u8 flags; | 222 | u64 maximum; |
218 | u8 specific_flags; | ||
219 | u64 granularity; | ||
220 | u64 address_min; | ||
221 | u64 address_max; | ||
222 | u64 translation_offset; | 223 | u64 translation_offset; |
223 | u64 address_length; | 224 | u64 address_length; |
224 | u8 optional_fields[2]; | ||
225 | }; | 225 | }; |
226 | 226 | ||
227 | struct asl_dword_address_desc { | 227 | struct aml_resource_address32 { |
228 | u8 descriptor_type; | 228 | AML_RESOURCE_LARGE_HEADER_COMMON |
229 | u16 length; | 229 | AML_RESOURCE_ADDRESS_COMMON u32 granularity; |
230 | u8 resource_type; | 230 | u32 minimum; |
231 | u8 flags; | 231 | u32 maximum; |
232 | u8 specific_flags; | ||
233 | u32 granularity; | ||
234 | u32 address_min; | ||
235 | u32 address_max; | ||
236 | u32 translation_offset; | 232 | u32 translation_offset; |
237 | u32 address_length; | 233 | u32 address_length; |
238 | u8 optional_fields[2]; | ||
239 | }; | 234 | }; |
240 | 235 | ||
241 | struct asl_word_address_desc { | 236 | struct aml_resource_address16 { |
242 | u8 descriptor_type; | 237 | AML_RESOURCE_LARGE_HEADER_COMMON |
243 | u16 length; | 238 | AML_RESOURCE_ADDRESS_COMMON u16 granularity; |
244 | u8 resource_type; | 239 | u16 minimum; |
245 | u8 flags; | 240 | u16 maximum; |
246 | u8 specific_flags; | ||
247 | u16 granularity; | ||
248 | u16 address_min; | ||
249 | u16 address_max; | ||
250 | u16 translation_offset; | 241 | u16 translation_offset; |
251 | u16 address_length; | 242 | u16 address_length; |
252 | u8 optional_fields[2]; | ||
253 | }; | 243 | }; |
254 | 244 | ||
255 | struct asl_extended_xrupt_desc { | 245 | struct aml_resource_extended_irq { |
256 | u8 descriptor_type; | 246 | AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; |
257 | u16 length; | 247 | u8 interrupt_count; |
258 | u8 flags; | 248 | u32 interrupts[1]; |
259 | u8 table_length; | ||
260 | u32 interrupt_number[1]; | ||
261 | /* res_source_index, res_source optional fields follow */ | 249 | /* res_source_index, res_source optional fields follow */ |
262 | }; | 250 | }; |
263 | 251 | ||
264 | struct asl_general_register_desc { | 252 | struct aml_resource_generic_register { |
265 | u8 descriptor_type; | 253 | AML_RESOURCE_LARGE_HEADER_COMMON u8 address_space_id; |
266 | u16 length; | ||
267 | u8 address_space_id; | ||
268 | u8 bit_width; | 254 | u8 bit_width; |
269 | u8 bit_offset; | 255 | u8 bit_offset; |
270 | u8 access_size; /* ACPI 3.0, was Reserved */ | 256 | u8 access_size; /* ACPI 3.0, was previously Reserved */ |
271 | u64 address; | 257 | u64 address; |
272 | }; | 258 | }; |
273 | 259 | ||
@@ -277,26 +263,39 @@ struct asl_general_register_desc { | |||
277 | 263 | ||
278 | /* Union of all resource descriptors, so we can allocate the worst case */ | 264 | /* Union of all resource descriptors, so we can allocate the worst case */ |
279 | 265 | ||
280 | union asl_resource_desc { | 266 | union aml_resource { |
281 | struct asl_irq_format_desc irq; | 267 | /* Descriptor headers */ |
282 | struct asl_dma_format_desc dma; | 268 | |
283 | struct asl_start_dependent_desc std; | 269 | struct aml_resource_small_header small_header; |
284 | struct asl_end_dependent_desc end; | 270 | struct aml_resource_large_header large_header; |
285 | struct asl_io_port_desc iop; | 271 | |
286 | struct asl_fixed_io_port_desc fio; | 272 | /* Small resource descriptors */ |
287 | struct asl_small_vendor_desc smv; | 273 | |
288 | struct asl_end_tag_desc et; | 274 | struct aml_resource_irq irq; |
289 | 275 | struct aml_resource_dma dma; | |
290 | struct asl_memory_24_desc M24; | 276 | struct aml_resource_start_dependent start_dpf; |
291 | struct asl_large_vendor_desc lgv; | 277 | struct aml_resource_end_dependent end_dpf; |
292 | struct asl_memory_32_desc M32; | 278 | struct aml_resource_io io; |
293 | struct asl_fixed_memory_32_desc F32; | 279 | struct aml_resource_fixed_io fixed_io; |
294 | struct asl_qword_address_desc qas; | 280 | struct aml_resource_vendor_small vendor_small; |
295 | struct asl_dword_address_desc das; | 281 | struct aml_resource_end_tag end_tag; |
296 | struct asl_word_address_desc was; | 282 | |
297 | struct asl_extended_address_desc eas; | 283 | /* Large resource descriptors */ |
298 | struct asl_extended_xrupt_desc exx; | 284 | |
299 | struct asl_general_register_desc grg; | 285 | struct aml_resource_memory24 memory24; |
286 | struct aml_resource_generic_register generic_reg; | ||
287 | struct aml_resource_vendor_large vendor_large; | ||
288 | struct aml_resource_memory32 memory32; | ||
289 | struct aml_resource_fixed_memory32 fixed_memory32; | ||
290 | struct aml_resource_address16 address16; | ||
291 | struct aml_resource_address32 address32; | ||
292 | struct aml_resource_address64 address64; | ||
293 | struct aml_resource_extended_address64 ext_address64; | ||
294 | struct aml_resource_extended_irq extended_irq; | ||
295 | |||
296 | /* Utility overlays */ | ||
297 | |||
298 | struct aml_resource_address address; | ||
300 | u32 u32_item; | 299 | u32 u32_item; |
301 | u16 u16_item; | 300 | u16 u16_item; |
302 | u8 U8item; | 301 | u8 U8item; |
diff --git a/include/acpi/pdc_intel.h b/include/acpi/pdc_intel.h index 91f4a12a99a1..3fa81d55cd0c 100644 --- a/include/acpi/pdc_intel.h +++ b/include/acpi/pdc_intel.h | |||
@@ -15,9 +15,7 @@ | |||
15 | #define ACPI_PDC_C_C1_FFH (0x0100) | 15 | #define ACPI_PDC_C_C1_FFH (0x0100) |
16 | 16 | ||
17 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ | 17 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ |
18 | ACPI_PDC_C_C1_HALT) | 18 | ACPI_PDC_C_C1_HALT | \ |
19 | |||
20 | #define ACPI_PDC_EST_CAPABILITY_SMP_MSR (ACPI_PDC_EST_CAPABILITY_SMP | \ | ||
21 | ACPI_PDC_P_FFH) | 19 | ACPI_PDC_P_FFH) |
22 | 20 | ||
23 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ | 21 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 16609c1ab2eb..223ec6467108 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -68,6 +68,7 @@ | |||
68 | #define ACPI_APPLICATION | 68 | #define ACPI_APPLICATION |
69 | #define ACPI_DEBUGGER | 69 | #define ACPI_DEBUGGER |
70 | #define ACPI_DISASSEMBLER | 70 | #define ACPI_DISASSEMBLER |
71 | #define ACPI_MUTEX_DEBUG | ||
71 | #endif | 72 | #endif |
72 | 73 | ||
73 | #ifdef ACPI_ASL_COMPILER | 74 | #ifdef ACPI_ASL_COMPILER |
@@ -148,6 +149,9 @@ | |||
148 | #elif defined(NETWARE) | 149 | #elif defined(NETWARE) |
149 | #include "acnetware.h" | 150 | #include "acnetware.h" |
150 | 151 | ||
152 | #elif defined(__sun) | ||
153 | #include "acsolaris.h" | ||
154 | |||
151 | #else | 155 | #else |
152 | 156 | ||
153 | /* All other environments */ | 157 | /* All other environments */ |
@@ -157,13 +161,6 @@ | |||
157 | #define COMPILER_DEPENDENT_INT64 long long | 161 | #define COMPILER_DEPENDENT_INT64 long long |
158 | #define COMPILER_DEPENDENT_UINT64 unsigned long long | 162 | #define COMPILER_DEPENDENT_UINT64 unsigned long long |
159 | 163 | ||
160 | /* | ||
161 | * This macro is used to tag functions as "printf-like" because | ||
162 | * some compilers can catch printf format string problems. MSVC | ||
163 | * doesn't, so this is proprocessed away. | ||
164 | */ | ||
165 | #define ACPI_PRINTF_LIKE_FUNC | ||
166 | |||
167 | #endif | 164 | #endif |
168 | 165 | ||
169 | /* | 166 | /* |
@@ -205,6 +202,8 @@ | |||
205 | * | 202 | * |
206 | *****************************************************************************/ | 203 | *****************************************************************************/ |
207 | 204 | ||
205 | #define ACPI_IS_ASCII(c) ((c) < 0x80) | ||
206 | |||
208 | #ifdef ACPI_USE_SYSTEM_CLIBRARY | 207 | #ifdef ACPI_USE_SYSTEM_CLIBRARY |
209 | /* | 208 | /* |
210 | * Use the standard C library headers. | 209 | * Use the standard C library headers. |
@@ -234,7 +233,7 @@ | |||
234 | #define ACPI_STRCAT(d,s) (void) strcat((d), (s)) | 233 | #define ACPI_STRCAT(d,s) (void) strcat((d), (s)) |
235 | #define ACPI_STRNCAT(d,s,n) strncat((d), (s), (acpi_size)(n)) | 234 | #define ACPI_STRNCAT(d,s,n) strncat((d), (s), (acpi_size)(n)) |
236 | #define ACPI_STRTOUL(d,s,n) strtoul((d), (s), (acpi_size)(n)) | 235 | #define ACPI_STRTOUL(d,s,n) strtoul((d), (s), (acpi_size)(n)) |
237 | #define ACPI_MEMCMP(s1,s2,n) memcmp((s1), (s2), (acpi_size)(n)) | 236 | #define ACPI_MEMCMP(s1,s2,n) memcmp((const char *)(s1), (const char *)(s2), (acpi_size)(n)) |
238 | #define ACPI_MEMCPY(d,s,n) (void) memcpy((d), (s), (acpi_size)(n)) | 237 | #define ACPI_MEMCPY(d,s,n) (void) memcpy((d), (s), (acpi_size)(n)) |
239 | #define ACPI_MEMSET(d,s,n) (void) memset((d), (s), (acpi_size)(n)) | 238 | #define ACPI_MEMSET(d,s,n) (void) memset((d), (s), (acpi_size)(n)) |
240 | 239 | ||
@@ -246,7 +245,6 @@ | |||
246 | #define ACPI_IS_UPPER(i) isupper((int) (i)) | 245 | #define ACPI_IS_UPPER(i) isupper((int) (i)) |
247 | #define ACPI_IS_PRINT(i) isprint((int) (i)) | 246 | #define ACPI_IS_PRINT(i) isprint((int) (i)) |
248 | #define ACPI_IS_ALPHA(i) isalpha((int) (i)) | 247 | #define ACPI_IS_ALPHA(i) isalpha((int) (i)) |
249 | #define ACPI_IS_ASCII(i) isascii((int) (i)) | ||
250 | 248 | ||
251 | #else | 249 | #else |
252 | 250 | ||
@@ -273,8 +271,8 @@ typedef char *va_list; | |||
273 | /* | 271 | /* |
274 | * Storage alignment properties | 272 | * Storage alignment properties |
275 | */ | 273 | */ |
276 | #define _AUPBND (sizeof (acpi_native_int) - 1) | 274 | #define _AUPBND (sizeof (acpi_native_uint) - 1) |
277 | #define _ADNBND (sizeof (acpi_native_int) - 1) | 275 | #define _ADNBND (sizeof (acpi_native_uint) - 1) |
278 | 276 | ||
279 | /* | 277 | /* |
280 | * Variable argument list macro definitions | 278 | * Variable argument list macro definitions |
@@ -296,7 +294,7 @@ typedef char *va_list; | |||
296 | #define ACPI_STRCAT(d,s) (void) acpi_ut_strcat ((d), (s)) | 294 | #define ACPI_STRCAT(d,s) (void) acpi_ut_strcat ((d), (s)) |
297 | #define ACPI_STRNCAT(d,s,n) acpi_ut_strncat ((d), (s), (acpi_size)(n)) | 295 | #define ACPI_STRNCAT(d,s,n) acpi_ut_strncat ((d), (s), (acpi_size)(n)) |
298 | #define ACPI_STRTOUL(d,s,n) acpi_ut_strtoul ((d), (s), (acpi_size)(n)) | 296 | #define ACPI_STRTOUL(d,s,n) acpi_ut_strtoul ((d), (s), (acpi_size)(n)) |
299 | #define ACPI_MEMCMP(s1,s2,n) acpi_ut_memcmp((s1), (s2), (acpi_size)(n)) | 297 | #define ACPI_MEMCMP(s1,s2,n) acpi_ut_memcmp((const char *)(s1), (const char *)(s2), (acpi_size)(n)) |
300 | #define ACPI_MEMCPY(d,s,n) (void) acpi_ut_memcpy ((d), (s), (acpi_size)(n)) | 298 | #define ACPI_MEMCPY(d,s,n) (void) acpi_ut_memcpy ((d), (s), (acpi_size)(n)) |
301 | #define ACPI_MEMSET(d,v,n) (void) acpi_ut_memset ((d), (v), (acpi_size)(n)) | 299 | #define ACPI_MEMSET(d,v,n) (void) acpi_ut_memset ((d), (v), (acpi_size)(n)) |
302 | #define ACPI_TOUPPER acpi_ut_to_upper | 300 | #define ACPI_TOUPPER acpi_ut_to_upper |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 4c0e0ba09ba0..da80933963db 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -48,12 +48,14 @@ | |||
48 | 48 | ||
49 | #define ACPI_GET_FUNCTION_NAME __FUNCTION__ | 49 | #define ACPI_GET_FUNCTION_NAME __FUNCTION__ |
50 | 50 | ||
51 | /* This macro is used to tag functions as "printf-like" because | 51 | /* |
52 | * This macro is used to tag functions as "printf-like" because | ||
52 | * some compilers (like GCC) can catch printf format string problems. | 53 | * some compilers (like GCC) can catch printf format string problems. |
53 | */ | 54 | */ |
54 | #define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 6, 7))) | 55 | #define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1))) |
55 | 56 | ||
56 | /* Some compilers complain about unused variables. Sometimes we don't want to | 57 | /* |
58 | * Some compilers complain about unused variables. Sometimes we don't want to | ||
57 | * use all the variables (for example, _acpi_module_name). This allows us | 59 | * use all the variables (for example, _acpi_module_name). This allows us |
58 | * to to tell the compiler warning in a per-variable manner that a variable | 60 | * to to tell the compiler warning in a per-variable manner that a variable |
59 | * is unused. | 61 | * is unused. |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index c93e6562f0e1..2e6d54569ee8 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -71,6 +71,10 @@ | |||
71 | #define acpi_cache_t kmem_cache_t | 71 | #define acpi_cache_t kmem_cache_t |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | /* Full namespace pathname length limit - arbitrary */ | ||
75 | |||
76 | #define ACPI_PATHNAME_MAX 256 | ||
77 | |||
74 | #else /* !__KERNEL__ */ | 78 | #else /* !__KERNEL__ */ |
75 | 79 | ||
76 | #include <stdarg.h> | 80 | #include <stdarg.h> |
@@ -98,4 +102,6 @@ | |||
98 | 102 | ||
99 | #include "acgcc.h" | 103 | #include "acgcc.h" |
100 | 104 | ||
105 | #define acpi_cpu_flags unsigned long | ||
106 | |||
101 | #endif /* __ACLINUX_H__ */ | 107 | #endif /* __ACLINUX_H__ */ |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 7a00d5089de9..badf0277b1be 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -62,9 +62,6 @@ struct acpi_processor_power { | |||
62 | u32 bm_activity; | 62 | u32 bm_activity; |
63 | int count; | 63 | int count; |
64 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; | 64 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; |
65 | |||
66 | /* the _PDC objects passed by the driver, if any */ | ||
67 | struct acpi_object_list *pdc; | ||
68 | }; | 65 | }; |
69 | 66 | ||
70 | /* Performance Management */ | 67 | /* Performance Management */ |
@@ -96,8 +93,6 @@ struct acpi_processor_performance { | |||
96 | unsigned int state_count; | 93 | unsigned int state_count; |
97 | struct acpi_processor_px *states; | 94 | struct acpi_processor_px *states; |
98 | 95 | ||
99 | /* the _PDC objects passed by the driver, if any */ | ||
100 | struct acpi_object_list *pdc; | ||
101 | }; | 96 | }; |
102 | 97 | ||
103 | /* Throttling Control */ | 98 | /* Throttling Control */ |
@@ -151,6 +146,9 @@ struct acpi_processor { | |||
151 | struct acpi_processor_performance *performance; | 146 | struct acpi_processor_performance *performance; |
152 | struct acpi_processor_throttling throttling; | 147 | struct acpi_processor_throttling throttling; |
153 | struct acpi_processor_limit limit; | 148 | struct acpi_processor_limit limit; |
149 | |||
150 | /* the _PDC objects for this processor, if any */ | ||
151 | struct acpi_object_list *pdc; | ||
154 | }; | 152 | }; |
155 | 153 | ||
156 | struct acpi_processor_errata { | 154 | struct acpi_processor_errata { |
@@ -178,22 +176,12 @@ int acpi_processor_notify_smm(struct module *calling_module); | |||
178 | extern struct acpi_processor *processors[NR_CPUS]; | 176 | extern struct acpi_processor *processors[NR_CPUS]; |
179 | extern struct acpi_processor_errata errata; | 177 | extern struct acpi_processor_errata errata; |
180 | 178 | ||
181 | int acpi_processor_set_pdc(struct acpi_processor *pr, | 179 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr); |
182 | struct acpi_object_list *pdc_in); | ||
183 | 180 | ||
184 | #ifdef ARCH_HAS_POWER_PDC_INIT | 181 | #ifdef ARCH_HAS_POWER_INIT |
185 | void acpi_processor_power_init_pdc(struct acpi_processor_power *pow, | ||
186 | unsigned int cpu); | ||
187 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | 182 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, |
188 | unsigned int cpu); | 183 | unsigned int cpu); |
189 | #else | 184 | #else |
190 | static inline void acpi_processor_power_init_pdc(struct acpi_processor_power | ||
191 | *pow, unsigned int cpu) | ||
192 | { | ||
193 | pow->pdc = NULL; | ||
194 | return; | ||
195 | } | ||
196 | |||
197 | static inline void acpi_processor_power_init_bm_check(struct | 185 | static inline void acpi_processor_power_init_bm_check(struct |
198 | acpi_processor_flags | 186 | acpi_processor_flags |
199 | *flags, unsigned int cpu) | 187 | *flags, unsigned int cpu) |
@@ -235,9 +223,6 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
235 | /* in processor_throttling.c */ | 223 | /* in processor_throttling.c */ |
236 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 224 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
237 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 225 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state); |
238 | ssize_t acpi_processor_write_throttling(struct file *file, | ||
239 | const char __user * buffer, | ||
240 | size_t count, loff_t * data); | ||
241 | extern struct file_operations acpi_processor_throttling_fops; | 226 | extern struct file_operations acpi_processor_throttling_fops; |
242 | 227 | ||
243 | /* in processor_idle.c */ | 228 | /* in processor_idle.c */ |
@@ -249,9 +234,6 @@ int acpi_processor_power_exit(struct acpi_processor *pr, | |||
249 | 234 | ||
250 | /* in processor_thermal.c */ | 235 | /* in processor_thermal.c */ |
251 | int acpi_processor_get_limit_info(struct acpi_processor *pr); | 236 | int acpi_processor_get_limit_info(struct acpi_processor *pr); |
252 | ssize_t acpi_processor_write_limit(struct file *file, | ||
253 | const char __user * buffer, | ||
254 | size_t count, loff_t * data); | ||
255 | extern struct file_operations acpi_processor_limit_fops; | 237 | extern struct file_operations acpi_processor_limit_fops; |
256 | 238 | ||
257 | #ifdef CONFIG_CPU_FREQ | 239 | #ifdef CONFIG_CPU_FREQ |
diff --git a/include/asm-alpha/dma-mapping.h b/include/asm-alpha/dma-mapping.h index 9dc7256cf979..62d0d6681aa9 100644 --- a/include/asm-alpha/dma-mapping.h +++ b/include/asm-alpha/dma-mapping.h | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #else /* no PCI - no IOMMU. */ | 31 | #else /* no PCI - no IOMMU. */ |
32 | 32 | ||
33 | struct scatterlist; | ||
33 | void *dma_alloc_coherent(struct device *dev, size_t size, | 34 | void *dma_alloc_coherent(struct device *dev, size_t size, |
34 | dma_addr_t *dma_handle, gfp_t gfp); | 35 | dma_addr_t *dma_handle, gfp_t gfp); |
35 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 36 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index abfbe45cd17c..5f8223e700d3 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -25,7 +25,7 @@ | |||
25 | .macro addruart, rx | 25 | .macro addruart, rx |
26 | mrc p15, 0, \rx, c1, c0 | 26 | mrc p15, 0, \rx, c1, c0 |
27 | tst \rx, #1 | 27 | tst \rx, #1 |
28 | ldreq \rx, = S3C2410_PA_UART | 28 | ldreq \rx, = S3C24XX_PA_UART |
29 | ldrne \rx, = S3C24XX_VA_UART | 29 | ldrne \rx, = S3C24XX_VA_UART |
30 | #if CONFIG_DEBUG_S3C2410_UART != 0 | 30 | #if CONFIG_DEBUG_S3C2410_UART != 0 |
31 | add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) | 31 | add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) |
@@ -44,7 +44,7 @@ | |||
44 | 1003: | 44 | 1003: |
45 | mrc p15, 0, \rd, c1, c0 | 45 | mrc p15, 0, \rd, c1, c0 |
46 | tst \rd, #1 | 46 | tst \rd, #1 |
47 | addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) | 47 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
48 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) | 48 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) |
49 | bic \rd, \rd, #0xff000 | 49 | bic \rd, \rd, #0xff000 |
50 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] | 50 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] |
@@ -75,7 +75,7 @@ | |||
75 | 1003: | 75 | 1003: |
76 | mrc p15, 0, \rd, c1, c0 | 76 | mrc p15, 0, \rd, c1, c0 |
77 | tst \rd, #1 | 77 | tst \rd, #1 |
78 | addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) | 78 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
79 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) | 79 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) |
80 | bic \rd, \rd, #0xff000 | 80 | bic \rd, \rd, #0xff000 |
81 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] | 81 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] |
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index 1833ea5c4220..c380d264a847 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h | |||
@@ -14,6 +14,7 @@ | |||
14 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out | 14 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out |
15 | * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv | 15 | * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv |
16 | * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names | 16 | * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names |
17 | * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources | ||
17 | */ | 18 | */ |
18 | 19 | ||
19 | #ifndef __ASM_ARCH_MAP_H | 20 | #ifndef __ASM_ARCH_MAP_H |
@@ -188,5 +189,42 @@ | |||
188 | 189 | ||
189 | #define S3C2400_SDRAM_PA (S3C2400_CS6) | 190 | #define S3C2400_SDRAM_PA (S3C2400_CS6) |
190 | 191 | ||
192 | /* Use a single interface for common resources between S3C24XX cpus */ | ||
193 | |||
194 | #ifdef CONFIG_CPU_S3C2400 | ||
195 | #define S3C24XX_PA_IRQ S3C2400_PA_IRQ | ||
196 | #define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL | ||
197 | #define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST | ||
198 | #define S3C24XX_PA_DMA S3C2400_PA_DMA | ||
199 | #define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR | ||
200 | #define S3C24XX_PA_LCD S3C2400_PA_LCD | ||
201 | #define S3C24XX_PA_UART S3C2400_PA_UART | ||
202 | #define S3C24XX_PA_TIMER S3C2400_PA_TIMER | ||
203 | #define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV | ||
204 | #define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG | ||
205 | #define S3C24XX_PA_IIC S3C2400_PA_IIC | ||
206 | #define S3C24XX_PA_IIS S3C2400_PA_IIS | ||
207 | #define S3C24XX_PA_GPIO S3C2400_PA_GPIO | ||
208 | #define S3C24XX_PA_RTC S3C2400_PA_RTC | ||
209 | #define S3C24XX_PA_ADC S3C2400_PA_ADC | ||
210 | #define S3C24XX_PA_SPI S3C2400_PA_SPI | ||
211 | #else | ||
212 | #define S3C24XX_PA_IRQ S3C2410_PA_IRQ | ||
213 | #define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL | ||
214 | #define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST | ||
215 | #define S3C24XX_PA_DMA S3C2410_PA_DMA | ||
216 | #define S3C24XX_PA_CLKPWR S3C2410_PA_CLKPWR | ||
217 | #define S3C24XX_PA_LCD S3C2410_PA_LCD | ||
218 | #define S3C24XX_PA_UART S3C2410_PA_UART | ||
219 | #define S3C24XX_PA_TIMER S3C2410_PA_TIMER | ||
220 | #define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV | ||
221 | #define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG | ||
222 | #define S3C24XX_PA_IIC S3C2410_PA_IIC | ||
223 | #define S3C24XX_PA_IIS S3C2410_PA_IIS | ||
224 | #define S3C24XX_PA_GPIO S3C2410_PA_GPIO | ||
225 | #define S3C24XX_PA_RTC S3C2410_PA_RTC | ||
226 | #define S3C24XX_PA_ADC S3C2410_PA_ADC | ||
227 | #define S3C24XX_PA_SPI S3C2410_PA_SPI | ||
228 | #endif | ||
191 | 229 | ||
192 | #endif /* __ASM_ARCH_MAP_H */ | 230 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index ce1bbbaad6d3..83b01254c4ac 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h | |||
@@ -39,9 +39,9 @@ | |||
39 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) | 39 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) |
40 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) | 40 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) |
41 | 41 | ||
42 | #define S3C2410_PA_UART0 (S3C2410_PA_UART) | 42 | #define S3C2410_PA_UART0 (S3C24XX_PA_UART) |
43 | #define S3C2410_PA_UART1 (S3C2410_PA_UART + 0x4000 ) | 43 | #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) |
44 | #define S3C2410_PA_UART2 (S3C2410_PA_UART + 0x8000 ) | 44 | #define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 ) |
45 | 45 | ||
46 | #define S3C2410_URXH (0x24) | 46 | #define S3C2410_URXH (0x24) |
47 | #define S3C2410_UTXH (0x20) | 47 | #define S3C2410_UTXH (0x20) |
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index ddd1578a7ee0..4367ec054b51 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
@@ -35,13 +35,13 @@ | |||
35 | #undef S3C2410_GPIOREG | 35 | #undef S3C2410_GPIOREG |
36 | #undef S3C2410_WDOGREG | 36 | #undef S3C2410_WDOGREG |
37 | 37 | ||
38 | #define S3C2410_GPIOREG(x) ((S3C2410_PA_GPIO + (x))) | 38 | #define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x))) |
39 | #define S3C2410_WDOGREG(x) ((S3C2410_PA_WATCHDOG + (x))) | 39 | #define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) |
40 | 40 | ||
41 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ | 41 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ |
42 | #define FIFO_MAX (14) | 42 | #define FIFO_MAX (14) |
43 | 43 | ||
44 | #define uart_base S3C2410_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) | 44 | #define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) |
45 | 45 | ||
46 | static __inline__ void | 46 | static __inline__ void |
47 | uart_wr(unsigned int reg, unsigned int val) | 47 | uart_wr(unsigned int reg, unsigned int val) |
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h index 3351b77fab36..e8ea67c97c73 100644 --- a/include/asm-arm/mach/map.h +++ b/include/asm-arm/mach/map.h | |||
@@ -26,6 +26,7 @@ struct meminfo; | |||
26 | #define MT_MEMORY 5 | 26 | #define MT_MEMORY 5 |
27 | #define MT_ROM 6 | 27 | #define MT_ROM 6 |
28 | #define MT_IXP2000_DEVICE 7 | 28 | #define MT_IXP2000_DEVICE 7 |
29 | #define MT_NONSHARED_DEVICE 8 | ||
29 | 30 | ||
30 | extern void create_memmap_holes(struct meminfo *); | 31 | extern void create_memmap_holes(struct meminfo *); |
31 | extern void memtable_init(struct meminfo *); | 32 | extern void memtable_init(struct meminfo *); |
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 5a0d19b466b0..70e00d08345e 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -168,6 +168,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
168 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | 168 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) |
169 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) | 169 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) |
170 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | 170 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) |
171 | #define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) | ||
171 | 172 | ||
172 | /* | 173 | /* |
173 | * - coarse table (not used) | 174 | * - coarse table (not used) |
diff --git a/include/asm-arm26/bitops.h b/include/asm-arm26/bitops.h index 15cc6f2da792..d87f8634e625 100644 --- a/include/asm-arm26/bitops.h +++ b/include/asm-arm26/bitops.h | |||
@@ -186,7 +186,7 @@ extern void _change_bit_le(int nr, volatile unsigned long * p); | |||
186 | extern int _test_and_set_bit_le(int nr, volatile unsigned long * p); | 186 | extern int _test_and_set_bit_le(int nr, volatile unsigned long * p); |
187 | extern int _test_and_clear_bit_le(int nr, volatile unsigned long * p); | 187 | extern int _test_and_clear_bit_le(int nr, volatile unsigned long * p); |
188 | extern int _test_and_change_bit_le(int nr, volatile unsigned long * p); | 188 | extern int _test_and_change_bit_le(int nr, volatile unsigned long * p); |
189 | extern int _find_first_zero_bit_le(void * p, unsigned size); | 189 | extern int _find_first_zero_bit_le(const unsigned long * p, unsigned size); |
190 | extern int _find_next_zero_bit_le(void * p, int size, int offset); | 190 | extern int _find_next_zero_bit_le(void * p, int size, int offset); |
191 | extern int _find_first_bit_le(const unsigned long *p, unsigned size); | 191 | extern int _find_first_bit_le(const unsigned long *p, unsigned size); |
192 | extern int _find_next_bit_le(const unsigned long *p, int size, int offset); | 192 | extern int _find_next_bit_le(const unsigned long *p, int size, int offset); |
@@ -326,7 +326,7 @@ static inline int sched_find_first_bit(unsigned long *b) | |||
326 | #define minix_test_and_clear_bit(nr,p) \ | 326 | #define minix_test_and_clear_bit(nr,p) \ |
327 | __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | 327 | __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) |
328 | #define minix_find_first_zero_bit(p,sz) \ | 328 | #define minix_find_first_zero_bit(p,sz) \ |
329 | _find_first_zero_bit_le(p,sz) | 329 | _find_first_zero_bit_le((unsigned long *)(p),sz) |
330 | 330 | ||
331 | #endif /* __KERNEL__ */ | 331 | #endif /* __KERNEL__ */ |
332 | 332 | ||
diff --git a/include/asm-arm26/hardirq.h b/include/asm-arm26/hardirq.h index dc28daab8aa8..87c19d2bb6a8 100644 --- a/include/asm-arm26/hardirq.h +++ b/include/asm-arm26/hardirq.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <linux/cache.h> | 5 | #include <linux/cache.h> |
6 | #include <linux/threads.h> | 6 | #include <linux/threads.h> |
7 | #include <asm/irq.h> | ||
7 | 8 | ||
8 | typedef struct { | 9 | typedef struct { |
9 | unsigned int __softirq_pending; | 10 | unsigned int __softirq_pending; |
@@ -26,13 +27,6 @@ typedef struct { | |||
26 | 27 | ||
27 | extern asmlinkage void __do_softirq(void); | 28 | extern asmlinkage void __do_softirq(void); |
28 | 29 | ||
29 | #define irq_exit() \ | ||
30 | do { \ | ||
31 | preempt_count() -= IRQ_EXIT_OFFSET; \ | ||
32 | if (!in_interrupt() && local_softirq_pending()) \ | ||
33 | __do_softirq(); \ | ||
34 | preempt_enable_no_resched(); \ | ||
35 | } while (0) | ||
36 | #endif | 30 | #endif |
37 | 31 | ||
38 | 32 | ||
diff --git a/include/asm-arm26/posix_types.h b/include/asm-arm26/posix_types.h index b88344ad390c..f8d1eb4f4cb1 100644 --- a/include/asm-arm26/posix_types.h +++ b/include/asm-arm26/posix_types.h | |||
@@ -44,6 +44,7 @@ typedef unsigned int __kernel_gid32_t; | |||
44 | 44 | ||
45 | typedef unsigned short __kernel_old_uid_t; | 45 | typedef unsigned short __kernel_old_uid_t; |
46 | typedef unsigned short __kernel_old_gid_t; | 46 | typedef unsigned short __kernel_old_gid_t; |
47 | typedef unsigned short __kernel_old_dev_t; | ||
47 | 48 | ||
48 | #ifdef __GNUC__ | 49 | #ifdef __GNUC__ |
49 | typedef long long __kernel_loff_t; | 50 | typedef long long __kernel_loff_t; |
diff --git a/include/asm-arm26/system.h b/include/asm-arm26/system.h index ca4ccfc4b578..702884926a55 100644 --- a/include/asm-arm26/system.h +++ b/include/asm-arm26/system.h | |||
@@ -98,9 +98,8 @@ extern unsigned int user_debug; | |||
98 | * spin_unlock_irq() and friends are implemented. This avoids | 98 | * spin_unlock_irq() and friends are implemented. This avoids |
99 | * us needlessly decrementing and incrementing the preempt count. | 99 | * us needlessly decrementing and incrementing the preempt count. |
100 | */ | 100 | */ |
101 | #define prepare_arch_switch(rq,next) local_irq_enable() | 101 | #define prepare_arch_switch(next) local_irq_enable() |
102 | #define finish_arch_switch(rq,prev) spin_unlock(&(rq)->lock) | 102 | #define finish_arch_switch(prev) spin_unlock(&(rq)->lock) |
103 | #define task_running(rq,p) ((rq)->curr == (p)) | ||
104 | 103 | ||
105 | /* | 104 | /* |
106 | * switch_to(prev, next) should switch from task `prev' to `next' | 105 | * switch_to(prev, next) should switch from task `prev' to `next' |
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index df4ed323aa4d..55059abf9c95 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -179,7 +179,7 @@ extern void acpi_reserve_bootmem(void); | |||
179 | 179 | ||
180 | extern u8 x86_acpiid_to_apicid[]; | 180 | extern u8 x86_acpiid_to_apicid[]; |
181 | 181 | ||
182 | #define ARCH_HAS_POWER_PDC_INIT 1 | 182 | #define ARCH_HAS_POWER_INIT 1 |
183 | 183 | ||
184 | #endif /*__KERNEL__*/ | 184 | #endif /*__KERNEL__*/ |
185 | 185 | ||
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index 73296d9924fb..997ca5d17876 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h | |||
@@ -110,10 +110,10 @@ extern int page_is_ram(unsigned long pagenr); | |||
110 | #endif /* __ASSEMBLY__ */ | 110 | #endif /* __ASSEMBLY__ */ |
111 | 111 | ||
112 | #ifdef __ASSEMBLY__ | 112 | #ifdef __ASSEMBLY__ |
113 | #define __PAGE_OFFSET (0xC0000000) | 113 | #define __PAGE_OFFSET CONFIG_PAGE_OFFSET |
114 | #define __PHYSICAL_START CONFIG_PHYSICAL_START | 114 | #define __PHYSICAL_START CONFIG_PHYSICAL_START |
115 | #else | 115 | #else |
116 | #define __PAGE_OFFSET (0xC0000000UL) | 116 | #define __PAGE_OFFSET ((unsigned long)CONFIG_PAGE_OFFSET) |
117 | #define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START) | 117 | #define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START) |
118 | #endif | 118 | #endif |
119 | #define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START) | 119 | #define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START) |
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h index e68a80853d5d..9ca642cad338 100644 --- a/include/asm-ia64/sn/sn_feature_sets.h +++ b/include/asm-ia64/sn/sn_feature_sets.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * License. See the file "COPYING" in the main directory of this archive | 8 | * License. See the file "COPYING" in the main directory of this archive |
9 | * for more details. | 9 | * for more details. |
10 | * | 10 | * |
11 | * Copyright (c) 2005 Silicon Graphics, Inc. All rights reserved. | 11 | * Copyright (c) 2005-2006 Silicon Graphics, Inc. All rights reserved. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | 14 | ||
@@ -27,14 +27,12 @@ extern int sn_prom_feature_available(int id); | |||
27 | * "false" for new features. | 27 | * "false" for new features. |
28 | * | 28 | * |
29 | * Use: | 29 | * Use: |
30 | * if (sn_prom_feature_available(PRF_FEATURE_XXX)) | 30 | * if (sn_prom_feature_available(PRF_XXX)) |
31 | * ... | 31 | * ... |
32 | */ | 32 | */ |
33 | 33 | ||
34 | /* | 34 | #define PRF_PAL_CACHE_FLUSH_SAFE 0 |
35 | * Example: feature XXX | 35 | #define PRF_DEVICE_FLUSH_LIST 1 |
36 | */ | ||
37 | #define PRF_FEATURE_XXX 0 | ||
38 | 36 | ||
39 | 37 | ||
40 | 38 | ||
@@ -51,7 +49,7 @@ extern int sn_prom_feature_available(int id); | |||
51 | * | 49 | * |
52 | * By default, features are disabled unless explicitly enabled. | 50 | * By default, features are disabled unless explicitly enabled. |
53 | */ | 51 | */ |
54 | #define OSF_MCA_SLV_TO_OS_INIT_SLV 0 | 52 | #define OSF_MCA_SLV_TO_OS_INIT_SLV 0 |
55 | #define OSF_FEAT_LOG_SBES 1 | 53 | #define OSF_FEAT_LOG_SBES 1 |
56 | 54 | ||
57 | #endif /* _ASM_IA64_SN_FEATURE_SETS_H */ | 55 | #endif /* _ASM_IA64_SN_FEATURE_SETS_H */ |
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h index 640a6459f2f4..bda2f217e6fe 100644 --- a/include/asm-powerpc/kexec.h +++ b/include/asm-powerpc/kexec.h | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #ifdef CONFIG_KEXEC | 34 | #ifdef CONFIG_KEXEC |
35 | 35 | ||
36 | #ifndef __ASSEMBLY__ | ||
36 | #ifdef __powerpc64__ | 37 | #ifdef __powerpc64__ |
37 | /* | 38 | /* |
38 | * This function is responsible for capturing register states if coming | 39 | * This function is responsible for capturing register states if coming |
@@ -104,7 +105,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs, | |||
104 | struct pt_regs *oldregs) { } | 105 | struct pt_regs *oldregs) { } |
105 | #endif /* !__powerpc64 __ */ | 106 | #endif /* !__powerpc64 __ */ |
106 | 107 | ||
107 | #ifndef __ASSEMBLY__ | ||
108 | #define MAX_NOTE_BYTES 1024 | 108 | #define MAX_NOTE_BYTES 1024 |
109 | 109 | ||
110 | #ifdef __powerpc64__ | 110 | #ifdef __powerpc64__ |
@@ -121,6 +121,8 @@ extern void default_machine_kexec(struct kimage *image); | |||
121 | extern int default_machine_kexec_prepare(struct kimage *image); | 121 | extern int default_machine_kexec_prepare(struct kimage *image); |
122 | extern void default_machine_crash_shutdown(struct pt_regs *regs); | 122 | extern void default_machine_crash_shutdown(struct pt_regs *regs); |
123 | 123 | ||
124 | extern void machine_kexec_simple(struct kimage *image); | ||
125 | |||
124 | #endif /* ! __ASSEMBLY__ */ | 126 | #endif /* ! __ASSEMBLY__ */ |
125 | #endif /* CONFIG_KEXEC */ | 127 | #endif /* CONFIG_KEXEC */ |
126 | #endif /* __KERNEL__ */ | 128 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/pmac_pfunc.h b/include/asm-powerpc/pmac_pfunc.h index d9728c80f86d..cef61304ffc2 100644 --- a/include/asm-powerpc/pmac_pfunc.h +++ b/include/asm-powerpc/pmac_pfunc.h | |||
@@ -167,6 +167,7 @@ struct pmf_irq_client { | |||
167 | void *data; | 167 | void *data; |
168 | struct module *owner; | 168 | struct module *owner; |
169 | struct list_head link; | 169 | struct list_head link; |
170 | struct pmf_function *func; | ||
170 | }; | 171 | }; |
171 | 172 | ||
172 | 173 | ||
@@ -187,9 +188,7 @@ extern int pmf_register_irq_client(struct device_node *np, | |||
187 | const char *name, | 188 | const char *name, |
188 | struct pmf_irq_client *client); | 189 | struct pmf_irq_client *client); |
189 | 190 | ||
190 | extern void pmf_unregister_irq_client(struct device_node *np, | 191 | extern void pmf_unregister_irq_client(struct pmf_irq_client *client); |
191 | const char *name, | ||
192 | struct pmf_irq_client *client); | ||
193 | 192 | ||
194 | /* | 193 | /* |
195 | * Called by the handlers when an irq happens | 194 | * Called by the handlers when an irq happens |
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h index 77b10d6adabd..1630c26e8f45 100644 --- a/include/asm-s390/dasd.h +++ b/include/asm-s390/dasd.h | |||
@@ -8,8 +8,6 @@ | |||
8 | * any future changes wrt the API will result in a change of the APIVERSION reported | 8 | * any future changes wrt the API will result in a change of the APIVERSION reported |
9 | * to userspace by the DASDAPIVER-ioctl | 9 | * to userspace by the DASDAPIVER-ioctl |
10 | * | 10 | * |
11 | * $Revision: 1.6 $ | ||
12 | * | ||
13 | */ | 11 | */ |
14 | 12 | ||
15 | #ifndef DASD_H | 13 | #ifndef DASD_H |
diff --git a/include/asm-s390/qdio.h b/include/asm-s390/qdio.h index 7bc15f0231db..a2f37a9353d3 100644 --- a/include/asm-s390/qdio.h +++ b/include/asm-s390/qdio.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #ifndef __QDIO_H__ | 11 | #ifndef __QDIO_H__ |
12 | #define __QDIO_H__ | 12 | #define __QDIO_H__ |
13 | 13 | ||
14 | #define VERSION_QDIO_H "$Revision: 1.57 $" | ||
15 | |||
16 | /* note, that most of the typedef's are from ingo. */ | 14 | /* note, that most of the typedef's are from ingo. */ |
17 | 15 | ||
18 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
diff --git a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h index f3797a52c4ea..8e0c7ed73d03 100644 --- a/include/asm-s390/thread_info.h +++ b/include/asm-s390/thread_info.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * include/asm-s390/thread_info.h | 2 | * include/asm-s390/thread_info.h |
3 | * | 3 | * |
4 | * S390 version | 4 | * S390 version |
5 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, IBM Corporation | 5 | * Copyright (C) IBM Corp. 2002,2006 |
6 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) | 6 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -88,7 +88,7 @@ static inline struct thread_info *current_thread_info(void) | |||
88 | * thread information flags bit numbers | 88 | * thread information flags bit numbers |
89 | */ | 89 | */ |
90 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 90 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
91 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 91 | #define TIF_RESTORE_SIGMASK 1 /* restore signal mask in do_signal() */ |
92 | #define TIF_SIGPENDING 2 /* signal pending */ | 92 | #define TIF_SIGPENDING 2 /* signal pending */ |
93 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 93 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
94 | #define TIF_RESTART_SVC 4 /* restart svc with new svc number */ | 94 | #define TIF_RESTART_SVC 4 /* restart svc with new svc number */ |
@@ -102,7 +102,7 @@ static inline struct thread_info *current_thread_info(void) | |||
102 | #define TIF_MEMDIE 19 | 102 | #define TIF_MEMDIE 19 |
103 | 103 | ||
104 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 104 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
105 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 105 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
106 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 106 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
107 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 107 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
108 | #define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC) | 108 | #define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC) |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 2861cdc243ad..29a9f357eb9e 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -279,8 +279,24 @@ | |||
279 | #define __NR_inotify_init 284 | 279 | #define __NR_inotify_init 284 |
280 | #define __NR_inotify_add_watch 285 | 280 | #define __NR_inotify_add_watch 285 |
281 | #define __NR_inotify_rm_watch 286 | 281 | #define __NR_inotify_rm_watch 286 |
282 | /* Number 287 is reserved for new sys_migrate_pages */ | ||
283 | #define __NR_openat 288 | ||
284 | #define __NR_mkdirat 289 | ||
285 | #define __NR_mknodat 290 | ||
286 | #define __NR_fchownat 291 | ||
287 | #define __NR_futimesat 292 | ||
288 | #define __NR_newfstatat 293 | ||
289 | #define __NR_unlinkat 294 | ||
290 | #define __NR_renameat 295 | ||
291 | #define __NR_linkat 296 | ||
292 | #define __NR_symlinkat 297 | ||
293 | #define __NR_readlinkat 298 | ||
294 | #define __NR_fchmodat 299 | ||
295 | #define __NR_faccessat 300 | ||
296 | #define __NR_pselect6 301 | ||
297 | #define __NR_ppoll 302 | ||
282 | 298 | ||
283 | #define NR_syscalls 287 | 299 | #define NR_syscalls 303 |
284 | 300 | ||
285 | /* | 301 | /* |
286 | * There are some system calls that are not present on 64 bit, some | 302 | * There are some system calls that are not present on 64 bit, some |
@@ -539,11 +555,15 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ | |||
539 | #define __ARCH_WANT_SYS_SIGPENDING | 555 | #define __ARCH_WANT_SYS_SIGPENDING |
540 | #define __ARCH_WANT_SYS_SIGPROCMASK | 556 | #define __ARCH_WANT_SYS_SIGPROCMASK |
541 | #define __ARCH_WANT_SYS_RT_SIGACTION | 557 | #define __ARCH_WANT_SYS_RT_SIGACTION |
558 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
542 | # ifndef CONFIG_64BIT | 559 | # ifndef CONFIG_64BIT |
543 | # define __ARCH_WANT_STAT64 | 560 | # define __ARCH_WANT_STAT64 |
544 | # define __ARCH_WANT_SYS_TIME | 561 | # define __ARCH_WANT_SYS_TIME |
545 | # endif | 562 | # endif |
546 | # define __ARCH_WANT_COMPAT_SYS_TIME | 563 | # ifdef CONFIG_COMPAT |
564 | # define __ARCH_WANT_COMPAT_SYS_TIME | ||
565 | # define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | ||
566 | # endif | ||
547 | #endif | 567 | #endif |
548 | 568 | ||
549 | #ifdef __KERNEL_SYSCALLS__ | 569 | #ifdef __KERNEL_SYSCALLS__ |
diff --git a/include/asm-sh/bus-sh.h b/include/asm-sh/bus-sh.h deleted file mode 100644 index e42d63b65cb5..000000000000 --- a/include/asm-sh/bus-sh.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/bus-sh.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #ifndef __ASM_SH_BUS_SH_H | ||
11 | #define __ASM_SH_BUS_SH_H | ||
12 | |||
13 | extern struct bus_type sh_bus_types[]; | ||
14 | |||
15 | struct sh_dev { | ||
16 | struct device dev; | ||
17 | char *name; | ||
18 | unsigned int dev_id; | ||
19 | unsigned int bus_id; | ||
20 | struct resource res; | ||
21 | void *mapbase; | ||
22 | unsigned int irq[6]; | ||
23 | u64 *dma_mask; | ||
24 | u64 coherent_dma_mask; | ||
25 | }; | ||
26 | |||
27 | #define to_sh_dev(d) container_of((d), struct sh_dev, dev) | ||
28 | |||
29 | #define sh_get_drvdata(d) dev_get_drvdata(&(d)->dev) | ||
30 | #define sh_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p)) | ||
31 | |||
32 | struct sh_driver { | ||
33 | struct device_driver drv; | ||
34 | unsigned int dev_id; | ||
35 | unsigned int bus_id; | ||
36 | int (*probe)(struct sh_dev *); | ||
37 | int (*remove)(struct sh_dev *); | ||
38 | int (*suspend)(struct sh_dev *, pm_message_t); | ||
39 | int (*resume)(struct sh_dev *); | ||
40 | }; | ||
41 | |||
42 | #define to_sh_driver(d) container_of((d), struct sh_driver, drv) | ||
43 | #define sh_name(d) ((d)->dev.driver->name) | ||
44 | |||
45 | /* | ||
46 | * Device ID numbers for bus types | ||
47 | */ | ||
48 | enum { | ||
49 | SH_DEV_ID_USB_OHCI, | ||
50 | }; | ||
51 | |||
52 | #define SH_NR_BUSES 1 | ||
53 | #define SH_BUS_NAME_VIRT "shbus" | ||
54 | |||
55 | enum { | ||
56 | SH_BUS_VIRT, | ||
57 | }; | ||
58 | |||
59 | /* arch/sh/kernel/cpu/bus.c */ | ||
60 | extern int sh_device_register(struct sh_dev *dev); | ||
61 | extern void sh_device_unregister(struct sh_dev *dev); | ||
62 | extern int sh_driver_register(struct sh_driver *drv); | ||
63 | extern void sh_driver_unregister(struct sh_driver *drv); | ||
64 | |||
65 | #endif /* __ASM_SH_BUS_SH_H */ | ||
66 | |||
diff --git a/include/asm-sh/cpu-sh3/mmu_context.h b/include/asm-sh/cpu-sh3/mmu_context.h index 5cfaa6bcf1ed..a844ea0965b6 100644 --- a/include/asm-sh/cpu-sh3/mmu_context.h +++ b/include/asm-sh/cpu-sh3/mmu_context.h | |||
@@ -24,5 +24,15 @@ | |||
24 | #define MMU_NTLB_WAYS 4 | 24 | #define MMU_NTLB_WAYS 4 |
25 | #define MMU_CONTROL_INIT 0x007 /* SV=0, TF=1, IX=1, AT=1 */ | 25 | #define MMU_CONTROL_INIT 0x007 /* SV=0, TF=1, IX=1, AT=1 */ |
26 | 26 | ||
27 | #define TRA 0xffffffd0 | ||
28 | #define EXPEVT 0xffffffd4 | ||
29 | |||
30 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | ||
31 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
32 | #define INTEVT 0xa4000000 /* INTEVTE2(0xa4000000) */ | ||
33 | #else | ||
34 | #define INTEVT 0xffffffd8 | ||
35 | #endif | ||
36 | |||
27 | #endif /* __ASM_CPU_SH3_MMU_CONTEXT_H */ | 37 | #endif /* __ASM_CPU_SH3_MMU_CONTEXT_H */ |
28 | 38 | ||
diff --git a/include/asm-sh/cpu-sh4/mmu_context.h b/include/asm-sh/cpu-sh4/mmu_context.h index 5b64d041f0b9..ff4c5fbbfaf0 100644 --- a/include/asm-sh/cpu-sh4/mmu_context.h +++ b/include/asm-sh/cpu-sh4/mmu_context.h | |||
@@ -23,7 +23,11 @@ | |||
23 | #define MMU_PAGE_ASSOC_BIT 0x80 | 23 | #define MMU_PAGE_ASSOC_BIT 0x80 |
24 | 24 | ||
25 | #define MMU_NTLB_ENTRIES 64 /* for 7750 */ | 25 | #define MMU_NTLB_ENTRIES 64 /* for 7750 */ |
26 | #ifdef CONFIG_SH_STORE_QUEUES | ||
27 | #define MMU_CONTROL_INIT 0x05 /* SQMD=0, SV=0, TI=1, AT=1 */ | ||
28 | #else | ||
26 | #define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */ | 29 | #define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */ |
30 | #endif | ||
27 | 31 | ||
28 | #define MMU_ITLB_DATA_ARRAY 0xF3000000 | 32 | #define MMU_ITLB_DATA_ARRAY 0xF3000000 |
29 | #define MMU_UTLB_DATA_ARRAY 0xF7000000 | 33 | #define MMU_UTLB_DATA_ARRAY 0xF7000000 |
@@ -35,5 +39,9 @@ | |||
35 | #define MMU_I_ENTRY_SHIFT 8 | 39 | #define MMU_I_ENTRY_SHIFT 8 |
36 | #define MMU_ITLB_VALID 0x100 | 40 | #define MMU_ITLB_VALID 0x100 |
37 | 41 | ||
42 | #define TRA 0xff000020 | ||
43 | #define EXPEVT 0xff000024 | ||
44 | #define INTEVT 0xff000028 | ||
45 | |||
38 | #endif /* __ASM_CPU_SH4_MMU_CONTEXT_H */ | 46 | #endif /* __ASM_CPU_SH4_MMU_CONTEXT_H */ |
39 | 47 | ||
diff --git a/include/asm-sh/ioctls.h b/include/asm-sh/ioctls.h index 1866f3f90028..9d84a2d445a2 100644 --- a/include/asm-sh/ioctls.h +++ b/include/asm-sh/ioctls.h | |||
@@ -94,6 +94,6 @@ | |||
94 | #define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* 0x545B */ /* Set multiport config */ | 94 | #define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* 0x545B */ /* Set multiport config */ |
95 | 95 | ||
96 | #define TIOCMIWAIT _IO('T', 92) /* 0x545C */ /* wait for a change on serial input line(s) */ | 96 | #define TIOCMIWAIT _IO('T', 92) /* 0x545C */ /* wait for a change on serial input line(s) */ |
97 | #define TIOCGICOUNT _IOR('T', 93, struct async_icount) /* 0x545D */ /* read serial port inline interrupt counts */ | 97 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ |
98 | 98 | ||
99 | #endif /* __ASM_SH_IOCTLS_H */ | 99 | #endif /* __ASM_SH_IOCTLS_H */ |
diff --git a/include/asm-sh/irq-sh73180.h b/include/asm-sh/irq-sh73180.h index bf2e4310ffac..d705252be260 100644 --- a/include/asm-sh/irq-sh73180.h +++ b/include/asm-sh/irq-sh73180.h | |||
@@ -25,11 +25,6 @@ | |||
25 | #undef DMA_IPR_POS | 25 | #undef DMA_IPR_POS |
26 | #undef DMA_PRIORITY | 26 | #undef DMA_PRIORITY |
27 | 27 | ||
28 | #undef NR_IRQS | ||
29 | |||
30 | #undef __irq_demux | ||
31 | #undef irq_demux | ||
32 | |||
33 | #undef INTC_IMCR0 | 28 | #undef INTC_IMCR0 |
34 | #undef INTC_IMCR1 | 29 | #undef INTC_IMCR1 |
35 | #undef INTC_IMCR2 | 30 | #undef INTC_IMCR2 |
@@ -229,33 +224,6 @@ | |||
229 | #define SIU_IPR_POS 1 | 224 | #define SIU_IPR_POS 1 |
230 | #define SIU_PRIORITY 3 | 225 | #define SIU_PRIORITY 3 |
231 | 226 | ||
232 | |||
233 | /* ONCHIP_NR_IRQS */ | ||
234 | #define NR_IRQS 109 | ||
235 | |||
236 | /* In a generic kernel, NR_IRQS is an upper bound, and we should use | ||
237 | * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value. | ||
238 | */ | ||
239 | #define ACTUAL_NR_IRQS NR_IRQS | ||
240 | |||
241 | |||
242 | extern void disable_irq(unsigned int); | ||
243 | extern void disable_irq_nosync(unsigned int); | ||
244 | extern void enable_irq(unsigned int); | ||
245 | |||
246 | /* | ||
247 | * Simple Mask Register Support | ||
248 | */ | ||
249 | extern void make_maskreg_irq(unsigned int irq); | ||
250 | extern unsigned short *irq_mask_register; | ||
251 | |||
252 | /* | ||
253 | * Function for "on chip support modules". | ||
254 | */ | ||
255 | extern void make_ipr_irq(unsigned int irq, unsigned int addr, | ||
256 | int pos, int priority); | ||
257 | extern void make_imask_irq(unsigned int irq); | ||
258 | |||
259 | #define PORT_PACR 0xA4050100UL | 227 | #define PORT_PACR 0xA4050100UL |
260 | #define PORT_PBCR 0xA4050102UL | 228 | #define PORT_PBCR 0xA4050102UL |
261 | #define PORT_PCCR 0xA4050104UL | 229 | #define PORT_PCCR 0xA4050104UL |
@@ -343,8 +311,6 @@ extern void make_imask_irq(unsigned int irq); | |||
343 | #define IRQ6_PRIORITY 1 | 311 | #define IRQ6_PRIORITY 1 |
344 | #define IRQ7_PRIORITY 1 | 312 | #define IRQ7_PRIORITY 1 |
345 | 313 | ||
346 | extern int shmse_irq_demux(int irq); | 314 | int shmse_irq_demux(int irq); |
347 | #define __irq_demux(irq) shmse_irq_demux(irq) | ||
348 | #define irq_demux(irq) __irq_demux(irq) | ||
349 | 315 | ||
350 | #endif /* __ASM_SH_IRQ_SH73180_H */ | 316 | #endif /* __ASM_SH_IRQ_SH73180_H */ |
diff --git a/include/asm-sh/irq-sh7780.h b/include/asm-sh/irq-sh7780.h index 8c8ca1281084..7f90315cd830 100644 --- a/include/asm-sh/irq-sh7780.h +++ b/include/asm-sh/irq-sh7780.h | |||
@@ -299,29 +299,6 @@ | |||
299 | #define GPIO_IPR_POS 2 | 299 | #define GPIO_IPR_POS 2 |
300 | #define GPIO_PRIORITY 3 | 300 | #define GPIO_PRIORITY 3 |
301 | 301 | ||
302 | /* ONCHIP_NR_IRQS */ | ||
303 | #define NR_IRQS 150 /* 111 + 16 */ | ||
304 | |||
305 | /* In a generic kernel, NR_IRQS is an upper bound, and we should use | ||
306 | * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value. | ||
307 | */ | ||
308 | #define ACTUAL_NR_IRQS NR_IRQS | ||
309 | |||
310 | extern void disable_irq(unsigned int); | ||
311 | extern void disable_irq_nosync(unsigned int); | ||
312 | extern void enable_irq(unsigned int); | ||
313 | |||
314 | /* | ||
315 | * Simple Mask Register Support | ||
316 | */ | ||
317 | extern void make_maskreg_irq(unsigned int irq); | ||
318 | extern unsigned short *irq_mask_register; | ||
319 | |||
320 | /* | ||
321 | * Function for "on chip support modules". | ||
322 | */ | ||
323 | extern void make_imask_irq(unsigned int irq); | ||
324 | |||
325 | #define INTC_TMU0_MSK 0 | 302 | #define INTC_TMU0_MSK 0 |
326 | #define INTC_TMU3_MSK 1 | 303 | #define INTC_TMU3_MSK 1 |
327 | #define INTC_RTC_MSK 2 | 304 | #define INTC_RTC_MSK 2 |
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index 060ec3c27207..42b8394c04ed 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -245,6 +245,7 @@ | |||
245 | #endif /* ST40STB1 */ | 245 | #endif /* ST40STB1 */ |
246 | 246 | ||
247 | #endif /* 775x / SH4-202 / ST40STB1 */ | 247 | #endif /* 775x / SH4-202 / ST40STB1 */ |
248 | #endif /* 7780 */ | ||
248 | 249 | ||
249 | /* NR_IRQS is made from three components: | 250 | /* NR_IRQS is made from three components: |
250 | * 1. ONCHIP_NR_IRQS - number of IRLS + on-chip peripherial modules | 251 | * 1. ONCHIP_NR_IRQS - number of IRLS + on-chip peripherial modules |
@@ -274,8 +275,11 @@ | |||
274 | # define ONCHIP_NR_IRQS 72 | 275 | # define ONCHIP_NR_IRQS 72 |
275 | #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) | 276 | #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) |
276 | # define ONCHIP_NR_IRQS 144 | 277 | # define ONCHIP_NR_IRQS 144 |
277 | #elif defined(CONFIG_CPU_SUBTYPE_SH7300) | 278 | #elif defined(CONFIG_CPU_SUBTYPE_SH7300) || \ |
279 | defined(CONFIG_CPU_SUBTYPE_SH73180) | ||
278 | # define ONCHIP_NR_IRQS 109 | 280 | # define ONCHIP_NR_IRQS 109 |
281 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) | ||
282 | # define ONCHIP_NR_IRQS 111 | ||
279 | #elif defined(CONFIG_SH_UNKNOWN) /* Most be last */ | 283 | #elif defined(CONFIG_SH_UNKNOWN) /* Most be last */ |
280 | # define ONCHIP_NR_IRQS 144 | 284 | # define ONCHIP_NR_IRQS 144 |
281 | #endif | 285 | #endif |
@@ -306,6 +310,8 @@ | |||
306 | # define OFFCHIP_NR_IRQS 96 | 310 | # define OFFCHIP_NR_IRQS 96 |
307 | #elif defined (CONFIG_SH_TITAN) | 311 | #elif defined (CONFIG_SH_TITAN) |
308 | # define OFFCHIP_NR_IRQS 4 | 312 | # define OFFCHIP_NR_IRQS 4 |
313 | #elif defined(CONFIG_SH_R7780RP) | ||
314 | # define OFFCHIP_NR_IRQS 16 | ||
309 | #elif defined(CONFIG_SH_UNKNOWN) | 315 | #elif defined(CONFIG_SH_UNKNOWN) |
310 | # define OFFCHIP_NR_IRQS 16 /* Must also be last */ | 316 | # define OFFCHIP_NR_IRQS 16 /* Must also be last */ |
311 | #else | 317 | #else |
@@ -550,7 +556,7 @@ extern int ipr_irq_demux(int irq); | |||
550 | #define INTC_ICR_IRLM (1<<7) | 556 | #define INTC_ICR_IRLM (1<<7) |
551 | #endif | 557 | #endif |
552 | 558 | ||
553 | #else | 559 | #ifdef CONFIG_CPU_SUBTYPE_SH7780 |
554 | #include <asm/irq-sh7780.h> | 560 | #include <asm/irq-sh7780.h> |
555 | #endif | 561 | #endif |
556 | 562 | ||
diff --git a/include/asm-sh/microdev/irq.h b/include/asm-sh/microdev.h index 47f6f77a65f0..018332a9e590 100644 --- a/include/asm-sh/microdev/irq.h +++ b/include/asm-sh/microdev.h | |||
@@ -1,32 +1,27 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-sh/irq_microdev.h | 2 | * linux/include/asm-sh/microdev.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) | 4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) |
5 | * | 5 | * |
6 | * IRQ functions for the SuperH SH4-202 MicroDev board. | 6 | * Definitions for the SuperH SH4-202 MicroDev board. |
7 | * | 7 | * |
8 | * May be copied or modified under the terms of the GNU General Public | 8 | * May be copied or modified under the terms of the GNU General Public |
9 | * License. See linux/COPYING for more information. | 9 | * License. See linux/COPYING for more information. |
10 | * | ||
11 | */ | 10 | */ |
12 | 11 | #ifndef __ASM_SH_MICRODEV_H | |
13 | 12 | #define __ASM_SH_MICRODEV_H | |
14 | #ifndef _ASM_SH_IRQ_MICRODEV_H | ||
15 | #define _ASM_SH_IRQ_MICRODEV_H | ||
16 | 13 | ||
17 | extern void init_microdev_irq(void); | 14 | extern void init_microdev_irq(void); |
18 | extern void microdev_print_fpga_intc_status(void); | 15 | extern void microdev_print_fpga_intc_status(void); |
19 | 16 | ||
20 | 17 | /* | |
21 | /* | 18 | * The following are useful macros for manipulating the interrupt |
22 | * The following are useful macros for manipulating the | 19 | * controller (INTC) on the CPU-board FPGA. should be noted that there |
23 | * interrupt controller (INTC) on the CPU-board FPGA. | 20 | * is an INTC on the FPGA, and a seperate INTC on the SH4-202 core - |
24 | * It should be noted that there is an INTC on the FPGA, | 21 | * these are two different things, both of which need to be prorammed to |
25 | * and a seperate INTC on the SH4-202 core - these are | 22 | * correctly route - unfortunately, they have the same name and |
26 | * two different things, both of which need to be prorammed | 23 | * abbreviations! |
27 | * to correctly route - unfortunately, they have the | 24 | */ |
28 | * same name and abbreviations! | ||
29 | */ | ||
30 | #define MICRODEV_FPGA_INTC_BASE 0xa6110000ul /* INTC base address on CPU-board FPGA */ | 25 | #define MICRODEV_FPGA_INTC_BASE 0xa6110000ul /* INTC base address on CPU-board FPGA */ |
31 | #define MICRODEV_FPGA_INTENB_REG (MICRODEV_FPGA_INTC_BASE+0ul) /* Interrupt Enable Register on INTC on CPU-board FPGA */ | 26 | #define MICRODEV_FPGA_INTENB_REG (MICRODEV_FPGA_INTC_BASE+0ul) /* Interrupt Enable Register on INTC on CPU-board FPGA */ |
32 | #define MICRODEV_FPGA_INTDSB_REG (MICRODEV_FPGA_INTC_BASE+8ul) /* Interrupt Disable Register on INTC on CPU-board FPGA */ | 27 | #define MICRODEV_FPGA_INTDSB_REG (MICRODEV_FPGA_INTC_BASE+8ul) /* Interrupt Disable Register on INTC on CPU-board FPGA */ |
@@ -38,10 +33,10 @@ extern void microdev_print_fpga_intc_status(void); | |||
38 | #define MICRODEV_FPGA_INTREQ_REG (MICRODEV_FPGA_INTC_BASE+0x38ul) /* Interrupt Request Register on INTC on CPU-board FPGA */ | 33 | #define MICRODEV_FPGA_INTREQ_REG (MICRODEV_FPGA_INTC_BASE+0x38ul) /* Interrupt Request Register on INTC on CPU-board FPGA */ |
39 | 34 | ||
40 | 35 | ||
41 | /* | 36 | /* |
42 | * The following are the IRQ numbers for the Linux Kernel for external interrupts. | 37 | * The following are the IRQ numbers for the Linux Kernel for external |
43 | * i.e. the numbers seen by 'cat /proc/interrupt'. | 38 | * interrupts. i.e. the numbers seen by 'cat /proc/interrupt'. |
44 | */ | 39 | */ |
45 | #define MICRODEV_LINUX_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ | 40 | #define MICRODEV_LINUX_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ |
46 | #define MICRODEV_LINUX_IRQ_SERIAL1 2 /* SuperIO Serial #1 */ | 41 | #define MICRODEV_LINUX_IRQ_SERIAL1 2 /* SuperIO Serial #1 */ |
47 | #define MICRODEV_LINUX_IRQ_ETHERNET 3 /* on-board Ethnernet */ | 42 | #define MICRODEV_LINUX_IRQ_ETHERNET 3 /* on-board Ethnernet */ |
@@ -51,10 +46,11 @@ extern void microdev_print_fpga_intc_status(void); | |||
51 | #define MICRODEV_LINUX_IRQ_IDE2 13 /* SuperIO IDE #2 */ | 46 | #define MICRODEV_LINUX_IRQ_IDE2 13 /* SuperIO IDE #2 */ |
52 | #define MICRODEV_LINUX_IRQ_IDE1 14 /* SuperIO IDE #1 */ | 47 | #define MICRODEV_LINUX_IRQ_IDE1 14 /* SuperIO IDE #1 */ |
53 | 48 | ||
54 | /* | 49 | /* |
55 | * The following are the IRQ numbers for the INTC on the FPGA for external interrupts. | 50 | * The following are the IRQ numbers for the INTC on the FPGA for |
56 | * i.e. the bits in the INTC registers in the FPGA. | 51 | * external interrupts. i.e. the bits in the INTC registers in the |
57 | */ | 52 | * FPGA. |
53 | */ | ||
58 | #define MICRODEV_FPGA_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ | 54 | #define MICRODEV_FPGA_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ |
59 | #define MICRODEV_FPGA_IRQ_SERIAL1 3 /* SuperIO Serial #1 */ | 55 | #define MICRODEV_FPGA_IRQ_SERIAL1 3 /* SuperIO Serial #1 */ |
60 | #define MICRODEV_FPGA_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ | 56 | #define MICRODEV_FPGA_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ |
@@ -69,4 +65,16 @@ extern void microdev_print_fpga_intc_status(void); | |||
69 | #define MICRODEV_IRQ_PCI_INTC 10 | 65 | #define MICRODEV_IRQ_PCI_INTC 10 |
70 | #define MICRODEV_IRQ_PCI_INTD 11 | 66 | #define MICRODEV_IRQ_PCI_INTD 11 |
71 | 67 | ||
72 | #endif /* _ASM_SH_IRQ_MICRODEV_H */ | 68 | #define __IO_PREFIX microdev |
69 | #include <asm/io_generic.h> | ||
70 | |||
71 | #if defined(CONFIG_PCI) | ||
72 | unsigned char microdev_pci_inb(unsigned long port); | ||
73 | unsigned short microdev_pci_inw(unsigned long port); | ||
74 | unsigned long microdev_pci_inl(unsigned long port); | ||
75 | void microdev_pci_outb(unsigned char data, unsigned long port); | ||
76 | void microdev_pci_outw(unsigned short data, unsigned long port); | ||
77 | void microdev_pci_outl(unsigned long data, unsigned long port); | ||
78 | #endif | ||
79 | |||
80 | #endif /* __ASM_SH_MICRODEV_H */ | ||
diff --git a/include/asm-sh/microdev/io.h b/include/asm-sh/microdev/io.h deleted file mode 100644 index f2ca4ac8c88a..000000000000 --- a/include/asm-sh/microdev/io.h +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-sh/io_microdev.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) | ||
5 | * | ||
6 | * IO functions for the SuperH SH4-202 MicroDev board. | ||
7 | * | ||
8 | * May be copied or modified under the terms of the GNU General Public | ||
9 | * License. See linux/COPYING for more information. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | |||
14 | #ifndef _ASM_SH_IO_MICRODEV_H | ||
15 | #define _ASM_SH_IO_MICRODEV_H | ||
16 | |||
17 | extern unsigned long microdev_isa_port2addr(unsigned long offset); | ||
18 | |||
19 | extern unsigned char microdev_inb(unsigned long port); | ||
20 | extern unsigned short microdev_inw(unsigned long port); | ||
21 | extern unsigned int microdev_inl(unsigned long port); | ||
22 | |||
23 | extern void microdev_outb(unsigned char value, unsigned long port); | ||
24 | extern void microdev_outw(unsigned short value, unsigned long port); | ||
25 | extern void microdev_outl(unsigned int value, unsigned long port); | ||
26 | |||
27 | extern unsigned char microdev_inb_p(unsigned long port); | ||
28 | extern unsigned short microdev_inw_p(unsigned long port); | ||
29 | extern unsigned int microdev_inl_p(unsigned long port); | ||
30 | |||
31 | extern void microdev_outb_p(unsigned char value, unsigned long port); | ||
32 | extern void microdev_outw_p(unsigned short value, unsigned long port); | ||
33 | extern void microdev_outl_p(unsigned int value, unsigned long port); | ||
34 | |||
35 | extern void microdev_insb(unsigned long port, void *addr, unsigned long count); | ||
36 | extern void microdev_insw(unsigned long port, void *addr, unsigned long count); | ||
37 | extern void microdev_insl(unsigned long port, void *addr, unsigned long count); | ||
38 | |||
39 | extern void microdev_outsb(unsigned long port, const void *addr, unsigned long count); | ||
40 | extern void microdev_outsw(unsigned long port, const void *addr, unsigned long count); | ||
41 | extern void microdev_outsl(unsigned long port, const void *addr, unsigned long count); | ||
42 | |||
43 | #if defined(CONFIG_PCI) | ||
44 | extern unsigned char microdev_pci_inb(unsigned long port); | ||
45 | extern unsigned short microdev_pci_inw(unsigned long port); | ||
46 | extern unsigned long microdev_pci_inl(unsigned long port); | ||
47 | extern void microdev_pci_outb(unsigned char data, unsigned long port); | ||
48 | extern void microdev_pci_outw(unsigned short data, unsigned long port); | ||
49 | extern void microdev_pci_outl(unsigned long data, unsigned long port); | ||
50 | #endif | ||
51 | |||
52 | #endif /* _ASM_SH_IO_MICRODEV_H */ | ||
53 | |||
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index c4904797d6df..fa5bd2d8803e 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/page.h> | 12 | #include <asm/page.h> |
13 | #include <asm/types.h> | 13 | #include <asm/types.h> |
14 | #include <asm/cache.h> | 14 | #include <asm/cache.h> |
15 | #include <linux/threads.h> | ||
16 | #include <asm/ptrace.h> | 15 | #include <asm/ptrace.h> |
17 | 16 | ||
18 | /* | 17 | /* |
@@ -30,7 +29,7 @@ | |||
30 | * CPU type and hardware bug flags. Kept separately for each CPU. | 29 | * CPU type and hardware bug flags. Kept separately for each CPU. |
31 | * | 30 | * |
32 | * Each one of these also needs a CONFIG_CPU_SUBTYPE_xxx entry | 31 | * Each one of these also needs a CONFIG_CPU_SUBTYPE_xxx entry |
33 | * in arch/sh/Kconfig, as well as an entry in arch/sh/kernel/setup.c | 32 | * in arch/sh/mm/Kconfig, as well as an entry in arch/sh/kernel/setup.c |
34 | * for parsing the subtype in get_cpu_subtype(). | 33 | * for parsing the subtype in get_cpu_subtype(). |
35 | */ | 34 | */ |
36 | enum cpu_type { | 35 | enum cpu_type { |
@@ -44,7 +43,7 @@ enum cpu_type { | |||
44 | /* SH-4 types */ | 43 | /* SH-4 types */ |
45 | CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, | 44 | CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, |
46 | CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, | 45 | CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, |
47 | CPU_SH73180, | 46 | CPU_SH73180, CPU_SH7770, CPU_SH7780, CPU_SH7781, |
48 | 47 | ||
49 | /* Unknown subtype */ | 48 | /* Unknown subtype */ |
50 | CPU_SH_NONE | 49 | CPU_SH_NONE |
@@ -52,14 +51,8 @@ enum cpu_type { | |||
52 | 51 | ||
53 | struct sh_cpuinfo { | 52 | struct sh_cpuinfo { |
54 | enum cpu_type type; | 53 | enum cpu_type type; |
55 | char hard_math; | ||
56 | unsigned long loops_per_jiffy; | 54 | unsigned long loops_per_jiffy; |
57 | 55 | ||
58 | unsigned int cpu_clock, master_clock, bus_clock, module_clock; | ||
59 | #ifdef CONFIG_CPU_SUBTYPE_ST40STB1 | ||
60 | unsigned int memory_clock; | ||
61 | #endif | ||
62 | |||
63 | struct cache_info icache; | 56 | struct cache_info icache; |
64 | struct cache_info dcache; | 57 | struct cache_info dcache; |
65 | 58 | ||
@@ -131,7 +124,7 @@ union sh_fpu_union { | |||
131 | struct sh_fpu_soft_struct soft; | 124 | struct sh_fpu_soft_struct soft; |
132 | }; | 125 | }; |
133 | 126 | ||
134 | /* | 127 | /* |
135 | * Processor flags | 128 | * Processor flags |
136 | */ | 129 | */ |
137 | 130 | ||
@@ -140,6 +133,7 @@ union sh_fpu_union { | |||
140 | #define CPU_HAS_MMU_PAGE_ASSOC 0x0004 /* SH3: TLB way selection bit support */ | 133 | #define CPU_HAS_MMU_PAGE_ASSOC 0x0004 /* SH3: TLB way selection bit support */ |
141 | #define CPU_HAS_DSP 0x0008 /* SH-DSP: DSP support */ | 134 | #define CPU_HAS_DSP 0x0008 /* SH-DSP: DSP support */ |
142 | #define CPU_HAS_PERF_COUNTER 0x0010 /* Hardware performance counters */ | 135 | #define CPU_HAS_PERF_COUNTER 0x0010 /* Hardware performance counters */ |
136 | #define CPU_HAS_PTEA 0x0020 /* PTEA register */ | ||
143 | 137 | ||
144 | struct thread_struct { | 138 | struct thread_struct { |
145 | unsigned long sp; | 139 | unsigned long sp; |
@@ -160,10 +154,10 @@ extern int ubc_usercnt; | |||
160 | #define INIT_THREAD { \ | 154 | #define INIT_THREAD { \ |
161 | sizeof(init_stack) + (long) &init_stack, /* sp */ \ | 155 | sizeof(init_stack) + (long) &init_stack, /* sp */ \ |
162 | 0, /* pc */ \ | 156 | 0, /* pc */ \ |
163 | 0, 0, \ | 157 | 0, 0, \ |
164 | 0, \ | 158 | 0, \ |
165 | 0, \ | 159 | 0, \ |
166 | {{{0,}},} /* fpu state */ \ | 160 | {{{0,}},} /* fpu state */ \ |
167 | } | 161 | } |
168 | 162 | ||
169 | /* | 163 | /* |
@@ -171,7 +165,7 @@ extern int ubc_usercnt; | |||
171 | */ | 165 | */ |
172 | #define start_thread(regs, new_pc, new_sp) \ | 166 | #define start_thread(regs, new_pc, new_sp) \ |
173 | set_fs(USER_DS); \ | 167 | set_fs(USER_DS); \ |
174 | regs->pr = 0; \ | 168 | regs->pr = 0; \ |
175 | regs->sr = SR_FD; /* User mode. */ \ | 169 | regs->sr = SR_FD; /* User mode. */ \ |
176 | regs->pc = new_pc; \ | 170 | regs->pc = new_pc; \ |
177 | regs->regs[15] = new_sp | 171 | regs->regs[15] = new_sp |
@@ -239,16 +233,16 @@ extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs); | |||
239 | #define save_fpu(tsk) do { } while (0) | 233 | #define save_fpu(tsk) do { } while (0) |
240 | #endif | 234 | #endif |
241 | 235 | ||
242 | #define unlazy_fpu(tsk, regs) do { \ | 236 | #define unlazy_fpu(tsk, regs) do { \ |
243 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ | 237 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ |
244 | save_fpu(tsk, regs); \ | 238 | save_fpu(tsk, regs); \ |
245 | } \ | 239 | } \ |
246 | } while (0) | 240 | } while (0) |
247 | 241 | ||
248 | #define clear_fpu(tsk, regs) do { \ | 242 | #define clear_fpu(tsk, regs) do { \ |
249 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ | 243 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ |
250 | clear_tsk_thread_flag(tsk, TIF_USEDFPU); \ | 244 | clear_tsk_thread_flag(tsk, TIF_USEDFPU); \ |
251 | release_fpu(regs); \ | 245 | release_fpu(regs); \ |
252 | } \ | 246 | } \ |
253 | } while (0) | 247 | } while (0) |
254 | 248 | ||
diff --git a/include/asm-sh64/ioctls.h b/include/asm-sh64/ioctls.h index 08f3c1f2e419..6b0c04f63c57 100644 --- a/include/asm-sh64/ioctls.h +++ b/include/asm-sh64/ioctls.h | |||
@@ -111,6 +111,6 @@ | |||
111 | #define TIOCSERSETMULTI 0x40a8545b /* _IOW('T', 91, struct serial_multiport_struct) 0x545B */ /* Set multiport config */ | 111 | #define TIOCSERSETMULTI 0x40a8545b /* _IOW('T', 91, struct serial_multiport_struct) 0x545B */ /* Set multiport config */ |
112 | 112 | ||
113 | #define TIOCMIWAIT 0x545c /* _IO('T', 92) wait for a change on serial input line(s) */ | 113 | #define TIOCMIWAIT 0x545c /* _IO('T', 92) wait for a change on serial input line(s) */ |
114 | #define TIOCGICOUNT 0x802c545d /* _IOR('T', 93, struct async_icount) 0x545D */ /* read serial port inline interrupt counts */ | 114 | #define TIOCGICOUNT 0x545d /* read serial port inline interrupt counts */ |
115 | 115 | ||
116 | #endif /* __ASM_SH64_IOCTLS_H */ | 116 | #endif /* __ASM_SH64_IOCTLS_H */ |
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h index ec85d12d73b9..508c416e9d6a 100644 --- a/include/asm-sparc64/spinlock.h +++ b/include/asm-sparc64/spinlock.h | |||
@@ -131,6 +131,28 @@ static void inline __read_lock(raw_rwlock_t *lock) | |||
131 | : "memory"); | 131 | : "memory"); |
132 | } | 132 | } |
133 | 133 | ||
134 | static int inline __read_trylock(raw_rwlock_t *lock) | ||
135 | { | ||
136 | int tmp1, tmp2; | ||
137 | |||
138 | __asm__ __volatile__ ( | ||
139 | "1: ldsw [%2], %0\n" | ||
140 | " brlz,a,pn %0, 2f\n" | ||
141 | " mov 0, %0\n" | ||
142 | " add %0, 1, %1\n" | ||
143 | " cas [%2], %0, %1\n" | ||
144 | " cmp %0, %1\n" | ||
145 | " membar #StoreLoad | #StoreStore\n" | ||
146 | " bne,pn %%icc, 1b\n" | ||
147 | " mov 1, %0\n" | ||
148 | "2:" | ||
149 | : "=&r" (tmp1), "=&r" (tmp2) | ||
150 | : "r" (lock) | ||
151 | : "memory"); | ||
152 | |||
153 | return tmp1; | ||
154 | } | ||
155 | |||
134 | static void inline __read_unlock(raw_rwlock_t *lock) | 156 | static void inline __read_unlock(raw_rwlock_t *lock) |
135 | { | 157 | { |
136 | unsigned long tmp1, tmp2; | 158 | unsigned long tmp1, tmp2; |
@@ -211,12 +233,12 @@ static int inline __write_trylock(raw_rwlock_t *lock) | |||
211 | } | 233 | } |
212 | 234 | ||
213 | #define __raw_read_lock(p) __read_lock(p) | 235 | #define __raw_read_lock(p) __read_lock(p) |
236 | #define __raw_read_trylock(p) __read_trylock(p) | ||
214 | #define __raw_read_unlock(p) __read_unlock(p) | 237 | #define __raw_read_unlock(p) __read_unlock(p) |
215 | #define __raw_write_lock(p) __write_lock(p) | 238 | #define __raw_write_lock(p) __write_lock(p) |
216 | #define __raw_write_unlock(p) __write_unlock(p) | 239 | #define __raw_write_unlock(p) __write_unlock(p) |
217 | #define __raw_write_trylock(p) __write_trylock(p) | 240 | #define __raw_write_trylock(p) __write_trylock(p) |
218 | 241 | ||
219 | #define __raw_read_trylock(lock) generic__raw_read_trylock(lock) | ||
220 | #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) | 242 | #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) |
221 | #define __raw_write_can_lock(rw) (!(rw)->lock) | 243 | #define __raw_write_can_lock(rw) (!(rw)->lock) |
222 | 244 | ||
diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/ldt-x86_64.h index 175722a91164..96b35aada79a 100644 --- a/include/asm-um/ldt-x86_64.h +++ b/include/asm-um/ldt-x86_64.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> | 5 | * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef __ASM_LDT_I386_H | 8 | #ifndef __ASM_LDT_X86_64_H |
9 | #define __ASM_LDT_I386_H | 9 | #define __ASM_LDT_X86_64_H |
10 | 10 | ||
11 | #include "asm/semaphore.h" | 11 | #include "asm/semaphore.h" |
12 | #include "asm/arch/ldt.h" | 12 | #include "asm/arch/ldt.h" |
@@ -39,11 +39,13 @@ typedef struct uml_ldt { | |||
39 | } uml_ldt_t; | 39 | } uml_ldt_t; |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * macros stolen from include/asm-i386/desc.h | 42 | * macros stolen from include/asm-x86_64/desc.h |
43 | */ | 43 | */ |
44 | #define LDT_entry_a(info) \ | 44 | #define LDT_entry_a(info) \ |
45 | ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) | 45 | ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) |
46 | 46 | ||
47 | /* Don't allow setting of the lm bit. It is useless anyways because | ||
48 | * 64bit system calls require __USER_CS. */ | ||
47 | #define LDT_entry_b(info) \ | 49 | #define LDT_entry_b(info) \ |
48 | (((info)->base_addr & 0xff000000) | \ | 50 | (((info)->base_addr & 0xff000000) | \ |
49 | (((info)->base_addr & 0x00ff0000) >> 16) | \ | 51 | (((info)->base_addr & 0x00ff0000) >> 16) | \ |
@@ -54,6 +56,7 @@ typedef struct uml_ldt { | |||
54 | ((info)->seg_32bit << 22) | \ | 56 | ((info)->seg_32bit << 22) | \ |
55 | ((info)->limit_in_pages << 23) | \ | 57 | ((info)->limit_in_pages << 23) | \ |
56 | ((info)->useable << 20) | \ | 58 | ((info)->useable << 20) | \ |
59 | /* ((info)->lm << 21) | */ \ | ||
57 | 0x7000) | 60 | 0x7000) |
58 | 61 | ||
59 | #define LDT_empty(info) (\ | 62 | #define LDT_empty(info) (\ |
@@ -64,6 +67,7 @@ typedef struct uml_ldt { | |||
64 | (info)->seg_32bit == 0 && \ | 67 | (info)->seg_32bit == 0 && \ |
65 | (info)->limit_in_pages == 0 && \ | 68 | (info)->limit_in_pages == 0 && \ |
66 | (info)->seg_not_present == 1 && \ | 69 | (info)->seg_not_present == 1 && \ |
67 | (info)->useable == 0 ) | 70 | (info)->useable == 0 && \ |
71 | (info)->lm == 0) | ||
68 | 72 | ||
69 | #endif | 73 | #endif |
diff --git a/include/asm-um/smp.h b/include/asm-um/smp.h index d879eba2b52c..aeda6657f366 100644 --- a/include/asm-um/smp.h +++ b/include/asm-um/smp.h | |||
@@ -23,6 +23,8 @@ extern inline void smp_cpus_done(unsigned int maxcpus) | |||
23 | { | 23 | { |
24 | } | 24 | } |
25 | 25 | ||
26 | extern struct task_struct *idle_threads[NR_CPUS]; | ||
27 | |||
26 | #endif | 28 | #endif |
27 | 29 | ||
28 | #endif | 30 | #endif |
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h index e87cd83a0e86..9afc0c7d3661 100644 --- a/include/asm-x86_64/ia32_unistd.h +++ b/include/asm-x86_64/ia32_unistd.h | |||
@@ -300,7 +300,7 @@ | |||
300 | #define __NR_ia32_inotify_add_watch 292 | 300 | #define __NR_ia32_inotify_add_watch 292 |
301 | #define __NR_ia32_inotify_rm_watch 293 | 301 | #define __NR_ia32_inotify_rm_watch 293 |
302 | #define __NR_ia32_migrate_pages 294 | 302 | #define __NR_ia32_migrate_pages 294 |
303 | #define __NR_ia32_opanat 295 | 303 | #define __NR_ia32_openat 295 |
304 | #define __NR_ia32_mkdirat 296 | 304 | #define __NR_ia32_mkdirat 296 |
305 | #define __NR_ia32_mknodat 297 | 305 | #define __NR_ia32_mknodat 297 |
306 | #define __NR_ia32_fchownat 298 | 306 | #define __NR_ia32_fchownat 298 |
diff --git a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h index 10248a9a0582..14fc3ddd9031 100644 --- a/include/asm-x86_64/mpspec.h +++ b/include/asm-x86_64/mpspec.h | |||
@@ -188,7 +188,7 @@ extern void mp_register_lapic_address (u64 address); | |||
188 | extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base); | 188 | extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base); |
189 | extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 gsi); | 189 | extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 gsi); |
190 | extern void mp_config_acpi_legacy_irqs (void); | 190 | extern void mp_config_acpi_legacy_irqs (void); |
191 | extern int mp_register_gsi (u32 gsi, int edge_level, int active_high_low); | 191 | extern int mp_register_gsi (u32 gsi, int triggering, int polarity); |
192 | #endif /*CONFIG_X86_IO_APIC*/ | 192 | #endif /*CONFIG_X86_IO_APIC*/ |
193 | #endif | 193 | #endif |
194 | 194 | ||
diff --git a/include/asm-xtensa/futex.h b/include/asm-xtensa/futex.h new file mode 100644 index 000000000000..0b745828f42b --- /dev/null +++ b/include/asm-xtensa/futex.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/futex.h> | |||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 026c3c011dc0..84d3d9f034ce 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -435,7 +435,7 @@ extern int sbf_port ; | |||
435 | 435 | ||
436 | #endif /* !CONFIG_ACPI */ | 436 | #endif /* !CONFIG_ACPI */ |
437 | 437 | ||
438 | int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); | 438 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); |
439 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 439 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
440 | 440 | ||
441 | /* | 441 | /* |
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h index 17a17c55a17f..6d59c8efe3be 100644 --- a/include/linux/agpgart.h +++ b/include/linux/agpgart.h | |||
@@ -111,6 +111,7 @@ typedef struct _agp_unbind { | |||
111 | } agp_unbind; | 111 | } agp_unbind; |
112 | 112 | ||
113 | #else /* __KERNEL__ */ | 113 | #else /* __KERNEL__ */ |
114 | #include <linux/mutex.h> | ||
114 | 115 | ||
115 | #define AGPGART_MINOR 175 | 116 | #define AGPGART_MINOR 175 |
116 | 117 | ||
@@ -201,7 +202,7 @@ struct agp_file_private { | |||
201 | }; | 202 | }; |
202 | 203 | ||
203 | struct agp_front_data { | 204 | struct agp_front_data { |
204 | struct semaphore agp_mutex; | 205 | struct mutex agp_mutex; |
205 | struct agp_controller *current_controller; | 206 | struct agp_controller *current_controller; |
206 | struct agp_controller *controllers; | 207 | struct agp_controller *controllers; |
207 | struct agp_file_private *file_priv_list; | 208 | struct agp_file_private *file_priv_list; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 02a585faa62c..860e7a485a5f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -392,8 +392,8 @@ struct request_queue | |||
392 | unsigned int nr_congestion_off; | 392 | unsigned int nr_congestion_off; |
393 | unsigned int nr_batching; | 393 | unsigned int nr_batching; |
394 | 394 | ||
395 | unsigned short max_sectors; | 395 | unsigned int max_sectors; |
396 | unsigned short max_hw_sectors; | 396 | unsigned int max_hw_sectors; |
397 | unsigned short max_phys_segments; | 397 | unsigned short max_phys_segments; |
398 | unsigned short max_hw_segments; | 398 | unsigned short max_hw_segments; |
399 | unsigned short hardsect_size; | 399 | unsigned short hardsect_size; |
@@ -697,7 +697,7 @@ extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *); | |||
697 | extern void blk_cleanup_queue(request_queue_t *); | 697 | extern void blk_cleanup_queue(request_queue_t *); |
698 | extern void blk_queue_make_request(request_queue_t *, make_request_fn *); | 698 | extern void blk_queue_make_request(request_queue_t *, make_request_fn *); |
699 | extern void blk_queue_bounce_limit(request_queue_t *, u64); | 699 | extern void blk_queue_bounce_limit(request_queue_t *, u64); |
700 | extern void blk_queue_max_sectors(request_queue_t *, unsigned short); | 700 | extern void blk_queue_max_sectors(request_queue_t *, unsigned int); |
701 | extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short); | 701 | extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short); |
702 | extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short); | 702 | extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short); |
703 | extern void blk_queue_max_segment_size(request_queue_t *, unsigned int); | 703 | extern void blk_queue_max_segment_size(request_queue_t *, unsigned int); |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c31650df9241..17866d7e2b71 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #ifndef _LINUX_CPUFREQ_H | 14 | #ifndef _LINUX_CPUFREQ_H |
15 | #define _LINUX_CPUFREQ_H | 15 | #define _LINUX_CPUFREQ_H |
16 | 16 | ||
17 | #include <linux/mutex.h> | ||
17 | #include <linux/config.h> | 18 | #include <linux/config.h> |
18 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
19 | #include <linux/threads.h> | 20 | #include <linux/threads.h> |
@@ -82,7 +83,7 @@ struct cpufreq_policy { | |||
82 | unsigned int policy; /* see above */ | 83 | unsigned int policy; /* see above */ |
83 | struct cpufreq_governor *governor; /* see below */ | 84 | struct cpufreq_governor *governor; /* see below */ |
84 | 85 | ||
85 | struct semaphore lock; /* CPU ->setpolicy or ->target may | 86 | struct mutex lock; /* CPU ->setpolicy or ->target may |
86 | only be called once a time */ | 87 | only be called once a time */ |
87 | 88 | ||
88 | struct work_struct update; /* if update_policy() needs to be | 89 | struct work_struct update; /* if update_policy() needs to be |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 83c7d207b80e..51e0e95a421a 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -91,7 +91,7 @@ struct target_type { | |||
91 | }; | 91 | }; |
92 | 92 | ||
93 | struct io_restrictions { | 93 | struct io_restrictions { |
94 | unsigned short max_sectors; | 94 | unsigned int max_sectors; |
95 | unsigned short max_phys_segments; | 95 | unsigned short max_phys_segments; |
96 | unsigned short max_hw_segments; | 96 | unsigned short max_hw_segments; |
97 | unsigned short hardsect_size; | 97 | unsigned short hardsect_size; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 84bb449b9b01..e059da947007 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -363,6 +363,8 @@ struct address_space_operations { | |||
363 | loff_t offset, unsigned long nr_segs); | 363 | loff_t offset, unsigned long nr_segs); |
364 | struct page* (*get_xip_page)(struct address_space *, sector_t, | 364 | struct page* (*get_xip_page)(struct address_space *, sector_t, |
365 | int); | 365 | int); |
366 | /* migrate the contents of a page to the specified target */ | ||
367 | int (*migratepage) (struct page *, struct page *); | ||
366 | }; | 368 | }; |
367 | 369 | ||
368 | struct backing_dev_info; | 370 | struct backing_dev_info; |
@@ -1719,6 +1721,12 @@ extern void simple_release_fs(struct vfsmount **mount, int *count); | |||
1719 | 1721 | ||
1720 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); | 1722 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); |
1721 | 1723 | ||
1724 | #ifdef CONFIG_MIGRATION | ||
1725 | extern int buffer_migrate_page(struct page *, struct page *); | ||
1726 | #else | ||
1727 | #define buffer_migrate_page NULL | ||
1728 | #endif | ||
1729 | |||
1722 | extern int inode_change_ok(struct inode *, struct iattr *); | 1730 | extern int inode_change_ok(struct inode *, struct iattr *); |
1723 | extern int __must_check inode_setattr(struct inode *, struct iattr *); | 1731 | extern int __must_check inode_setattr(struct inode *, struct iattr *); |
1724 | 1732 | ||
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 528959c52f1b..5425b60021e3 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #define FUSE_KERNEL_VERSION 7 | 14 | #define FUSE_KERNEL_VERSION 7 |
15 | 15 | ||
16 | /** Minor version number of this interface */ | 16 | /** Minor version number of this interface */ |
17 | #define FUSE_KERNEL_MINOR_VERSION 5 | 17 | #define FUSE_KERNEL_MINOR_VERSION 6 |
18 | 18 | ||
19 | /** The node ID of the root inode */ | 19 | /** The node ID of the root inode */ |
20 | #define FUSE_ROOT_ID 1 | 20 | #define FUSE_ROOT_ID 1 |
@@ -58,6 +58,9 @@ struct fuse_kstatfs { | |||
58 | __u32 spare[6]; | 58 | __u32 spare[6]; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | /** | ||
62 | * Bitmasks for fuse_setattr_in.valid | ||
63 | */ | ||
61 | #define FATTR_MODE (1 << 0) | 64 | #define FATTR_MODE (1 << 0) |
62 | #define FATTR_UID (1 << 1) | 65 | #define FATTR_UID (1 << 1) |
63 | #define FATTR_GID (1 << 2) | 66 | #define FATTR_GID (1 << 2) |
@@ -75,6 +78,11 @@ struct fuse_kstatfs { | |||
75 | #define FOPEN_DIRECT_IO (1 << 0) | 78 | #define FOPEN_DIRECT_IO (1 << 0) |
76 | #define FOPEN_KEEP_CACHE (1 << 1) | 79 | #define FOPEN_KEEP_CACHE (1 << 1) |
77 | 80 | ||
81 | /** | ||
82 | * INIT request/reply flags | ||
83 | */ | ||
84 | #define FUSE_ASYNC_READ (1 << 0) | ||
85 | |||
78 | enum fuse_opcode { | 86 | enum fuse_opcode { |
79 | FUSE_LOOKUP = 1, | 87 | FUSE_LOOKUP = 1, |
80 | FUSE_FORGET = 2, /* no reply */ | 88 | FUSE_FORGET = 2, /* no reply */ |
@@ -247,12 +255,16 @@ struct fuse_access_in { | |||
247 | struct fuse_init_in { | 255 | struct fuse_init_in { |
248 | __u32 major; | 256 | __u32 major; |
249 | __u32 minor; | 257 | __u32 minor; |
258 | __u32 max_readahead; | ||
259 | __u32 flags; | ||
250 | }; | 260 | }; |
251 | 261 | ||
252 | struct fuse_init_out { | 262 | struct fuse_init_out { |
253 | __u32 major; | 263 | __u32 major; |
254 | __u32 minor; | 264 | __u32 minor; |
255 | __u32 unused[3]; | 265 | __u32 max_readahead; |
266 | __u32 flags; | ||
267 | __u32 unused; | ||
256 | __u32 max_write; | 268 | __u32 max_write; |
257 | }; | 269 | }; |
258 | 270 | ||
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 089bfb1fa01a..6361544bb6ae 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -40,6 +40,7 @@ enum hrtimer_restart { | |||
40 | enum hrtimer_state { | 40 | enum hrtimer_state { |
41 | HRTIMER_INACTIVE, /* Timer is inactive */ | 41 | HRTIMER_INACTIVE, /* Timer is inactive */ |
42 | HRTIMER_EXPIRED, /* Timer is expired */ | 42 | HRTIMER_EXPIRED, /* Timer is expired */ |
43 | HRTIMER_RUNNING, /* Timer is running the callback function */ | ||
43 | HRTIMER_PENDING, /* Timer is pending */ | 44 | HRTIMER_PENDING, /* Timer is pending */ |
44 | }; | 45 | }; |
45 | 46 | ||
@@ -100,9 +101,8 @@ struct hrtimer_base { | |||
100 | /* Exported timer functions: */ | 101 | /* Exported timer functions: */ |
101 | 102 | ||
102 | /* Initialize timers: */ | 103 | /* Initialize timers: */ |
103 | extern void hrtimer_init(struct hrtimer *timer, const clockid_t which_clock); | 104 | extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock, |
104 | extern void hrtimer_rebase(struct hrtimer *timer, const clockid_t which_clock); | 105 | enum hrtimer_mode mode); |
105 | |||
106 | 106 | ||
107 | /* Basic timer operations: */ | 107 | /* Basic timer operations: */ |
108 | extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, | 108 | extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, |
diff --git a/include/linux/io.h b/include/linux/io.h new file mode 100644 index 000000000000..85533ec5aaa1 --- /dev/null +++ b/include/linux/io.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright 2006 PathScale, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This file is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of version 2 of the GNU General Public License | ||
6 | * as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software Foundation, | ||
15 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
16 | */ | ||
17 | |||
18 | #ifndef _LINUX_IO_H | ||
19 | #define _LINUX_IO_H | ||
20 | |||
21 | #include <asm/io.h> | ||
22 | |||
23 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); | ||
24 | |||
25 | #endif /* _LINUX_IO_H */ | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a5363324cf95..b49affa0ac5a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -185,6 +185,7 @@ extern enum system_states { | |||
185 | SYSTEM_HALT, | 185 | SYSTEM_HALT, |
186 | SYSTEM_POWER_OFF, | 186 | SYSTEM_POWER_OFF, |
187 | SYSTEM_RESTART, | 187 | SYSTEM_RESTART, |
188 | SYSTEM_SUSPEND_DISK, | ||
188 | } system_state; | 189 | } system_state; |
189 | 190 | ||
190 | #define TAINT_PROPRIETARY_MODULE (1<<0) | 191 | #define TAINT_PROPRIETARY_MODULE (1<<0) |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 1bd6552cc341..6aca67a569a2 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -10,6 +10,12 @@ | |||
10 | * | 10 | * |
11 | * Started by: Thomas Gleixner and Ingo Molnar | 11 | * Started by: Thomas Gleixner and Ingo Molnar |
12 | * | 12 | * |
13 | * Credits: | ||
14 | * | ||
15 | * Roman Zippel provided the ideas and primary code snippets of | ||
16 | * the ktime_t union and further simplifications of the original | ||
17 | * code. | ||
18 | * | ||
13 | * For licencing details see kernel-base/COPYING | 19 | * For licencing details see kernel-base/COPYING |
14 | */ | 20 | */ |
15 | #ifndef _LINUX_KTIME_H | 21 | #ifndef _LINUX_KTIME_H |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 93a849f742db..ebfc238cc243 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -91,10 +91,21 @@ struct per_cpu_pageset { | |||
91 | * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible | 91 | * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible |
92 | * combinations of zone modifiers in "zone modifier space". | 92 | * combinations of zone modifiers in "zone modifier space". |
93 | * | 93 | * |
94 | * As an optimisation any zone modifier bits which are only valid when | ||
95 | * no other zone modifier bits are set (loners) should be placed in | ||
96 | * the highest order bits of this field. This allows us to reduce the | ||
97 | * extent of the zonelists thus saving space. For example in the case | ||
98 | * of three zone modifier bits, we could require up to eight zonelists. | ||
99 | * If the left most zone modifier is a "loner" then the highest valid | ||
100 | * zonelist would be four allowing us to allocate only five zonelists. | ||
101 | * Use the first form for GFP_ZONETYPES when the left most bit is not | ||
102 | * a "loner", otherwise use the second. | ||
103 | * | ||
94 | * NOTE! Make sure this matches the zones in <linux/gfp.h> | 104 | * NOTE! Make sure this matches the zones in <linux/gfp.h> |
95 | */ | 105 | */ |
96 | #define GFP_ZONEMASK 0x07 | 106 | #define GFP_ZONEMASK 0x07 |
97 | #define GFP_ZONETYPES 5 | 107 | /* #define GFP_ZONETYPES (GFP_ZONEMASK + 1) */ /* Non-loner */ |
108 | #define GFP_ZONETYPES ((GFP_ZONEMASK + 1) / 2 + 1) /* Loner */ | ||
98 | 109 | ||
99 | /* | 110 | /* |
100 | * On machines where it is needed (eg PCs) we divide physical memory | 111 | * On machines where it is needed (eg PCs) we divide physical memory |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 59ff6c430cf6..6500d4e59d46 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -19,7 +19,21 @@ struct xt_get_revision | |||
19 | /* For standard target */ | 19 | /* For standard target */ |
20 | #define XT_RETURN (-NF_REPEAT - 1) | 20 | #define XT_RETURN (-NF_REPEAT - 1) |
21 | 21 | ||
22 | #define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1)) | 22 | /* this is a dummy structure to find out the alignment requirement for a struct |
23 | * containing all the fundamental data types that are used in ipt_entry, | ||
24 | * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my | ||
25 | * personal pleasure to remove it -HW | ||
26 | */ | ||
27 | struct _xt_align | ||
28 | { | ||
29 | u_int8_t u8; | ||
30 | u_int16_t u16; | ||
31 | u_int32_t u32; | ||
32 | u_int64_t u64; | ||
33 | }; | ||
34 | |||
35 | #define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \ | ||
36 | & ~(__alignof__(struct _xt_align)-1)) | ||
23 | 37 | ||
24 | /* Standard return verdict, or do jump. */ | 38 | /* Standard return verdict, or do jump. */ |
25 | #define XT_STANDARD_TARGET "" | 39 | #define XT_STANDARD_TARGET "" |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 0a44072383ec..fe1a2b02fc55 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -406,7 +406,6 @@ struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int devic | |||
406 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 406 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); |
407 | int pci_find_capability (struct pci_dev *dev, int cap); | 407 | int pci_find_capability (struct pci_dev *dev, int cap); |
408 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 408 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
409 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | ||
410 | struct pci_bus * pci_find_next_bus(const struct pci_bus *from); | 409 | struct pci_bus * pci_find_next_bus(const struct pci_bus *from); |
411 | 410 | ||
412 | struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); | 411 | struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); |
@@ -626,7 +625,6 @@ static inline int pci_register_driver(struct pci_driver *drv) { return 0;} | |||
626 | static inline void pci_unregister_driver(struct pci_driver *drv) { } | 625 | static inline void pci_unregister_driver(struct pci_driver *drv) { } |
627 | static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } | 626 | static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } |
628 | static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } | 627 | static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } |
629 | static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } | ||
630 | static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } | 628 | static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } |
631 | 629 | ||
632 | /* Power management related routines */ | 630 | /* Power management related routines */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ecc1fc1f0f04..b0b908f583c5 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -394,14 +394,9 @@ | |||
394 | #define PCI_DEVICE_ID_NS_SC1100_SMI 0x0511 | 394 | #define PCI_DEVICE_ID_NS_SC1100_SMI 0x0511 |
395 | #define PCI_DEVICE_ID_NS_SC1100_XBUS 0x0515 | 395 | #define PCI_DEVICE_ID_NS_SC1100_XBUS 0x0515 |
396 | #define PCI_DEVICE_ID_NS_87410 0xd001 | 396 | #define PCI_DEVICE_ID_NS_87410 0xd001 |
397 | #define PCI_DEVICE_ID_NS_CS5535_IDE 0x002d | ||
398 | 397 | ||
399 | #define PCI_DEVICE_ID_NS_CS5535_HOST_BRIDGE 0x0028 | 398 | #define PCI_DEVICE_ID_NS_CS5535_HOST_BRIDGE 0x0028 |
400 | #define PCI_DEVICE_ID_NS_CS5535_ISA_BRIDGE 0x002b | 399 | #define PCI_DEVICE_ID_NS_CS5535_ISA_BRIDGE 0x002b |
401 | #define PCI_DEVICE_ID_NS_CS5535_IDE 0x002d | ||
402 | #define PCI_DEVICE_ID_NS_CS5535_AUDIO 0x002e | ||
403 | #define PCI_DEVICE_ID_NS_CS5535_USB 0x002f | ||
404 | #define PCI_DEVICE_ID_NS_CS5535_VIDEO 0x0030 | ||
405 | 400 | ||
406 | #define PCI_VENDOR_ID_TSENG 0x100c | 401 | #define PCI_VENDOR_ID_TSENG 0x100c |
407 | #define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 | 402 | #define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 |
@@ -511,8 +506,6 @@ | |||
511 | #define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097 | 506 | #define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097 |
512 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A | 507 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A |
513 | 508 | ||
514 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A | ||
515 | |||
516 | #define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081 | 509 | #define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081 |
517 | #define PCI_DEVICE_ID_AMD_LX_AES 0x2082 | 510 | #define PCI_DEVICE_ID_AMD_LX_AES 0x2082 |
518 | 511 | ||
@@ -2065,6 +2058,7 @@ | |||
2065 | #define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5 | 2058 | #define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5 |
2066 | #define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6 | 2059 | #define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6 |
2067 | #define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db | 2060 | #define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db |
2061 | #define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd | ||
2068 | #define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1 | 2062 | #define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1 |
2069 | #define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2 | 2063 | #define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2 |
2070 | #define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4 | 2064 | #define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4 |
@@ -2085,6 +2079,8 @@ | |||
2085 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 | 2079 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 |
2086 | #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 | 2080 | #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 |
2087 | #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 | 2081 | #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 |
2082 | #define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27A0 | ||
2083 | #define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27A2 | ||
2088 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 | 2084 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 |
2089 | #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 | 2085 | #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 |
2090 | #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 | 2086 | #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 |
@@ -2104,6 +2100,13 @@ | |||
2104 | #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd | 2100 | #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd |
2105 | #define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de | 2101 | #define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de |
2106 | #define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df | 2102 | #define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df |
2103 | #define PCI_DEVICE_ID_INTEL_ICH8_0 0x2810 | ||
2104 | #define PCI_DEVICE_ID_INTEL_ICH8_1 0x2811 | ||
2105 | #define PCI_DEVICE_ID_INTEL_ICH8_2 0x2812 | ||
2106 | #define PCI_DEVICE_ID_INTEL_ICH8_3 0x2814 | ||
2107 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 | ||
2108 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e | ||
2109 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 | ||
2107 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 | 2110 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 |
2108 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 | 2111 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 |
2109 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 | 2112 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 |
@@ -2147,6 +2150,7 @@ | |||
2147 | #define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2 | 2150 | #define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2 |
2148 | #define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 | 2151 | #define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 |
2149 | #define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 | 2152 | #define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 |
2153 | #define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 | ||
2150 | #define PCI_DEVICE_ID_INTEL_82451NX 0x84ca | 2154 | #define PCI_DEVICE_ID_INTEL_82451NX 0x84ca |
2151 | #define PCI_DEVICE_ID_INTEL_82454NX 0x84cb | 2155 | #define PCI_DEVICE_ID_INTEL_82454NX 0x84cb |
2152 | #define PCI_DEVICE_ID_INTEL_84460GX 0x84ea | 2156 | #define PCI_DEVICE_ID_INTEL_84460GX 0x84ea |
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 54faf5236da0..95572c434bc9 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -84,7 +84,6 @@ struct k_clock { | |||
84 | void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock); | 84 | void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock); |
85 | 85 | ||
86 | /* error handlers for timer_create, nanosleep and settime */ | 86 | /* error handlers for timer_create, nanosleep and settime */ |
87 | int do_posix_clock_notimer_create(struct k_itimer *timer); | ||
88 | int do_posix_clock_nonanosleep(const clockid_t, int flags, struct timespec *, | 87 | int do_posix_clock_nonanosleep(const clockid_t, int flags, struct timespec *, |
89 | struct timespec __user *); | 88 | struct timespec __user *); |
90 | int do_posix_clock_nosettime(const clockid_t, struct timespec *tp); | 89 | int do_posix_clock_nosettime(const clockid_t, struct timespec *tp); |
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 7ab2cdb83ef0..015297ff73fa 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
@@ -60,8 +60,7 @@ extern void machine_crash_shutdown(struct pt_regs *); | |||
60 | */ | 60 | */ |
61 | 61 | ||
62 | extern void kernel_restart_prepare(char *cmd); | 62 | extern void kernel_restart_prepare(char *cmd); |
63 | extern void kernel_halt_prepare(void); | 63 | extern void kernel_shutdown_prepare(enum system_states state); |
64 | extern void kernel_power_off_prepare(void); | ||
65 | 64 | ||
66 | extern void kernel_restart(char *cmd); | 65 | extern void kernel_restart(char *cmd); |
67 | extern void kernel_halt(void); | 66 | extern void kernel_halt(void); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index e276c5ba2bb7..7d51149bd793 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1971,22 +1971,6 @@ extern struct file_operations reiserfs_file_operations; | |||
1971 | extern struct address_space_operations reiserfs_address_space_operations; | 1971 | extern struct address_space_operations reiserfs_address_space_operations; |
1972 | 1972 | ||
1973 | /* fix_nodes.c */ | 1973 | /* fix_nodes.c */ |
1974 | #ifdef CONFIG_REISERFS_CHECK | ||
1975 | void *reiserfs_kmalloc(size_t size, gfp_t flags, struct super_block *s); | ||
1976 | void reiserfs_kfree(const void *vp, size_t size, struct super_block *s); | ||
1977 | #else | ||
1978 | static inline void *reiserfs_kmalloc(size_t size, int flags, | ||
1979 | struct super_block *s) | ||
1980 | { | ||
1981 | return kmalloc(size, flags); | ||
1982 | } | ||
1983 | |||
1984 | static inline void reiserfs_kfree(const void *vp, size_t size, | ||
1985 | struct super_block *s) | ||
1986 | { | ||
1987 | kfree(vp); | ||
1988 | } | ||
1989 | #endif | ||
1990 | 1974 | ||
1991 | int fix_nodes(int n_op_mode, struct tree_balance *p_s_tb, | 1975 | int fix_nodes(int n_op_mode, struct tree_balance *p_s_tb, |
1992 | struct item_head *p_s_ins_ih, const void *); | 1976 | struct item_head *p_s_ins_ih, const void *); |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 3e68592e52e9..31b4c0bd4fa0 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -382,7 +382,6 @@ struct reiserfs_sb_info { | |||
382 | on-disk FS format */ | 382 | on-disk FS format */ |
383 | 383 | ||
384 | /* session statistics */ | 384 | /* session statistics */ |
385 | int s_kmallocs; | ||
386 | int s_disk_reads; | 385 | int s_disk_reads; |
387 | int s_disk_writes; | 386 | int s_disk_writes; |
388 | int s_fix_nodes; | 387 | int s_fix_nodes; |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index c84354e8374c..87280eb6083d 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -43,8 +43,6 @@ int reiserfs_delete_xattrs(struct inode *inode); | |||
43 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); | 43 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); |
44 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); | 44 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); |
45 | int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); | 45 | int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); |
46 | int reiserfs_permission_locked(struct inode *inode, int mask, | ||
47 | struct nameidata *nd); | ||
48 | 46 | ||
49 | int reiserfs_xattr_del(struct inode *, const char *); | 47 | int reiserfs_xattr_del(struct inode *, const char *); |
50 | int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); | 48 | int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 9d6fbeef2104..d6b9bcd1384c 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -91,7 +91,8 @@ static inline void page_dup_rmap(struct page *page) | |||
91 | * Called from mm/vmscan.c to handle paging out | 91 | * Called from mm/vmscan.c to handle paging out |
92 | */ | 92 | */ |
93 | int page_referenced(struct page *, int is_locked); | 93 | int page_referenced(struct page *, int is_locked); |
94 | int try_to_unmap(struct page *); | 94 | int try_to_unmap(struct page *, int ignore_refs); |
95 | void remove_from_swap(struct page *page); | ||
95 | 96 | ||
96 | /* | 97 | /* |
97 | * Called from mm/filemap_xip.c to unmap empty zero page | 98 | * Called from mm/filemap_xip.c to unmap empty zero page |
@@ -111,7 +112,7 @@ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *); | |||
111 | #define anon_vma_link(vma) do {} while (0) | 112 | #define anon_vma_link(vma) do {} while (0) |
112 | 113 | ||
113 | #define page_referenced(page,l) TestClearPageReferenced(page) | 114 | #define page_referenced(page,l) TestClearPageReferenced(page) |
114 | #define try_to_unmap(page) SWAP_FAIL | 115 | #define try_to_unmap(page, refs) SWAP_FAIL |
115 | 116 | ||
116 | #endif /* CONFIG_MMU */ | 117 | #endif /* CONFIG_MMU */ |
117 | 118 | ||
diff --git a/include/linux/security.h b/include/linux/security.h index ef753654daa5..bb1da86747c7 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -2617,6 +2617,25 @@ static inline int security_netlink_recv (struct sk_buff *skb) | |||
2617 | return cap_netlink_recv (skb); | 2617 | return cap_netlink_recv (skb); |
2618 | } | 2618 | } |
2619 | 2619 | ||
2620 | static inline struct dentry *securityfs_create_dir(const char *name, | ||
2621 | struct dentry *parent) | ||
2622 | { | ||
2623 | return ERR_PTR(-ENODEV); | ||
2624 | } | ||
2625 | |||
2626 | static inline struct dentry *securityfs_create_file(const char *name, | ||
2627 | mode_t mode, | ||
2628 | struct dentry *parent, | ||
2629 | void *data, | ||
2630 | struct file_operations *fops) | ||
2631 | { | ||
2632 | return ERR_PTR(-ENODEV); | ||
2633 | } | ||
2634 | |||
2635 | static inline void securityfs_remove(struct dentry *dentry) | ||
2636 | { | ||
2637 | } | ||
2638 | |||
2620 | #endif /* CONFIG_SECURITY */ | 2639 | #endif /* CONFIG_SECURITY */ |
2621 | 2640 | ||
2622 | #ifdef CONFIG_SECURITY_NETWORK | 2641 | #ifdef CONFIG_SECURITY_NETWORK |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index cee302aefdb7..73b464f0926a 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -26,7 +26,7 @@ struct plat_serial8250_port { | |||
26 | unsigned char regshift; /* register shift */ | 26 | unsigned char regshift; /* register shift */ |
27 | unsigned char iotype; /* UPIO_* */ | 27 | unsigned char iotype; /* UPIO_* */ |
28 | unsigned char hub6; | 28 | unsigned char hub6; |
29 | unsigned int flags; /* UPF_* flags */ | 29 | upf_t flags; /* UPF_* flags */ |
30 | }; | 30 | }; |
31 | 31 | ||
32 | /* | 32 | /* |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index ec351005bf9d..4041122dabfc 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -203,6 +203,8 @@ struct uart_icount { | |||
203 | __u32 buf_overrun; | 203 | __u32 buf_overrun; |
204 | }; | 204 | }; |
205 | 205 | ||
206 | typedef unsigned int __bitwise__ upf_t; | ||
207 | |||
206 | struct uart_port { | 208 | struct uart_port { |
207 | spinlock_t lock; /* port lock */ | 209 | spinlock_t lock; /* port lock */ |
208 | unsigned int iobase; /* in/out[bwl] */ | 210 | unsigned int iobase; /* in/out[bwl] */ |
@@ -230,36 +232,34 @@ struct uart_port { | |||
230 | unsigned long sysrq; /* sysrq timeout */ | 232 | unsigned long sysrq; /* sysrq timeout */ |
231 | #endif | 233 | #endif |
232 | 234 | ||
233 | unsigned int flags; | 235 | upf_t flags; |
234 | 236 | ||
235 | #define UPF_FOURPORT (1 << 1) | 237 | #define UPF_FOURPORT ((__force upf_t) (1 << 1)) |
236 | #define UPF_SAK (1 << 2) | 238 | #define UPF_SAK ((__force upf_t) (1 << 2)) |
237 | #define UPF_SPD_MASK (0x1030) | 239 | #define UPF_SPD_MASK ((__force upf_t) (0x1030)) |
238 | #define UPF_SPD_HI (0x0010) | 240 | #define UPF_SPD_HI ((__force upf_t) (0x0010)) |
239 | #define UPF_SPD_VHI (0x0020) | 241 | #define UPF_SPD_VHI ((__force upf_t) (0x0020)) |
240 | #define UPF_SPD_CUST (0x0030) | 242 | #define UPF_SPD_CUST ((__force upf_t) (0x0030)) |
241 | #define UPF_SPD_SHI (0x1000) | 243 | #define UPF_SPD_SHI ((__force upf_t) (0x1000)) |
242 | #define UPF_SPD_WARP (0x1010) | 244 | #define UPF_SPD_WARP ((__force upf_t) (0x1010)) |
243 | #define UPF_SKIP_TEST (1 << 6) | 245 | #define UPF_SKIP_TEST ((__force upf_t) (1 << 6)) |
244 | #define UPF_AUTO_IRQ (1 << 7) | 246 | #define UPF_AUTO_IRQ ((__force upf_t) (1 << 7)) |
245 | #define UPF_HARDPPS_CD (1 << 11) | 247 | #define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) |
246 | #define UPF_LOW_LATENCY (1 << 13) | 248 | #define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) |
247 | #define UPF_BUGGY_UART (1 << 14) | 249 | #define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) |
248 | #define UPF_AUTOPROBE (1 << 15) | 250 | #define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) |
249 | #define UPF_MAGIC_MULTIPLIER (1 << 16) | 251 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) |
250 | #define UPF_BOOT_ONLYMCA (1 << 22) | 252 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) |
251 | #define UPF_CONS_FLOW (1 << 23) | 253 | #define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) |
252 | #define UPF_SHARE_IRQ (1 << 24) | 254 | #define UPF_IOREMAP ((__force upf_t) (1 << 31)) |
253 | #define UPF_BOOT_AUTOCONF (1 << 28) | 255 | |
254 | #define UPF_IOREMAP (1 << 31) | 256 | #define UPF_CHANGE_MASK ((__force upf_t) (0x17fff)) |
255 | 257 | #define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY)) | |
256 | #define UPF_CHANGE_MASK (0x17fff) | ||
257 | #define UPF_USR_MASK (UPF_SPD_MASK|UPF_LOW_LATENCY) | ||
258 | 258 | ||
259 | unsigned int mctrl; /* current modem ctrl settings */ | 259 | unsigned int mctrl; /* current modem ctrl settings */ |
260 | unsigned int timeout; /* character-based timeout */ | 260 | unsigned int timeout; /* character-based timeout */ |
261 | unsigned int type; /* port type */ | 261 | unsigned int type; /* port type */ |
262 | struct uart_ops *ops; | 262 | const struct uart_ops *ops; |
263 | unsigned int custom_divisor; | 263 | unsigned int custom_divisor; |
264 | unsigned int line; /* port index */ | 264 | unsigned int line; /* port index */ |
265 | unsigned long mapbase; /* for ioremap */ | 265 | unsigned long mapbase; /* for ioremap */ |
@@ -289,6 +289,9 @@ struct uart_state { | |||
289 | }; | 289 | }; |
290 | 290 | ||
291 | #define UART_XMIT_SIZE PAGE_SIZE | 291 | #define UART_XMIT_SIZE PAGE_SIZE |
292 | |||
293 | typedef unsigned int __bitwise__ uif_t; | ||
294 | |||
292 | /* | 295 | /* |
293 | * This is the state information which is only valid when the port | 296 | * This is the state information which is only valid when the port |
294 | * is open; it may be freed by the core driver once the device has | 297 | * is open; it may be freed by the core driver once the device has |
@@ -298,17 +301,16 @@ struct uart_state { | |||
298 | struct uart_info { | 301 | struct uart_info { |
299 | struct tty_struct *tty; | 302 | struct tty_struct *tty; |
300 | struct circ_buf xmit; | 303 | struct circ_buf xmit; |
301 | unsigned int flags; | 304 | uif_t flags; |
302 | 305 | ||
303 | /* | 306 | /* |
304 | * These are the flags that specific to info->flags, and reflect our | 307 | * Definitions for info->flags. These are _private_ to serial_core, and |
305 | * internal state. They can not be accessed via port->flags. Low | 308 | * are specific to this structure. They may be queried by low level drivers. |
306 | * level drivers must not change these, but may query them instead. | ||
307 | */ | 309 | */ |
308 | #define UIF_CHECK_CD (1 << 25) | 310 | #define UIF_CHECK_CD ((__force uif_t) (1 << 25)) |
309 | #define UIF_CTS_FLOW (1 << 26) | 311 | #define UIF_CTS_FLOW ((__force uif_t) (1 << 26)) |
310 | #define UIF_NORMAL_ACTIVE (1 << 29) | 312 | #define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29)) |
311 | #define UIF_INITIALIZED (1 << 31) | 313 | #define UIF_INITIALIZED ((__force uif_t) (1 << 31)) |
312 | 314 | ||
313 | int blocked_open; | 315 | int blocked_open; |
314 | 316 | ||
@@ -430,7 +432,7 @@ static inline int uart_handle_break(struct uart_port *port) | |||
430 | port->sysrq = 0; | 432 | port->sysrq = 0; |
431 | } | 433 | } |
432 | #endif | 434 | #endif |
433 | if (info->flags & UPF_SAK) | 435 | if (port->flags & UPF_SAK) |
434 | do_SAK(info->tty); | 436 | do_SAK(info->tty); |
435 | return 0; | 437 | return 0; |
436 | } | 438 | } |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 1fb77a9cc148..8cf52939d0ab 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -76,7 +76,14 @@ struct cache_sizes { | |||
76 | kmem_cache_t *cs_dmacachep; | 76 | kmem_cache_t *cs_dmacachep; |
77 | }; | 77 | }; |
78 | extern struct cache_sizes malloc_sizes[]; | 78 | extern struct cache_sizes malloc_sizes[]; |
79 | |||
80 | #ifndef CONFIG_DEBUG_SLAB | ||
79 | extern void *__kmalloc(size_t, gfp_t); | 81 | extern void *__kmalloc(size_t, gfp_t); |
82 | #else | ||
83 | extern void *__kmalloc_track_caller(size_t, gfp_t, void*); | ||
84 | #define __kmalloc(size, flags) \ | ||
85 | __kmalloc_track_caller(size, flags, __builtin_return_address(0)) | ||
86 | #endif | ||
80 | 87 | ||
81 | static inline void *kmalloc(size_t size, gfp_t flags) | 88 | static inline void *kmalloc(size_t size, gfp_t flags) |
82 | { | 89 | { |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 4a99e4a7fbf3..f3e17d5963c3 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -178,6 +178,7 @@ extern int vm_swappiness; | |||
178 | 178 | ||
179 | #ifdef CONFIG_NUMA | 179 | #ifdef CONFIG_NUMA |
180 | extern int zone_reclaim_mode; | 180 | extern int zone_reclaim_mode; |
181 | extern int zone_reclaim_interval; | ||
181 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); | 182 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); |
182 | #else | 183 | #else |
183 | #define zone_reclaim_mode 0 | 184 | #define zone_reclaim_mode 0 |
@@ -190,13 +191,20 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) | |||
190 | #ifdef CONFIG_MIGRATION | 191 | #ifdef CONFIG_MIGRATION |
191 | extern int isolate_lru_page(struct page *p); | 192 | extern int isolate_lru_page(struct page *p); |
192 | extern int putback_lru_pages(struct list_head *l); | 193 | extern int putback_lru_pages(struct list_head *l); |
194 | extern int migrate_page(struct page *, struct page *); | ||
195 | extern void migrate_page_copy(struct page *, struct page *); | ||
196 | extern int migrate_page_remove_references(struct page *, struct page *, int); | ||
193 | extern int migrate_pages(struct list_head *l, struct list_head *t, | 197 | extern int migrate_pages(struct list_head *l, struct list_head *t, |
194 | struct list_head *moved, struct list_head *failed); | 198 | struct list_head *moved, struct list_head *failed); |
199 | extern int fail_migrate_page(struct page *, struct page *); | ||
195 | #else | 200 | #else |
196 | static inline int isolate_lru_page(struct page *p) { return -ENOSYS; } | 201 | static inline int isolate_lru_page(struct page *p) { return -ENOSYS; } |
197 | static inline int putback_lru_pages(struct list_head *l) { return 0; } | 202 | static inline int putback_lru_pages(struct list_head *l) { return 0; } |
198 | static inline int migrate_pages(struct list_head *l, struct list_head *t, | 203 | static inline int migrate_pages(struct list_head *l, struct list_head *t, |
199 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } | 204 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } |
205 | /* Possible settings for the migrate_page() method in address_operations */ | ||
206 | #define migrate_page NULL | ||
207 | #define fail_migrate_page NULL | ||
200 | #endif | 208 | #endif |
201 | 209 | ||
202 | #ifdef CONFIG_MMU | 210 | #ifdef CONFIG_MMU |
@@ -245,6 +253,7 @@ extern int remove_exclusive_swap_page(struct page *); | |||
245 | struct backing_dev_info; | 253 | struct backing_dev_info; |
246 | 254 | ||
247 | extern spinlock_t swap_lock; | 255 | extern spinlock_t swap_lock; |
256 | extern int remove_vma_swap(struct vm_area_struct *vma, struct page *page); | ||
248 | 257 | ||
249 | /* linux/mm/thrash.c */ | 258 | /* linux/mm/thrash.c */ |
250 | extern struct mm_struct * swap_token_mm; | 259 | extern struct mm_struct * swap_token_mm; |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index e666d6070569..3877209d23c3 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -50,6 +50,8 @@ struct timezone; | |||
50 | struct tms; | 50 | struct tms; |
51 | struct utimbuf; | 51 | struct utimbuf; |
52 | struct mq_attr; | 52 | struct mq_attr; |
53 | struct compat_stat; | ||
54 | struct compat_timeval; | ||
53 | 55 | ||
54 | #include <linux/config.h> | 56 | #include <linux/config.h> |
55 | #include <linux/types.h> | 57 | #include <linux/types.h> |
@@ -534,4 +536,35 @@ asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, | |||
534 | asmlinkage long sys_spu_create(const char __user *name, | 536 | asmlinkage long sys_spu_create(const char __user *name, |
535 | unsigned int flags, mode_t mode); | 537 | unsigned int flags, mode_t mode); |
536 | 538 | ||
539 | asmlinkage long sys_mknodat(int dfd, const char __user * filename, int mode, | ||
540 | unsigned dev); | ||
541 | asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, int mode); | ||
542 | asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag); | ||
543 | asmlinkage long sys_symlinkat(const char __user * oldname, | ||
544 | int newdfd, const char __user * newname); | ||
545 | asmlinkage long sys_linkat(int olddfd, const char __user *oldname, | ||
546 | int newdfd, const char __user *newname); | ||
547 | asmlinkage long sys_renameat(int olddfd, const char __user * oldname, | ||
548 | int newdfd, const char __user * newname); | ||
549 | asmlinkage long sys_futimesat(int dfd, char __user *filename, | ||
550 | struct timeval __user *utimes); | ||
551 | asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode); | ||
552 | asmlinkage long sys_fchmodat(int dfd, const char __user * filename, | ||
553 | mode_t mode); | ||
554 | asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user, | ||
555 | gid_t group, int flag); | ||
556 | asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, | ||
557 | int mode); | ||
558 | asmlinkage long sys_newfstatat(int dfd, char __user *filename, | ||
559 | struct stat __user *statbuf, int flag); | ||
560 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, | ||
561 | int bufsiz); | ||
562 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, | ||
563 | struct compat_timeval __user *t); | ||
564 | asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | ||
565 | struct compat_stat __user *statbuf, | ||
566 | int flag); | ||
567 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | ||
568 | int flags, int mode); | ||
569 | |||
537 | #endif | 570 | #endif |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 8352a7ce5895..32a4139c4ad8 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -182,7 +182,8 @@ enum | |||
182 | VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ | 182 | VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ |
183 | VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */ | 183 | VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */ |
184 | VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ | 184 | VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ |
185 | VM_ZONE_RECLAIM_MODE=31,/* reclaim local zone memory before going off node */ | 185 | VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ |
186 | VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ | ||
186 | }; | 187 | }; |
187 | 188 | ||
188 | 189 | ||
diff --git a/include/linux/time.h b/include/linux/time.h index 614dd8465839..7b4dc36532bb 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -48,7 +48,7 @@ extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); | |||
48 | * Returns true if the timespec is norm, false if denorm: | 48 | * Returns true if the timespec is norm, false if denorm: |
49 | */ | 49 | */ |
50 | #define timespec_valid(ts) \ | 50 | #define timespec_valid(ts) \ |
51 | (((ts)->tv_sec >= 0) && (((unsigned) (ts)->tv_nsec) < NSEC_PER_SEC)) | 51 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * 64-bit nanosec type. Large enough to span 292+ years in nanosecond | 54 | * 64-bit nanosec type. Large enough to span 292+ years in nanosecond |
diff --git a/include/linux/types.h b/include/linux/types.h index 21b9ce803644..54ae2d59e71b 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -8,6 +8,8 @@ | |||
8 | (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) | 8 | (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) |
9 | #define DECLARE_BITMAP(name,bits) \ | 9 | #define DECLARE_BITMAP(name,bits) \ |
10 | unsigned long name[BITS_TO_LONGS(bits)] | 10 | unsigned long name[BITS_TO_LONGS(bits)] |
11 | |||
12 | #define BITS_PER_BYTE 8 | ||
11 | #endif | 13 | #endif |
12 | 14 | ||
13 | #include <linux/posix_types.h> | 15 | #include <linux/posix_types.h> |
diff --git a/include/linux/usb_ch9.h b/include/linux/usb_ch9.h index ee21e6bf3867..a2aacfc7af2f 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb_ch9.h | |||
@@ -535,9 +535,11 @@ enum usb_device_state { | |||
535 | */ | 535 | */ |
536 | USB_STATE_NOTATTACHED = 0, | 536 | USB_STATE_NOTATTACHED = 0, |
537 | 537 | ||
538 | /* the chapter 9 device states */ | 538 | /* chapter 9 and authentication (wireless) device states */ |
539 | USB_STATE_ATTACHED, | 539 | USB_STATE_ATTACHED, |
540 | USB_STATE_POWERED, | 540 | USB_STATE_POWERED, /* wired */ |
541 | USB_STATE_UNAUTHENTICATED, /* auth */ | ||
542 | USB_STATE_RECONNECTING, /* auth */ | ||
541 | USB_STATE_DEFAULT, /* limited function */ | 543 | USB_STATE_DEFAULT, /* limited function */ |
542 | USB_STATE_ADDRESS, | 544 | USB_STATE_ADDRESS, |
543 | USB_STATE_CONFIGURED, /* most functions */ | 545 | USB_STATE_CONFIGURED, /* most functions */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index ce40675324bd..6f6c69777648 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -315,6 +315,7 @@ struct v4l2_pix_format | |||
315 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ | 315 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ |
316 | #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ | 316 | #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ |
317 | #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ | 317 | #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ |
318 | #define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ | ||
318 | 319 | ||
319 | /* | 320 | /* |
320 | * F O R M A T E N U M E R A T I O N | 321 | * F O R M A T E N U M E R A T I O N |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index df05f468fa5c..9a92aef8b0b2 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -803,9 +803,9 @@ enum ieee80211_state { | |||
803 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 | 803 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 |
804 | #define IEEE80211_24GHZ_CHANNELS 14 | 804 | #define IEEE80211_24GHZ_CHANNELS 14 |
805 | 805 | ||
806 | #define IEEE80211_52GHZ_MIN_CHANNEL 36 | 806 | #define IEEE80211_52GHZ_MIN_CHANNEL 34 |
807 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 | 807 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 |
808 | #define IEEE80211_52GHZ_CHANNELS 32 | 808 | #define IEEE80211_52GHZ_CHANNELS 131 |
809 | 809 | ||
810 | enum { | 810 | enum { |
811 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), | 811 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), |
diff --git a/include/net/route.h b/include/net/route.h index e3e5436f8017..9c04f15090d2 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -170,8 +170,8 @@ static inline int ip_route_connect(struct rtable **rp, u32 dst, | |||
170 | return ip_route_output_flow(rp, &fl, sk, 0); | 170 | return ip_route_output_flow(rp, &fl, sk, 0); |
171 | } | 171 | } |
172 | 172 | ||
173 | static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport, | 173 | static inline int ip_route_newports(struct rtable **rp, u8 protocol, |
174 | struct sock *sk) | 174 | u16 sport, u16 dport, struct sock *sk) |
175 | { | 175 | { |
176 | if (sport != (*rp)->fl.fl_ip_sport || | 176 | if (sport != (*rp)->fl.fl_ip_sport || |
177 | dport != (*rp)->fl.fl_ip_dport) { | 177 | dport != (*rp)->fl.fl_ip_dport) { |
@@ -180,6 +180,7 @@ static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport, | |||
180 | memcpy(&fl, &(*rp)->fl, sizeof(fl)); | 180 | memcpy(&fl, &(*rp)->fl, sizeof(fl)); |
181 | fl.fl_ip_sport = sport; | 181 | fl.fl_ip_sport = sport; |
182 | fl.fl_ip_dport = dport; | 182 | fl.fl_ip_dport = dport; |
183 | fl.proto = protocol; | ||
183 | ip_rt_put(*rp); | 184 | ip_rt_put(*rp); |
184 | *rp = NULL; | 185 | *rp = NULL; |
185 | return ip_route_output_flow(rp, &fl, sk, 0); | 186 | return ip_route_output_flow(rp, &fl, sk, 0); |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index e94ca4d36035..290e3b4d2aec 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -275,7 +275,7 @@ extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, | |||
275 | int data_direction, void *buffer, unsigned bufflen, | 275 | int data_direction, void *buffer, unsigned bufflen, |
276 | struct scsi_sense_hdr *, int timeout, int retries); | 276 | struct scsi_sense_hdr *, int timeout, int retries); |
277 | extern int scsi_execute_async(struct scsi_device *sdev, | 277 | extern int scsi_execute_async(struct scsi_device *sdev, |
278 | const unsigned char *cmd, int data_direction, | 278 | const unsigned char *cmd, int cmd_len, int data_direction, |
279 | void *buffer, unsigned bufflen, int use_sg, | 279 | void *buffer, unsigned bufflen, int use_sg, |
280 | int timeout, int retries, void *privdata, | 280 | int timeout, int retries, void *privdata, |
281 | void (*done)(void *, char *, int, int), | 281 | void (*done)(void *, char *, int, int), |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 467274a764d1..827992949c4b 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -554,7 +554,6 @@ struct Scsi_Host { | |||
554 | /* | 554 | /* |
555 | * ordered write support | 555 | * ordered write support |
556 | */ | 556 | */ |
557 | unsigned ordered_flush:1; | ||
558 | unsigned ordered_tag:1; | 557 | unsigned ordered_tag:1; |
559 | 558 | ||
560 | /* | 559 | /* |