ACPI / osl: Remove acpi_get_table_with_size()/early_acpi_os_unmap_memory() users
This patch removes the users of the deprectated APIs: acpi_get_table_with_size() early_acpi_os_unmap_memory() The following APIs should be used instead of: acpi_get_table() acpi_put_table() The deprecated APIs are invented to be a replacement of acpi_get_table() during the early stage so that the early mapped pointer will not be stored in ACPICA core and thus the late stage acpi_get_table() won't return a wrong pointer. The mapping size is returned just because it is required by early_acpi_os_unmap_memory() to unmap the pointer during early stage. But as the mapping size equals to the acpi_table_header.length (see acpi_tb_init_table_descriptor() and acpi_tb_validate_table()), when such a convenient result is returned, driver code will start to use it instead of accessing acpi_table_header to obtain the length. Thus this patch cleans up the drivers by replacing returned table size with acpi_table_header.length, and should be a no-op. Reported-by:Dan Williams <dan.j.williams@intel.com> Signed-off-by:
Lv Zheng <lv.zheng@intel.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing
- arch/arm64/kernel/acpi.c 3 additions, 4 deletionsarch/arm64/kernel/acpi.c
- drivers/acpi/nfit/core.c 2 additions, 1 deletiondrivers/acpi/nfit/core.c
- drivers/acpi/processor_core.c 3 additions, 5 deletionsdrivers/acpi/processor_core.c
- drivers/acpi/spcr.c 3 additions, 5 deletionsdrivers/acpi/spcr.c
- drivers/acpi/tables.c 7 additions, 10 deletionsdrivers/acpi/tables.c
- drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c 2 additions, 1 deletiondrivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
- drivers/gpu/drm/radeon/radeon_bios.c 2 additions, 1 deletiondrivers/gpu/drm/radeon/radeon_bios.c
- drivers/iommu/amd_iommu_init.c 4 additions, 6 deletionsdrivers/iommu/amd_iommu_init.c
- drivers/iommu/dmar.c 2 additions, 5 deletionsdrivers/iommu/dmar.c
- drivers/mailbox/pcc.c 1 addition, 4 deletionsdrivers/mailbox/pcc.c
Please register or sign in to comment