linux-yocto/drivers/xen
Juergen Gross ae0e082687 xen: replace xen_remap() with memremap()
commit 41925b105e upstream.

xen_remap() is used to establish mappings for frames not under direct
control of the kernel: for Xenstore and console ring pages, and for
grant pages of non-PV guests.

Today xen_remap() is defined to use ioremap() on x86 (doing uncached
mappings), and ioremap_cache() on Arm (doing cached mappings).

Uncached mappings for those use cases are bad for performance, so they
should be avoided if possible. As all use cases of xen_remap() don't
require uncached mappings (the mapped area is always physical RAM),
a mapping using the standard WB cache mode is fine.

As sparse is flagging some of the xen_remap() use cases to be not
appropriate for iomem(), as the result is not annotated with the
__iomem modifier, eliminate xen_remap() completely and replace all
use cases with memremap() specifying the MEMREMAP_WB caching mode.

xen_unmap() can be replaced with memunmap().

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Link: https://lore.kernel.org/r/20220530082634.6339-1-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Teddy Astie <teddy.astie@vates.tech> [backport to 5.15.y]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-17 18:30:48 +02:00
..
events
xen-pciback
xenbus xen: replace xen_remap() with memremap() 2025-07-17 18:30:48 +02:00
xenfs xenfs/xensyms: respect hypervisor's "next" indication 2025-05-02 07:43:59 +02:00
acpi.c
arm-device.c
balloon.c
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
features.c
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c
gntdev-dmabuf.h
gntdev.c
grant-table.c xen: replace xen_remap() with memremap() 2025-07-17 18:30:48 +02:00
Kconfig xen: Change xen-acpi-processor dom0 dependency 2025-05-02 07:44:36 +02:00
Makefile
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c
platform-pci.c xen: Add support for XenServer 6.1 platform device 2025-06-04 14:37:57 +02:00
privcmd-buf.c
privcmd.c
privcmd.h
pvcalls-back.c
pvcalls-front.c
pvcalls-front.h
swiotlb-xen.c xen/swiotlb: relax alignment requirements 2025-06-04 14:38:07 +02:00
sys-hypervisor.c
time.c
unpopulated-alloc.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c
xen-scsiback.c
xlate_mmu.c