xen/acpi: Rework acpi_os_map_memory() and acpi_os_unmap_memory()
authorJulien Grall <jgrall@amazon.com>
Sat, 26 Sep 2020 16:44:29 +0000 (17:44 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Thu, 2 Dec 2021 20:45:55 +0000 (20:45 +0000)
commit2f56ad7c8e6c11e689ecf86df39ca8684e0b97e1
tree36b01c93a3ad574f3878e85edbde80461fc2ecff
parent4346037a77a4d2df61db1ad8f9df504a3896bb2a
xen/acpi: Rework acpi_os_map_memory() and acpi_os_unmap_memory()

The functions acpi_os_{un,}map_memory() are meant to be arch-agnostic
while the __acpi_os_{un,}map_memory() are meant to be arch-specific.

Currently, the former are still containing x86 specific code.

To avoid this rather strange split, the generic helpers are reworked so
they are arch-agnostic. This requires the introduction of a new helper
__acpi_os_unmap_memory() that will undo any mapping done by
__acpi_os_map_memory().

Currently, the arch-helper for unmap is basically a no-op so it only
returns whether the mapping was arch specific. But this will change
in the future.

Note that the x86 version of acpi_os_map_memory() was already able to
able the 1MB region. Hence why there is no addition of new code.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Elliott Mitchell <ehem+xen@m5p.com>
(cherry picked from commit 1c4aa69ca1e1fad20b2158051eb152276d1eb973)

Gbp-Pq: Name 0030-xen-acpi-Rework-acpi_os_map_memory-and-acpi_os_unmap.patch
xen/arch/arm/acpi/lib.c
xen/arch/x86/acpi/lib.c
xen/drivers/acpi/osl.c
xen/include/xen/acpi.h