9 #include <linux/module.h>
10 #include <asm/addrspace.h>
11 #include <asm/byteorder.h>
12 #include <linux/sched.h>
13 #include <linux/slab.h>
15 #include <asm/cacheflush.h>
17 #include <asm/tlbflush.h>
35 printk(
"remap_area_pte: page already exists\n");
42 }
while (address && (address < end));
45 static inline int remap_area_pmd(
pmd_t *
pmd,
unsigned long address,
57 pte_t * pte = pte_alloc_kernel(pmd, address);
60 remap_area_pte(pte, address, end - address, address + phys_addr, flags);
63 }
while (address && (address < end));
67 static int remap_area_pages(
unsigned long address,
phys_t phys_addr,
68 phys_t size,
unsigned long flags)
72 unsigned long end = address +
size;
89 if (remap_area_pmd(pmd, address, end - address,
90 phys_addr + address, flags))
95 }
while (address && (address < end));
114 #define IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL))
123 phys_addr = fixup_bigphys_addr(phys_addr, size);
126 last_addr = phys_addr + size - 1;
127 if (!size || last_addr < phys_addr)
142 char *t_addr, *t_end;
145 t_addr =
__va(phys_addr);
146 t_end = t_addr + (size - 1);
149 if(!PageReserved(page))
167 if (remap_area_pages((
unsigned long) addr, phys_addr, size, flags)) {
172 return (
void __iomem *) (offset + (
char *)addr);
175 #define IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1)