On Sat, 23 Oct 2004, Maciej W. Rozycki wrote:
> Thanks for tracking down this problem -- I think we want the following
> fix on top of yours to handle the R3k style of exception handling. I
> don't have a way to test it ATM (I'd appreciate feedback if anyone could
> do that for me), but it should be obvious.
> Ralf, do you agree?
We want interrupts to be disabled until rfe, of course. Here's an
update. Hopefully no more bugs here...
diff -up --recursive --new-file
--- linux-mips-2.6.9-20041023.macro/arch/mips/kernel/process.c Sat Oct 23
+++ linux-mips-2.6.9-20041023/arch/mips/kernel/process.c Sat Oct 23
@@ -175,7 +175,10 @@ long kernel_thread(int (*fn)(void *), vo
regs.regs = (unsigned long) fn;
regs.cp0_epc = (unsigned long) kernel_thread_helper;
regs.cp0_status = read_c0_status();
-#if !(defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX))
+#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
+ regs.cp0_status &= ~(ST0_KUP | ST0_IEC);
+ regs.cp0_status |= ST0_IEP;
regs.cp0_status |= ST0_EXL;