patch-2.4.0-test3 linux/arch/mips64/kernel/setup.c
Next file: linux/arch/mips64/kernel/signal.c
Previous file: linux/arch/mips64/kernel/scall_o32.S
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Sun Jul 9 22:18:16 2000
- Orig file:
v2.4.0-test2/linux/arch/mips64/kernel/setup.c
- Orig date:
Tue May 23 15:31:33 2000
diff -u --recursive --new-file v2.4.0-test2/linux/arch/mips64/kernel/setup.c linux/arch/mips64/kernel/setup.c
@@ -35,6 +35,7 @@
#include <asm/io.h>
#include <asm/stackframe.h>
#include <asm/system.h>
+#include <asm/pgalloc.h>
#ifdef CONFIG_SGI_IP27
/* XXX Origin garbage has no business in this file */
@@ -153,6 +154,9 @@
unsigned long tmp;
unsigned long *initrd_header;
#endif
+ int i;
+ pmd_t *pmd = kpmdtbl;
+ pte_t *pte = kptbl;
cpu_probe();
load_mmu();
@@ -191,4 +195,10 @@
#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;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)