]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/kernel/traps.c
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-2.6-omap-h63xx.git] / arch / mips / kernel / traps.c
index 6f3ff96906864e29244670df11a05e509820bd91..005debbfbe84416540e30fb88cd5123e9dbef33b 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1994 - 1999, 2000, 01 Ralf Baechle
+ * Copyright (C) 1994 - 1999, 2000, 01, 06 Ralf Baechle
  * Copyright (C) 1995, 1996 Paul M. Antoine
  * Copyright (C) 1998 Ulf Carlsson
  * Copyright (C) 1999 Silicon Graphics, Inc.
@@ -519,7 +519,7 @@ static inline int simulate_llsc(struct pt_regs *regs)
  */
 static inline int simulate_rdhwr(struct pt_regs *regs)
 {
-       struct thread_info *ti = current->thread_info;
+       struct thread_info *ti = task_thread_info(current);
        unsigned int opcode;
 
        if (unlikely(get_insn_opcode(regs, &opcode)))
@@ -534,19 +534,22 @@ static inline int simulate_rdhwr(struct pt_regs *regs)
                switch (rd) {
                        case 29:
                                regs->regs[rt] = ti->tp_value;
-                               break;
+                               return 0;
                        default:
                                return -EFAULT;
                }
        }
 
-       return 0;
+       /* Not ours.  */
+       return -EFAULT;
 }
 
 asmlinkage void do_ov(struct pt_regs *regs)
 {
        siginfo_t info;
 
+       die_if_kernel("Integer overflow", regs);
+
        info.si_code = FPE_INTOVF;
        info.si_signo = SIGFPE;
        info.si_errno = 0;
@@ -1167,7 +1170,7 @@ void __init per_cpu_trap_init(void)
 #endif
        if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
                status_set |= ST0_XX;
-       change_c0_status(ST0_CU|ST0_MX|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
+       change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
                         status_set);
 
        if (cpu_has_dsp)