Commit e3ec483a authored by Zhang Rui's avatar Zhang Rui

ACPI: add ACPI_TYPE_LOCAL_REFERENCE support to acpi_extract_package()

Add ACPI_TYPE_LOCAL_REFERENCE support to acpi_extract_package(),
so that we can use this helper for more cases like _ART/_TRT.
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 083bf668
...@@ -149,6 +149,21 @@ acpi_extract_package(union acpi_object *package, ...@@ -149,6 +149,21 @@ acpi_extract_package(union acpi_object *package,
break; break;
} }
break; break;
case ACPI_TYPE_LOCAL_REFERENCE:
switch (format_string[i]) {
case 'R':
size_required += sizeof(void *);
tail_offset += sizeof(void *);
break;
default:
printk(KERN_WARNING PREFIX "Invalid package element"
" [%d] got reference,"
" expecting [%c]\n",
i, format_string[i]);
return AE_BAD_DATA;
break;
}
break;
case ACPI_TYPE_PACKAGE: case ACPI_TYPE_PACKAGE:
default: default:
...@@ -247,7 +262,18 @@ acpi_extract_package(union acpi_object *package, ...@@ -247,7 +262,18 @@ acpi_extract_package(union acpi_object *package,
break; break;
} }
break; break;
case ACPI_TYPE_LOCAL_REFERENCE:
switch (format_string[i]) {
case 'R':
*(void **)head =
(void *)element->reference.handle;
head += sizeof(void *);
break;
default:
/* Should never get here */
break;
}
break;
case ACPI_TYPE_PACKAGE: case ACPI_TYPE_PACKAGE:
/* TBD: handle nested packages... */ /* TBD: handle nested packages... */
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment