Commit 84fd089a authored by Ralf Baechle's avatar Ralf Baechle

Delete duplicate copy of fixrange_init.

Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent cc26b815
...@@ -96,8 +96,8 @@ static void __init kmap_init(void) ...@@ -96,8 +96,8 @@ static void __init kmap_init(void)
kmap_prot = PAGE_KERNEL; kmap_prot = PAGE_KERNEL;
} }
#ifdef CONFIG_64BIT #ifdef CONFIG_32BIT
static void __init fixrange_init(unsigned long start, unsigned long end, void __init fixrange_init(unsigned long start, unsigned long end,
pgd_t *pgd_base) pgd_t *pgd_base)
{ {
pgd_t *pgd; pgd_t *pgd;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/highmem.h> #include <linux/highmem.h>
#include <asm/fixmap.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
void pgd_init(unsigned long page) void pgd_init(unsigned long page)
...@@ -29,37 +30,6 @@ void pgd_init(unsigned long page) ...@@ -29,37 +30,6 @@ void pgd_init(unsigned long page)
} }
} }
#ifdef CONFIG_HIGHMEM
static void __init fixrange_init (unsigned long start, unsigned long end,
pgd_t *pgd_base)
{
pgd_t *pgd;
pmd_t *pmd;
pte_t *pte;
int i, j;
unsigned long vaddr;
vaddr = start;
i = __pgd_offset(vaddr);
j = __pmd_offset(vaddr);
pgd = pgd_base + i;
for ( ; (i < PTRS_PER_PGD) && (vaddr != end); pgd++, i++) {
pmd = (pmd_t *)pgd;
for (; (j < PTRS_PER_PMD) && (vaddr != end); pmd++, j++) {
if (pmd_none(*pmd)) {
pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
set_pmd(pmd, __pmd((unsigned long)pte));
if (pte != pte_offset_kernel(pmd, 0))
BUG();
}
vaddr += PMD_SIZE;
}
j = 0;
}
}
#endif
void __init pagetable_init(void) void __init pagetable_init(void)
{ {
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
......
...@@ -107,4 +107,11 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) ...@@ -107,4 +107,11 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
return __virt_to_fix(vaddr); return __virt_to_fix(vaddr);
} }
/*
* Called from pgtable_init()
*/
extern void fixrange_init(unsigned long start, unsigned long end,
pgd_t *pgd_base);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment