mirror_ubuntu-kernels/arch/x86/include/asm/xen
Juergen Gross 41925b105e xen: replace xen_remap() with memremap()
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>
2022-06-01 07:24:17 +02:00
..
cpuid.h xen/x86: detect support for extended destination ID 2022-02-10 11:10:17 +01:00
events.h xen: don't include <xen/xen.h> from <asm/io.h> and <asm/dma-mapping.h> 2018-09-26 08:45:18 -06:00
hypercall.h xen: make HYPERVISOR_set_debugreg() always_inline 2021-11-25 09:25:39 -06:00
hypervisor.h xen/x2apic: enable x2apic mode when supported for HVM 2022-01-28 13:26:13 +01:00
interface_32.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
interface_64.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
interface.h xen: add wc_sec_hi to struct shared_info 2021-02-04 14:19:38 +00:00
page-coherent.h swiotlb-xen: simplify cache maintainance 2019-09-11 12:43:27 +02:00
page.h xen: replace xen_remap() with memremap() 2022-06-01 07:24:17 +02:00
pci.h xen-pciback: allow compiling on other archs than x86 2021-11-02 08:03:43 -05:00
swiotlb-xen.h xen/pci-swiotlb: reduce visibility of symbols 2021-09-20 17:01:19 +02:00
trace_types.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00