@@ -14,7 +14,6 @@ config ARM
select HAS_ALTERNATIVE
select HAS_DEVICE_TREE
select HAS_PASSTHROUGH
- select HAS_PMAP
select HAS_UBSAN
select IOMMU_FORCE_PT_SHARE
@@ -60,6 +59,7 @@ config PADDR_BITS
config MMU
def_bool y
+ select HAS_PMAP
source "arch/Kconfig"
@@ -16,7 +16,6 @@
#include <xen/vmap.h>
#include <asm/byteorder.h>
-#include <asm/fixmap.h>
#include <asm/kernel.h>
#include <asm/setup.h>
@@ -41,33 +40,6 @@ struct minimal_dtb_header {
#define DTB_MAGIC 0xd00dfeedU
-/**
- * copy_from_paddr - copy data from a physical address
- * @dst: destination virtual address
- * @paddr: source physical address
- * @len: length to copy
- */
-void __init copy_from_paddr(void *dst, paddr_t paddr, unsigned long len)
-{
- void *src = (void *)FIXMAP_ADDR(FIXMAP_MISC);
-
- while (len) {
- unsigned long l, s;
-
- s = paddr & (PAGE_SIZE-1);
- l = min(PAGE_SIZE - s, len);
-
- set_fixmap(FIXMAP_MISC, maddr_to_mfn(paddr), PAGE_HYPERVISOR_WC);
- memcpy(dst, src + s, l);
- clean_dcache_va_range(dst, l);
- clear_fixmap(FIXMAP_MISC);
-
- paddr += l;
- dst += l;
- len -= l;
- }
-}
-
static void __init place_modules(struct kernel_info *info,
paddr_t kernbase, paddr_t kernend)
{
@@ -339,6 +339,33 @@ void free_init_memory(void)
printk("Freed %ldkB init memory.\n", (long)(__init_end-__init_begin)>>10);
}
+/**
+ * copy_from_paddr - copy data from a physical address
+ * @dst: destination virtual address
+ * @paddr: source physical address
+ * @len: length to copy
+ */
+void __init copy_from_paddr(void *dst, paddr_t paddr, unsigned long len)
+{
+ void *src = (void *)FIXMAP_ADDR(FIXMAP_MISC);
+
+ while (len) {
+ unsigned long l, s;
+
+ s = paddr & (PAGE_SIZE - 1);
+ l = min(PAGE_SIZE - s, len);
+
+ set_fixmap(FIXMAP_MISC, maddr_to_mfn(paddr), PAGE_HYPERVISOR_WC);
+ memcpy(dst, src + s, l);
+ clean_dcache_va_range(dst, l);
+ clear_fixmap(FIXMAP_MISC);
+
+ paddr += l;
+ dst += l;
+ len -= l;
+ }
+}
+
/*
* Local variables:
* mode: C