diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2007-09-18 13:49:08 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:04 -0400 |
commit | e5d77754c5e1a54f9eb61c03085d7932a0b6b738 (patch) | |
tree | 0d48b6f7297c79591707a19cd872535fb3f9de37 | |
parent | 0f5c90644240cc17d5940fa3594cc51ad1ae7ba7 (diff) |
[MIPS] R3000 setup for kernel_thread()
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>
-rw-r--r-- | arch/mips/kernel/process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index e6ce943099a0..aadd2cd5778c 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -231,8 +231,8 @@ long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | |||
231 | regs.cp0_epc = (unsigned long) kernel_thread_helper; | 231 | regs.cp0_epc = (unsigned long) kernel_thread_helper; |
232 | regs.cp0_status = read_c0_status(); | 232 | regs.cp0_status = read_c0_status(); |
233 | #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) | 233 | #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) |
234 | regs.cp0_status &= ~(ST0_KUP | ST0_IEC); | 234 | regs.cp0_status = (regs.cp0_status & ~(ST0_KUP | ST0_IEP | ST0_IEC)) | |
235 | regs.cp0_status |= ST0_IEP; | 235 | ((regs.cp0_status & (ST0_KUC | ST0_IEC)) << 2); |
236 | #else | 236 | #else |
237 | regs.cp0_status |= ST0_EXL; | 237 | regs.cp0_status |= ST0_EXL; |
238 | #endif | 238 | #endif |