summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2014-01-08 00:43:18 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-08 09:31:36 -0500
commit5af2b6351b3cc0dadd6888928005a61f2667c80d (patch)
treeef38a813e15d132bc817f5527d95338d6e0a894d /drivers/acpi/acpica
parent5076f00504c62489b63197392856b9bad1ebcbd5 (diff)
ACPICA: Disassembler: Improve pathname support for emitted External() statements.
This change adds full pathname support for external names that have been resolved internally by the inclusion of additional ACPI tables (via the iASL -e option). Without this change, the disassembler can emit multiple externals for the same object, or it become confused when the Scope() operator is used on an external object. Linux kernel behaviour is not affected as the structure changes and the new invocations are only used by compiler and disassembler which are not shipped in the kernel currently. Reported-by: Michael Tsirkin <mst@redhat.com> 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>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/aclocal.h9
-rw-r--r--drivers/acpi/acpica/dsfield.c2
-rw-r--r--drivers/acpi/acpica/dswload.c4
3 files changed, 8 insertions, 7 deletions
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 53ed1a8ba4f0..d95ca5449ace 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -1038,15 +1038,16 @@ struct acpi_external_list {
1038 struct acpi_external_list *next; 1038 struct acpi_external_list *next;
1039 u32 value; 1039 u32 value;
1040 u16 length; 1040 u16 length;
1041 u16 flags;
1041 u8 type; 1042 u8 type;
1042 u8 flags;
1043 u8 resolved;
1044 u8 emitted;
1045}; 1043};
1046 1044
1047/* Values for Flags field above */ 1045/* Values for Flags field above */
1048 1046
1049#define ACPI_IPATH_ALLOCATED 0x01 1047#define ACPI_EXT_RESOLVED_REFERENCE 0x01 /* Object was resolved during cross ref */
1048#define ACPI_EXT_ORIGIN_FROM_FILE 0x02 /* External came from a file */
1049#define ACPI_EXT_INTERNAL_PATH_ALLOCATED 0x04 /* Deallocate internal path on completion */
1050#define ACPI_EXT_EXTERNAL_EMITTED 0x08 /* External() statement has been emitted */
1050 1051
1051struct acpi_external_file { 1052struct acpi_external_file {
1052 char *path; 1053 char *path;
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index 2d4c07322576..e7a57c554e84 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -105,7 +105,7 @@ acpi_ds_create_external_region(acpi_status lookup_status,
105 * operation_region not found. Generate an External for it, and 105 * operation_region not found. Generate an External for it, and
106 * insert the name into the namespace. 106 * insert the name into the namespace.
107 */ 107 */
108 acpi_dm_add_to_external_list(op, path, ACPI_TYPE_REGION, 0); 108 acpi_dm_add_op_to_external_list(op, path, ACPI_TYPE_REGION, 0, 0);
109 status = acpi_ns_lookup(walk_state->scope_info, path, ACPI_TYPE_REGION, 109 status = acpi_ns_lookup(walk_state->scope_info, path, ACPI_TYPE_REGION,
110 ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, 110 ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT,
111 walk_state, node); 111 walk_state, node);
diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c
index 95e681a36f9c..2dbe109727c8 100644
--- a/drivers/acpi/acpica/dswload.c
+++ b/drivers/acpi/acpica/dswload.c
@@ -181,8 +181,8 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
181 * Target of Scope() not found. Generate an External for it, and 181 * Target of Scope() not found. Generate an External for it, and
182 * insert the name into the namespace. 182 * insert the name into the namespace.
183 */ 183 */
184 acpi_dm_add_to_external_list(op, path, ACPI_TYPE_DEVICE, 184 acpi_dm_add_op_to_external_list(op, path,
185 0); 185 ACPI_TYPE_DEVICE, 0, 0);
186 status = 186 status =
187 acpi_ns_lookup(walk_state->scope_info, path, 187 acpi_ns_lookup(walk_state->scope_info, path,
188 object_type, ACPI_IMODE_LOAD_PASS1, 188 object_type, ACPI_IMODE_LOAD_PASS1,