diff options
author | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-07-06 00:09:40 +0000 |
---|---|---|
committer | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-07-06 00:09:40 +0000 |
commit | 949c604d3d84d59df95445a4231aaaa00b06800a (patch) | |
tree | 188c6269d0136f3998358cf01919e37596402888 /arch/mips64 | |
parent | bae03c055d11da8172ac22e1f7f6104132138306 (diff) |
Vmalloc/vfree fixes: use swapper_pg_dir[0] for the vmalloc range
translations, use a kernel pmd table that points into the kptbl[].
This is to make the generic part of vmalloc()/vfree() find pgd/pmd/pte
that it expects.
Diffstat (limited to 'arch/mips64')
-rw-r--r-- | arch/mips64/kernel/head.S | 1 | ||||
-rw-r--r-- | arch/mips64/kernel/setup.c | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/mips64/kernel/head.S b/arch/mips64/kernel/head.S index 74d3c34ef..f87366d21 100644 --- a/arch/mips64/kernel/head.S +++ b/arch/mips64/kernel/head.S @@ -173,4 +173,5 @@ NESTED(bootstrap, 16, sp) page empty_bad_pmd_table, 1 page kptbl, KPTBL_PAGE_ORDER .globl ekptbl + page kpmdtbl, 0 ekptbl: diff --git a/arch/mips64/kernel/setup.c b/arch/mips64/kernel/setup.c index 93f7f8a78..691e88d20 100644 --- a/arch/mips64/kernel/setup.c +++ b/arch/mips64/kernel/setup.c @@ -154,8 +154,10 @@ void __init setup_arch(char **cmdline_p) unsigned long tmp; unsigned long *initrd_header; #endif + int i; + pmd_t *pmd = kpmdtbl; + pte_t *pte = kptbl; - memset((void *)kptbl, 0, PAGE_SIZE << KPTBL_PAGE_ORDER); cpu_probe(); load_mmu(); @@ -193,4 +195,10 @@ void __init setup_arch(char **cmdline_p) #endif paging_init(); + + memset((void *)kptbl, 0, PAGE_SIZE << KPTBL_PAGE_ORDER); + memset((void *)kpmdtbl, 0, PAGE_SIZE); + pgd_set(swapper_pg_dir, kpmdtbl); + for (i = 0; i < (1 << KPTBL_PAGE_ORDER); pmd++,i++,pte+=PTRS_PER_PTE) + pmd_val(*pmd) = (unsigned long)pte; } |