These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / acpi / acpica / psloop.c
index 9043722..03ac8c9 100644 (file)
@@ -51,6 +51,7 @@
 
 #include <acpi/acpi.h>
 #include "accommon.h"
+#include "acinterp.h"
 #include "acparser.h"
 #include "acdispat.h"
 #include "amlcode.h"
@@ -125,10 +126,7 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state,
                 */
                while (GET_CURRENT_ARG_TYPE(walk_state->arg_types)
                       && !walk_state->arg_count) {
-                       walk_state->aml_offset =
-                           (u32) ACPI_PTR_DIFF(walk_state->parser_state.aml,
-                                               walk_state->parser_state.
-                                               aml_start);
+                       walk_state->aml = walk_state->parser_state.aml;
 
                        status =
                            acpi_ps_get_next_arg(walk_state,
@@ -140,7 +138,6 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state,
                        }
 
                        if (arg) {
-                               arg->common.aml_offset = walk_state->aml_offset;
                                acpi_ps_append_arg(op, arg);
                        }
 
@@ -324,6 +321,8 @@ acpi_ps_link_module_code(union acpi_parse_object *parent_op,
        union acpi_operand_object *method_obj;
        struct acpi_namespace_node *parent_node;
 
+       ACPI_FUNCTION_TRACE(ps_link_module_code);
+
        /* Get the tail of the list */
 
        prev = next = acpi_gbl_module_code_list;
@@ -343,9 +342,13 @@ acpi_ps_link_module_code(union acpi_parse_object *parent_op,
 
                method_obj = acpi_ut_create_internal_object(ACPI_TYPE_METHOD);
                if (!method_obj) {
-                       return;
+                       return_VOID;
                }
 
+               ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
+                                 "Create/Link new code block: %p\n",
+                                 method_obj));
+
                if (parent_op->common.node) {
                        parent_node = parent_op->common.node;
                } else {
@@ -370,8 +373,14 @@ acpi_ps_link_module_code(union acpi_parse_object *parent_op,
                        prev->method.mutex = method_obj;
                }
        } else {
+               ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
+                                 "Appending to existing code block: %p\n",
+                                 prev));
+
                prev->method.aml_length += aml_length;
        }
+
+       return_VOID;
 }
 
 /*******************************************************************************
@@ -494,16 +503,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
                                continue;
                        }
 
-                       op->common.aml_offset = walk_state->aml_offset;
-
-                       if (walk_state->op_info) {
-                               ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
-                                                 "Opcode %4.4X [%s] Op %p Aml %p AmlOffset %5.5X\n",
-                                                 (u32) op->common.aml_opcode,
-                                                 walk_state->op_info->name, op,
-                                                 parser_state->aml,
-                                                 op->common.aml_offset));
-                       }
+                       acpi_ex_start_trace_opcode(op, walk_state);
                }
 
                /*