Subject: [PATCH] Clear BEV in init_traps

From: "Bradley D. LaRonde" <[email-masked]>
Date: Fri, 22 Mar 2002 11:48:37 -0500

This used to happen in head.S, then got moved to per_cpu_trap_init, but
that only covers secondary cpus.  This takes care of the boot cpu.

Regards,
Brad

diff -urNbB -X ../diff-linux-exclude ../oss/linux-oss-2.4-2002-03-19/arch/mips/kernel/traps.c linux-encore-oss-merge/arch/mips/kernel/traps.c
--- ../oss/linux-oss-2.4-2002-03-19/arch/mips/kernel/traps.c	Tue Mar 19 20:18:36 2002
+++ linux-encore-oss-merge/arch/mips/kernel/traps.c	Fri Mar 22 09:58:36 2002
@@ -852,6 +852,9 @@
 	extern char except_vec_ejtag_debug;
 	unsigned long i;
 
+	/* Some firmware leaves the BEV flag set, clear it.  */
+	clear_cp0_status(ST0_BEV);
+
 	/* 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);