]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/parser/psloop.c
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
[linux-2.6-omap-h63xx.git] / drivers / acpi / parser / psloop.c
index 4348b05303989baa03b49ad4399de540a01402e5..4647039a0d8a2c7183f1cc25653a673cf7657ff4 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2007, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -242,7 +242,8 @@ acpi_ps_build_named_op(struct acpi_walk_state *walk_state,
        acpi_ps_append_arg(*op, unnamed_op->common.value.arg);
        acpi_gbl_depth++;
 
-       if ((*op)->common.aml_opcode == AML_REGION_OP) {
+       if ((*op)->common.aml_opcode == AML_REGION_OP ||
+           (*op)->common.aml_opcode == AML_DATA_REGION_OP) {
                /*
                 * Defer final parsing of an operation_region body, because we don't
                 * have enough info in the first pass to parse it correctly (i.e.,
@@ -324,6 +325,15 @@ acpi_ps_create_op(struct acpi_walk_state *walk_state,
                op->named.length = 0;
        }
 
+       if (walk_state->opcode == AML_BANK_FIELD_OP) {
+               /*
+                * Backup to beginning of bank_field declaration
+                * body_length is unknown until we parse the body
+                */
+               op->named.data = aml_op_start;
+               op->named.length = 0;
+       }
+
        parent_scope = acpi_ps_get_parent_scope(&(walk_state->parser_state));
        acpi_ps_append_arg(parent_scope, op);
 
@@ -709,6 +719,8 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,
                *op = NULL;
        }
 
+       ACPI_PREEMPTION_POINT();
+
        return_ACPI_STATUS(AE_OK);
 }
 
@@ -1013,7 +1025,8 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
                                acpi_gbl_depth--;
                        }
 
-                       if (op->common.aml_opcode == AML_REGION_OP) {
+                       if (op->common.aml_opcode == AML_REGION_OP ||
+                           op->common.aml_opcode == AML_DATA_REGION_OP) {
                                /*
                                 * Skip parsing of control method or opregion body,
                                 * because we don't have enough info in the first pass
@@ -1038,6 +1051,16 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
                            (u32) (parser_state->aml - op->named.data);
                }
 
+               if (op->common.aml_opcode == AML_BANK_FIELD_OP) {
+                       /*
+                        * Backup to beginning of bank_field declaration
+                        *
+                        * body_length is unknown until we parse the body
+                        */
+                       op->named.length =
+                           (u32) (parser_state->aml - op->named.data);
+               }
+
                /* This op complete, notify the dispatcher */
 
                if (walk_state->ascending_callback != NULL) {