22 #include <linux/kernel.h>
23 #include <linux/module.h>
24 #include <linux/types.h>
30 #include <linux/slab.h>
32 #include <asm/pgtable.h>
33 #include <asm/pgalloc.h>
34 #include <asm/fixmap.h>
36 #include <asm/setup.h>
44 #if defined(CONFIG_6xx) || defined(CONFIG_POWER3)
48 #if defined(CONFIG_FSL_BOOKE)
61 #define v_mapped_by_bats(x) (0UL)
62 #define p_mapped_by_bats(x) (0UL)
70 #define v_mapped_by_tlbcam(x) (0UL)
71 #define p_mapped_by_tlbcam(x) (0UL)
74 #define PGDIR_ORDER (32 + PGD_T_LOG2 - PGDIR_SHIFT)
81 #ifndef CONFIG_PPC_4K_PAGES
92 #ifndef CONFIG_PPC_4K_PAGES
117 struct page *ptepage;
124 pgtable_page_ctor(ptepage);
132 __builtin_return_address(0));
140 __builtin_return_address(0));
159 flags |= _PAGE_BAP_SR;
201 if (p < 16*1024*1024)
204 #ifndef CONFIG_CRASH_DUMP
211 printk(
"__ioremap(): phys addr 0x%llx is RAM lr %pf\n",
212 (
unsigned long long)p, __builtin_return_address(0));
253 for (i = 0; i < size && err == 0; i +=
PAGE_SIZE)
262 return (
void __iomem *) (v + ((
unsigned long)addr & ~PAGE_MASK));
288 pg = pte_alloc_kernel(pd, va);
307 unsigned long v,
s,
f;
315 ktext = ((
char *) v >=
_stext && (
char *) v <
etext);
318 #ifdef CONFIG_PPC_STD_MMU_32
329 unsigned long s,
top;
385 #ifdef CONFIG_DEBUG_PAGEALLOC
393 BUG_ON(PageHighMem(page));
400 __set_pte_at(&
init_mm, address, kpte,
mk_pte(page, prot), 0);
419 for (i = 0; i < numpages; i++, page++) {
420 err = __change_page_attr(page, prot);
431 if (PageHighMem(page))