diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-01-16 01:29:05 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-01-16 01:29:05 +0000 |
commit | 0caeea50f881d30fef12520fe63ccb5fd02e6692 (patch) | |
tree | 7b6459318f5665ea2a9fa09d0c928eb4ea8a4bf1 | |
parent | d43ce58129481b49294520a3da01a903d0fe8e79 (diff) |
Initialize current_pgd such that vmalloc() can be used before the first
fork().
-rw-r--r-- | arch/mips/kernel/traps.c | 7 | ||||
-rw-r--r-- | arch/mips64/kernel/traps.c | 14 |
2 files changed, 14 insertions, 7 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index de981f1ae..14ea93094 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -1,4 +1,4 @@ -/* $Id: traps.c,v 1.25 1999/08/21 22:19:11 ralf Exp $ +/* $Id: traps.c,v 1.26 1999/12/04 03:59:00 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -25,6 +25,7 @@ #include <asm/watch.h> #include <asm/system.h> #include <asm/uaccess.h> +#include <asm/mmu_context.h> extern int console_loglevel; @@ -605,6 +606,9 @@ void __init trap_init(void) mips_machtype == MACH_SNI_RM200_PCI) EISA_bus = 1; + /* Some firmware leaves the BEV flag set, clear it. */ + set_cp0_status(ST0_BEV, 0); + /* Copy the generic exception handler code to it's final destination. */ memcpy((void *)(KSEG0 + 0x80), &except_vec1_generic, 0x80); memcpy((void *)(KSEG0 + 0x100), &except_vec2_generic, 0x80); @@ -736,4 +740,5 @@ void __init trap_init(void) atomic_inc(&init_mm.mm_count); /* XXX UP? */ current->active_mm = &init_mm; + current_pgd = init_mm.pgd; } diff --git a/arch/mips64/kernel/traps.c b/arch/mips64/kernel/traps.c index 38f67b59b..edb24201b 100644 --- a/arch/mips64/kernel/traps.c +++ b/arch/mips64/kernel/traps.c @@ -25,6 +25,7 @@ #include <asm/watch.h> #include <asm/system.h> #include <asm/uaccess.h> +#include <asm/mmu_context.h> extern int console_loglevel; @@ -486,6 +487,9 @@ void __init trap_init(void) extern char except_vec3_generic, except_vec3_r4000; unsigned long i; + /* Some firmware leaves the BEV flag set, clear it. */ + set_cp0_status(ST0_BEV, 0); + /* Copy the generic exception handler code to it's final destination. */ memcpy((void *)(KSEG0 + 0x100), &except_vec2_generic, 0x80); memcpy((void *)(KSEG0 + 0x180), &except_vec3_generic, 0x80); @@ -516,12 +520,8 @@ void __init trap_init(void) */ write_32bit_cp0_register(CP0_FRAMEMASK, 0); set_cp0_status(ST0_XX, ST0_XX); - /* - * The R10k might even work for Linux/MIPS - but we're paranoid - * and refuse to run until this is tested on real silicon - */ - panic("CPU too expensive - making holiday in the ANDES!"); - break; + goto r4k; + case CPU_R4000MC: case CPU_R4400MC: case CPU_R4000SC: @@ -535,6 +535,7 @@ void __init trap_init(void) case CPU_R4600: case CPU_R5000: case CPU_NEVADA: +r4k: /* Debug TLB refill handler. */ memcpy((void *)KSEG0, &__tlb_refill_debug_tramp, 0x80); memcpy((void *)KSEG0 + 0x080, &__xtlb_refill_debug_tramp, 0x80); @@ -585,4 +586,5 @@ void __init trap_init(void) atomic_inc(&init_mm.mm_count); /* XXX UP? */ current->active_mm = &init_mm; + current_pgd = init_mm.pgd; } |