Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10984
b: refs/heads/master
c: 84fd089
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Oct 29, 2005
1 parent 696bfc9 commit 9dc2f04
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc26b815ddde4168cd853be9e62ecacd392e3f64
refs/heads/master: 84fd089a425f055ecf4a6a72f2509ccb98314b8f
4 changes: 2 additions & 2 deletions trunk/arch/mips/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ static void __init kmap_init(void)
kmap_prot = PAGE_KERNEL;
}

#ifdef CONFIG_64BIT
static void __init fixrange_init(unsigned long start, unsigned long end,
#ifdef CONFIG_32BIT
void __init fixrange_init(unsigned long start, unsigned long end,
pgd_t *pgd_base)
{
pgd_t *pgd;
Expand Down
32 changes: 1 addition & 31 deletions trunk/arch/mips/mm/pgtable-32.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/highmem.h>
#include <asm/fixmap.h>
#include <asm/pgtable.h>

void pgd_init(unsigned long page)
Expand All @@ -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)
{
#ifdef CONFIG_HIGHMEM
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/asm-mips/fixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,11 @@ static inline unsigned long virt_to_fix(const unsigned long 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

0 comments on commit 9dc2f04

Please sign in to comment.