aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/parser/psscope.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/parser/psscope.c
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff)
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index" argument to an ASL function was still (internally) 32 bits instead of the required 64 bits. This was the Index argument to the Index, Mid, and Match operators. The "strupr" function is now permanently local (acpi_ut_strupr), since this is not a POSIX-defined function and not present in most kernel-level C libraries. References to the C library strupr function have been removed from the headers. Completed the deployment of static functions/prototypes. All prototypes with the static attribute have been moved from the headers to the owning C file. ACPICA 20050329 from Bob Moore An error is now generated if an attempt is made to create a Buffer Field of length zero (A CreateField with a length operand of zero.) The interpreter now issues a warning whenever executable code at the module level is detected during ACPI table load. This will give some idea of the prevalence of this type of code. Implemented support for references to named objects (other than control methods) within package objects. Enhanced package object output for the debug object. Package objects are now completely dumped, showing all elements. Enhanced miscellaneous object output for the debug object. Any object can now be written to the debug object (for example, a device object can be written, and the type of the object will be displayed.) The "static" qualifier has been added to all local functions across the core subsystem. The number of "long" lines (> 80 chars) within the source has been significantly reduced, by about 1/3. Cleaned up all header files to ensure that all CA/iASL functions are prototyped (even static functions) and the formatting is consistent. Two new header files have been added, acopcode.h and acnames.h. Removed several obsolete functions that were no longer used. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/parser/psscope.c')
-rw-r--r--drivers/acpi/parser/psscope.c45
1 files changed, 24 insertions, 21 deletions
diff --git a/drivers/acpi/parser/psscope.c b/drivers/acpi/parser/psscope.c
index dcbed49608b0..8dcd1b1e7131 100644
--- a/drivers/acpi/parser/psscope.c
+++ b/drivers/acpi/parser/psscope.c
@@ -65,6 +65,7 @@ union acpi_parse_object *
65acpi_ps_get_parent_scope ( 65acpi_ps_get_parent_scope (
66 struct acpi_parse_state *parser_state) 66 struct acpi_parse_state *parser_state)
67{ 67{
68
68 return (parser_state->scope->parse_scope.op); 69 return (parser_state->scope->parse_scope.op);
69} 70}
70 71
@@ -87,8 +88,10 @@ u8
87acpi_ps_has_completed_scope ( 88acpi_ps_has_completed_scope (
88 struct acpi_parse_state *parser_state) 89 struct acpi_parse_state *parser_state)
89{ 90{
90 return ((u8) ((parser_state->aml >= parser_state->scope->parse_scope.arg_end || 91
91 !parser_state->scope->parse_scope.arg_count))); 92 return ((u8)
93 ((parser_state->aml >= parser_state->scope->parse_scope.arg_end ||
94 !parser_state->scope->parse_scope.arg_count)));
92} 95}
93 96
94 97
@@ -167,23 +170,23 @@ acpi_ps_push_scope (
167 return_ACPI_STATUS (AE_NO_MEMORY); 170 return_ACPI_STATUS (AE_NO_MEMORY);
168 } 171 }
169 172
170 scope->common.data_type = ACPI_DESC_TYPE_STATE_PSCOPE; 173 scope->common.data_type = ACPI_DESC_TYPE_STATE_PSCOPE;
171 scope->parse_scope.op = op; 174 scope->parse_scope.op = op;
172 scope->parse_scope.arg_list = remaining_args; 175 scope->parse_scope.arg_list = remaining_args;
173 scope->parse_scope.arg_count = arg_count; 176 scope->parse_scope.arg_count = arg_count;
174 scope->parse_scope.pkg_end = parser_state->pkg_end; 177 scope->parse_scope.pkg_end = parser_state->pkg_end;
175 178
176 /* Push onto scope stack */ 179 /* Push onto scope stack */
177 180
178 acpi_ut_push_generic_state (&parser_state->scope, scope); 181 acpi_ut_push_generic_state (&parser_state->scope, scope);
179 182
180 if (arg_count == ACPI_VAR_ARGS) { 183 if (arg_count == ACPI_VAR_ARGS) {
181 /* multiple arguments */ 184 /* Multiple arguments */
182 185
183 scope->parse_scope.arg_end = parser_state->pkg_end; 186 scope->parse_scope.arg_end = parser_state->pkg_end;
184 } 187 }
185 else { 188 else {
186 /* single argument */ 189 /* Single argument */
187 190
188 scope->parse_scope.arg_end = ACPI_TO_POINTER (ACPI_MAX_PTR); 191 scope->parse_scope.arg_end = ACPI_TO_POINTER (ACPI_MAX_PTR);
189 } 192 }
@@ -221,18 +224,17 @@ acpi_ps_pop_scope (
221 ACPI_FUNCTION_TRACE ("ps_pop_scope"); 224 ACPI_FUNCTION_TRACE ("ps_pop_scope");
222 225
223 226
224 /* 227 /* Only pop the scope if there is in fact a next scope */
225 * Only pop the scope if there is in fact a next scope 228
226 */
227 if (scope->common.next) { 229 if (scope->common.next) {
228 scope = acpi_ut_pop_generic_state (&parser_state->scope); 230 scope = acpi_ut_pop_generic_state (&parser_state->scope);
229 231
230 /* return to parsing previous op */ 232 /* return to parsing previous op */
231 233
232 *op = scope->parse_scope.op; 234 *op = scope->parse_scope.op;
233 *arg_list = scope->parse_scope.arg_list; 235 *arg_list = scope->parse_scope.arg_list;
234 *arg_count = scope->parse_scope.arg_count; 236 *arg_count = scope->parse_scope.arg_count;
235 parser_state->pkg_end = scope->parse_scope.pkg_end; 237 parser_state->pkg_end = scope->parse_scope.pkg_end;
236 238
237 /* All done with this scope state structure */ 239 /* All done with this scope state structure */
238 240
@@ -241,12 +243,13 @@ acpi_ps_pop_scope (
241 else { 243 else {
242 /* empty parse stack, prepare to fetch next opcode */ 244 /* empty parse stack, prepare to fetch next opcode */
243 245
244 *op = NULL; 246 *op = NULL;
245 *arg_list = 0; 247 *arg_list = 0;
246 *arg_count = 0; 248 *arg_count = 0;
247 } 249 }
248 250
249 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped Op %p Args %X\n", *op, *arg_count)); 251 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
252 "Popped Op %p Args %X\n", *op, *arg_count));
250 return_VOID; 253 return_VOID;
251} 254}
252 255
@@ -257,7 +260,7 @@ acpi_ps_pop_scope (
257 * 260 *
258 * PARAMETERS: parser_state - Current parser state object 261 * PARAMETERS: parser_state - Current parser state object
259 * 262 *
260 * RETURN: Status 263 * RETURN: None
261 * 264 *
262 * DESCRIPTION: Destroy available list, remaining stack levels, and return 265 * DESCRIPTION: Destroy available list, remaining stack levels, and return
263 * root scope 266 * root scope