]> err.no Git - linux-2.6/commitdiff
[MIPS] R3000 setup for kernel_thread()
authorMaciej W. Rozycki <macro@linux-mips.org>
Tue, 18 Sep 2007 17:49:08 +0000 (18:49 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 11 Oct 2007 22:46:04 +0000 (23:46 +0100)
 Match the R4000 semantics for the initial state of interrupt/kernel
status register flags for the R3000 in kernel_thread().

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/process.c

index e6ce943099a040d06d466adb3470a7454d320f60..aadd2cd5778cd9423929f48918f29af830807146 100644 (file)
@@ -231,8 +231,8 @@ long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
        regs.cp0_epc = (unsigned long) kernel_thread_helper;
        regs.cp0_status = read_c0_status();
 #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
-       regs.cp0_status &= ~(ST0_KUP | ST0_IEC);
-       regs.cp0_status |= ST0_IEP;
+       regs.cp0_status = (regs.cp0_status & ~(ST0_KUP | ST0_IEP | ST0_IEC)) |
+                         ((regs.cp0_status & (ST0_KUC | ST0_IEC)) << 2);
 #else
        regs.cp0_status |= ST0_EXL;
 #endif