Its use in domain building is questionable: Already at the point both uses
were introduced, ioremap_cache() existed. I can't see why kernel and
initrd would need mapping WC, when at the same time other similar mappings
(in common/device-tree/) are done WB.
With those uses replaced, neither Arm nor RISC-V have a need for the
function anymore.
Amends: d8972aa9645f ("xen/arm: kernel: Rework kernel_zimage_load to use the
generic copy helper")
Amends: bb7e6d565d92 ("xen/arm: domain_build: Rework initrd_load to use the
generic copy helper")
Signed-off-by: Jan Beulich <[email protected]>
--- a/xen/arch/arm/include/asm/mm.h
+++ b/xen/arch/arm/include/asm/mm.h
@@ -213,11 +213,6 @@ static inline void __iomem *ioremap_cach
return ioremap_attr(start, len, PAGE_HYPERVISOR);
}
-static inline void __iomem *ioremap_wc(paddr_t start, size_t len)
-{
- return ioremap_attr(start, len, PAGE_HYPERVISOR_WC);
-}
-
/* XXX -- account for base */
#define mfn_valid(mfn) ({ \
unsigned long __m_f_n = mfn_x(mfn); \
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -148,7 +148,7 @@ static void __init kernel_zimage_load(st
printk("Loading zImage from %"PRIpaddr" to %"PRIpaddr"-%"PRIpaddr"\n",
paddr, load_addr, load_addr + len);
- kernel = ioremap_wc(paddr, len);
+ kernel = ioremap_cache(paddr, len);
if ( !kernel )
panic("Unable to map the %pd kernel\n", info->bd.d);
--- a/xen/arch/riscv/include/asm/io.h
+++ b/xen/arch/riscv/include/asm/io.h
@@ -43,7 +43,6 @@
void __iomem *ioremap(paddr_t pa, size_t len);
void __iomem *ioremap_cache(paddr_t pa, size_t len);
-void __iomem *ioremap_wc(paddr_t pa, size_t len);
/* Generic IO read/write. These perform native-endian accesses. */
static inline void __raw_writeb(uint8_t val, volatile void __iomem *addr)
--- a/xen/arch/riscv/mm.c
+++ b/xen/arch/riscv/mm.c
@@ -592,11 +592,6 @@ void __iomem *ioremap_cache(paddr_t pa,
return ioremap_attr(pa, len, PAGE_HYPERVISOR);
}
-void __iomem *ioremap_wc(paddr_t pa, size_t len)
-{
- return ioremap_attr(pa, len, PAGE_HYPERVISOR_WC);
-}
-
void __iomem *ioremap(paddr_t pa, size_t len)
{
return ioremap_attr(pa, len, PAGE_HYPERVISOR_NOCACHE);
--- a/xen/common/device-tree/domain-build.c
+++ b/xen/common/device-tree/domain-build.c
@@ -395,7 +395,7 @@ void __init initrd_load(struct kernel_in
if ( res )
panic("Cannot fix up \"linux,initrd-end\" property\n");
- initrd = ioremap_wc(paddr, len);
+ initrd = ioremap_cache(paddr, len);
if ( !initrd )
panic("Unable to map the %pd initrd\n", kinfo->bd.d);