ACPICA: Update parameter type for ObjectType operator
authorBob Moore <robert.moore@intel.com>
Tue, 29 Dec 2015 06:00:21 +0000 (14:00 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Jan 2016 02:47:37 +0000 (03:47 +0100)
ACPICA commit 67953304a34944548f2fa53a4b0786a5db0ca2ea

The grammar for this operator changed in ACPI 5.0A, but it was
not necessary to update the interpreter/parser until now.

The UserTerm (method invocation) element was removed. Previously
a SuperName, the lone argument now requires a new ARGP_ type.

Link: https://github.com/acpica/acpica/commit/67953304
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/acopcode.h
drivers/acpi/acpica/amlcode.h
drivers/acpi/acpica/psargs.c

index db71b021e42a84cbe8eb34a3aef1136403685c99..05f80dedc7d49fbfba9bf33c85e31586b9e48b90 100644 (file)
 #define ARGP_TO_HEX_STR_OP              ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
 #define ARGP_TO_INTEGER_OP              ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
 #define ARGP_TO_STRING_OP               ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_TYPE_OP                    ARGP_LIST1 (ARGP_SUPERNAME)
+#define ARGP_TYPE_OP                    ARGP_LIST1 (ARGP_NAME_OR_REF)
 #define ARGP_UNLOAD_OP                  ARGP_LIST1 (ARGP_SUPERNAME)
 #define ARGP_VAR_PACKAGE_OP             ARGP_LIST3 (ARGP_PKGLENGTH,  ARGP_TERMARG,       ARGP_DATAOBJLIST)
 #define ARGP_WAIT_OP                    ARGP_LIST2 (ARGP_SUPERNAME,  ARGP_TERMARG)
index 883f20cfa69809674d04db7070118bda7d2400d5..2eedfa2bbf75449b0f2f1efe464166466f931ca7 100644 (file)
 #define ARGP_TERMLIST               0x0F
 #define ARGP_WORDDATA               0x10
 #define ARGP_QWORDDATA              0x11
-#define ARGP_SIMPLENAME             0x12
+#define ARGP_SIMPLENAME             0x12       /* name_string | local_term | arg_term */
+#define ARGP_NAME_OR_REF            0x13       /* For object_type only */
 
 /*
  * Resolved argument types for the AML Interpreter
index f84e54661ba77a72fe034a3334138a88142c570a..f3bcfa20b0ae7e53d425507f70b15cbe8f0427f5 100644 (file)
@@ -800,6 +800,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
        case ARGP_TARGET:
        case ARGP_SUPERNAME:
        case ARGP_SIMPLENAME:
+       case ARGP_NAME_OR_REF:
 
                subop = acpi_ps_peek_opcode(parser_state);
                if (subop == 0 ||
@@ -825,8 +826,8 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
                                                              ACPI_POSSIBLE_METHOD_CALL);
 
                                /*
-                                * If the super_name arg of Unload is a method call,
-                                * we have restored the AML pointer, just free this Arg
+                                * If the super_name argument is a method call, we have
+                                * already restored the AML pointer, just free this Arg
                                 */
                                if (arg->common.aml_opcode ==
                                    AML_INT_METHODCALL_OP) {