aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/mm/init.c4
-rw-r--r--arch/mips/mm/pgtable-32.c32
-rw-r--r--include/asm-mips/fixmap.h7
3 files changed, 10 insertions, 33 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index dc6830b10fab..77cbccaff955 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -96,8 +96,8 @@ static void __init kmap_init(void)
96 kmap_prot = PAGE_KERNEL; 96 kmap_prot = PAGE_KERNEL;
97} 97}
98 98
99#ifdef CONFIG_64BIT 99#ifdef CONFIG_32BIT
100static void __init fixrange_init(unsigned long start, unsigned long end, 100void __init fixrange_init(unsigned long start, unsigned long end,
101 pgd_t *pgd_base) 101 pgd_t *pgd_base)
102{ 102{
103 pgd_t *pgd; 103 pgd_t *pgd;
diff --git a/arch/mips/mm/pgtable-32.c b/arch/mips/mm/pgtable-32.c
index 4f07f81e8500..74492618f2ae 100644
--- a/arch/mips/mm/pgtable-32.c
+++ b/arch/mips/mm/pgtable-32.c
@@ -10,6 +10,7 @@
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <linux/bootmem.h> 11#include <linux/bootmem.h>
12#include <linux/highmem.h> 12#include <linux/highmem.h>
13#include <asm/fixmap.h>
13#include <asm/pgtable.h> 14#include <asm/pgtable.h>
14 15
15void pgd_init(unsigned long page) 16void pgd_init(unsigned long page)
@@ -29,37 +30,6 @@ void pgd_init(unsigned long page)
29 } 30 }
30} 31}
31 32
32#ifdef CONFIG_HIGHMEM
33static void __init fixrange_init (unsigned long start, unsigned long end,
34 pgd_t *pgd_base)
35{
36 pgd_t *pgd;
37 pmd_t *pmd;
38 pte_t *pte;
39 int i, j;
40 unsigned long vaddr;
41
42 vaddr = start;
43 i = __pgd_offset(vaddr);
44 j = __pmd_offset(vaddr);
45 pgd = pgd_base + i;
46
47 for ( ; (i < PTRS_PER_PGD) && (vaddr != end); pgd++, i++) {
48 pmd = (pmd_t *)pgd;
49 for (; (j < PTRS_PER_PMD) && (vaddr != end); pmd++, j++) {
50 if (pmd_none(*pmd)) {
51 pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
52 set_pmd(pmd, __pmd((unsigned long)pte));
53 if (pte != pte_offset_kernel(pmd, 0))
54 BUG();
55 }
56 vaddr += PMD_SIZE;
57 }
58 j = 0;
59 }
60}
61#endif
62
63void __init pagetable_init(void) 33void __init pagetable_init(void)
64{ 34{
65#ifdef CONFIG_HIGHMEM 35#ifdef CONFIG_HIGHMEM
diff --git a/include/asm-mips/fixmap.h b/include/asm-mips/fixmap.h
index 26b6a90a690b..73a3028dd9f9 100644
--- a/include/asm-mips/fixmap.h
+++ b/include/asm-mips/fixmap.h
@@ -107,4 +107,11 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
107 return __virt_to_fix(vaddr); 107 return __virt_to_fix(vaddr);
108} 108}
109 109
110/*
111 * Called from pgtable_init()
112 */
113extern void fixrange_init(unsigned long start, unsigned long end,
114 pgd_t *pgd_base);
115
116
110#endif 117#endif