@@ -41,33 +41,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)
{
@@ -329,6 +329,33 @@ void __init setup_mm(void)
}
#endif
+/*
+ * 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