10 #include <linux/sched.h>
12 #include <linux/export.h>
13 #include <asm/cacheflush.h>
14 #include <asm/pgtable.h>
16 static int ioremap_pte_range(
pmd_t *
pmd,
unsigned long addr,
23 pte = pte_alloc_kernel(pmd, addr);
30 }
while (pte++, addr +=
PAGE_SIZE, addr != end);
34 static inline int ioremap_pmd_range(
pud_t *pud,
unsigned long addr,
46 if (ioremap_pte_range(pmd, addr, next, phys_addr + addr, prot))
48 }
while (pmd++, addr = next, addr != end);
52 static inline int ioremap_pud_range(
pgd_t *pgd,
unsigned long addr,
64 if (ioremap_pmd_range(pud, addr, next, phys_addr + addr, prot))
66 }
while (pud++, addr = next, addr != end);
84 next = pgd_addr_end(addr, end);
85 err = ioremap_pud_range(pgd, addr, next, phys_addr+addr, prot);
88 }
while (pgd++, addr = next, addr != end);