diff options
author | Lv Zheng <lv.zheng@intel.com> | 2014-04-04 06:38:26 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-04-20 22:59:38 +0200 |
commit | dc156adf0d1b9d9ea54a86ca803ac5202ab139c7 (patch) | |
tree | fd87853be65ce947c2f3aa01b3dfec7743a9f031 /drivers/acpi/acpica/tbutils.c | |
parent | ACPICA: Remove indent divergences to reduce maintenance overhead. (diff) | |
download | linux-dc156adf0d1b9d9ea54a86ca803ac5202ab139c7.tar.xz linux-dc156adf0d1b9d9ea54a86ca803ac5202ab139c7.zip |
ACPICA: Tables: Fix the issues in handling virtual addressed tables.
When table is overridden or reloaded, acpi_tb_delete_table() is called where
struct acpi_table_desc.Pointer will be NULL. It thus is impossible for virtual
addressed tables to obtain the .Pointer again in acpi_tb_verify_table().
This patch stores virtual table addresses (ACPI_TABLE_ORIGIN_ALLOCATED,
ACPI_TABLE_ORIGIN_UNKNOWN, ACPI_TABLE_ORIGIN_OVERRIDE) in the
struct acpi_table_desc.Address field and refills the struct acpi_table_desc.Pointer
using these addresses in acpi_tb_verify_table(). Note that if a table with
ACPI_TABLE_ORIGIN_ALLOCATED set is actually freed, the .Address field
should be invalidated and thus must be replaced with NULL to avoid wrong
future validations occuring in acpi_tb_verify_table().
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/tbutils.c')
-rw-r--r-- | drivers/acpi/acpica/tbutils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 3f1afca87aeb..9b6992d8578f 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c @@ -179,6 +179,7 @@ struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index) ACPI_MEMCPY(new_table, table_desc->pointer, table_desc->length); acpi_tb_delete_table(table_desc); + table_desc->address = ACPI_PTR_TO_PHYSADDR(new_table); table_desc->pointer = new_table; table_desc->flags = ACPI_TABLE_ORIGIN_ALLOCATED; |