29 #include <linux/kernel.h>
30 #include <linux/module.h>
31 #include <linux/types.h>
35 #include <asm/pgtable.h>
36 #include <asm/pgalloc.h>
39 #include <asm/sections.h>
40 #include <asm/fixmap.h>
42 #define flush_HPTE(X, va, pg) _tlbie(va)
79 " is RAM lr %pf\n", (
unsigned long)p,
80 __builtin_return_address(0));
111 flags |= _PAGE_GUARDED;
114 for (i = 0; i < size && err == 0; i +=
PAGE_SIZE)
115 err =
map_page(v + i, p + i, flags);
122 return (
void __iomem *) (v + ((
unsigned long)addr & ~PAGE_MASK));
127 return __ioremap(addr, size, _PAGE_NO_CACHE);
134 vfree((
void *) (PAGE_MASK & (
unsigned long) addr));
147 pg = pte_alloc_kernel(pd, va);
166 unsigned long v,
p,
s,
f;
168 v = CONFIG_KERNEL_START;
186 #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
193 static int get_pteptr(
struct mm_struct *mm,
unsigned long addr,
pte_t **ptep)
217 unsigned long iopa(
unsigned long addr)
233 if (get_pteptr(mm, addr, &pte))