Merge ../linux-2.6-watchdog-mm
[linux-drm-fsl-dcu.git] / arch / mips / kernel / genex.S
index ff7af369f2862eedd4e8fbf08eb6eb3adf263010..5baca16993d08f512c2a1956a21755fd55521a94 100644 (file)
@@ -8,12 +8,12 @@
  * Copyright (C) 2001 MIPS Technologies, Inc.
  * Copyright (C) 2002 Maciej W. Rozycki
  */
-#include <linux/config.h>
 #include <linux/init.h>
 
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
 #include <asm/cacheops.h>
+#include <asm/irqflags.h>
 #include <asm/regdef.h>
 #include <asm/fpregdef.h>
 #include <asm/mipsregs.h>
@@ -129,9 +129,11 @@ handle_vcei:
 NESTED(handle_int, PT_SIZE, sp)
        SAVE_ALL
        CLI
+       TRACE_IRQS_OFF
 
+       LONG_L  s0, TI_REGS($28)
+       LONG_S  sp, TI_REGS($28)
        PTR_LA  ra, ret_from_irq
-       move    a0, sp
        j       plat_irq_dispatch
        END(handle_int)
 
@@ -214,12 +216,15 @@ NESTED(except_vec_vi_handler, 0, sp)
        mtc0    t0, CP0_TCCONTEXT
        xor     t1, t1, t0
        mtc0    t1, CP0_STATUS
-       ehb
+       _ehb
 #endif /* CONFIG_MIPS_MT_SMTC */
        CLI
-       move    a0, sp
-       jalr    v0
-       j       ret_from_irq
+       TRACE_IRQS_OFF
+
+       LONG_L  s0, TI_REGS($28)
+       LONG_S  sp, TI_REGS($28)
+       PTR_LA  ra, ret_from_irq
+       jr      v0
        END(except_vec_vi_handler)
 
 /*
@@ -289,11 +294,13 @@ NESTED(nmi_handler, PT_SIZE, sp)
        .endm
 
        .macro  __build_clear_sti
+       TRACE_IRQS_ON
        STI
        .endm
 
        .macro  __build_clear_cli
        CLI
+       TRACE_IRQS_OFF
        .endm
 
        .macro  __build_clear_fpe
@@ -301,6 +308,7 @@ NESTED(nmi_handler, PT_SIZE, sp)
        li      a2, ~(0x3f << 12)
        and     a2, a1
        ctc1    a2, fcr31
+       TRACE_IRQS_ON
        STI
        .endm
 
@@ -344,8 +352,8 @@ NESTED(nmi_handler, PT_SIZE, sp)
        .set    at
        __BUILD_\verbose \exception
        move    a0, sp
-       jal     do_\handler
-       j       ret_from_exception
+       PTR_LA  ra, ret_from_exception
+       j       do_\handler
        END(handle_\exception)
        .endm
 
@@ -366,7 +374,7 @@ NESTED(nmi_handler, PT_SIZE, sp)
        BUILD_HANDLER mdmx mdmx sti silent              /* #22 */
        BUILD_HANDLER watch watch sti verbose           /* #23 */
        BUILD_HANDLER mcheck mcheck cli verbose         /* #24 */
-       BUILD_HANDLER mt mt sti verbose                 /* #25 */
+       BUILD_HANDLER mt mt sti silent                  /* #25 */
        BUILD_HANDLER dsp dsp sti silent                /* #26 */
        BUILD_HANDLER reserved reserved sti verbose     /* others */