aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/entry.S15
-rw-r--r--arch/mips/kernel/gdb-low.S2
-rw-r--r--arch/mips/kernel/genex.S6
-rw-r--r--arch/mips/kernel/head.S3
-rw-r--r--arch/mips/kernel/scall32-o32.S15
-rw-r--r--arch/mips/kernel/scall64-64.S2
-rw-r--r--arch/mips/kernel/scall64-n32.S2
-rw-r--r--arch/mips/kernel/scall64-o32.S2
-rw-r--r--arch/mips/kernel/smtc-asm.S1
9 files changed, 46 insertions, 2 deletions
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index 01e7fa86aa43..766655f35250 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -113,6 +113,21 @@ FEXPORT(restore_all) # restore full frame
113 RESTORE_AT 113 RESTORE_AT
114 RESTORE_STATIC 114 RESTORE_STATIC
115FEXPORT(restore_partial) # restore partial frame 115FEXPORT(restore_partial) # restore partial frame
116#ifdef CONFIG_TRACE_IRQFLAGS
117 SAVE_STATIC
118 SAVE_AT
119 SAVE_TEMP
120 LONG_L v0, PT_STATUS(sp)
121 and v0, 1
122 beqz v0, 1f
123 jal trace_hardirqs_on
124 b 2f
1251: jal trace_hardirqs_off
1262:
127 RESTORE_TEMP
128 RESTORE_AT
129 RESTORE_STATIC
130#endif
116 RESTORE_SOME 131 RESTORE_SOME
117 RESTORE_SP_AND_RET 132 RESTORE_SP_AND_RET
118 .set at 133 .set at
diff --git a/arch/mips/kernel/gdb-low.S b/arch/mips/kernel/gdb-low.S
index 666bc9014cbd..2c446063636a 100644
--- a/arch/mips/kernel/gdb-low.S
+++ b/arch/mips/kernel/gdb-low.S
@@ -7,6 +7,7 @@
7 7
8#include <asm/asm.h> 8#include <asm/asm.h>
9#include <asm/errno.h> 9#include <asm/errno.h>
10#include <asm/irqflags.h>
10#include <asm/mipsregs.h> 11#include <asm/mipsregs.h>
11#include <asm/regdef.h> 12#include <asm/regdef.h>
12#include <asm/stackframe.h> 13#include <asm/stackframe.h>
@@ -120,6 +121,7 @@
120 LONG_S $31, GDB_FR_REG31(sp) 121 LONG_S $31, GDB_FR_REG31(sp)
121 122
122 CLI /* disable interrupts */ 123 CLI /* disable interrupts */
124 TRACE_IRQS_OFF
123 125
124/* 126/*
125 * Followed by the floating point registers 127 * Followed by the floating point registers
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index b563811b1b27..37fda3dcdfc5 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -13,6 +13,7 @@
13#include <asm/asm.h> 13#include <asm/asm.h>
14#include <asm/asmmacro.h> 14#include <asm/asmmacro.h>
15#include <asm/cacheops.h> 15#include <asm/cacheops.h>
16#include <asm/irqflags.h>
16#include <asm/regdef.h> 17#include <asm/regdef.h>
17#include <asm/fpregdef.h> 18#include <asm/fpregdef.h>
18#include <asm/mipsregs.h> 19#include <asm/mipsregs.h>
@@ -128,6 +129,7 @@ handle_vcei:
128NESTED(handle_int, PT_SIZE, sp) 129NESTED(handle_int, PT_SIZE, sp)
129 SAVE_ALL 130 SAVE_ALL
130 CLI 131 CLI
132 TRACE_IRQS_OFF
131 133
132 PTR_LA ra, ret_from_irq 134 PTR_LA ra, ret_from_irq
133 move a0, sp 135 move a0, sp
@@ -216,6 +218,7 @@ NESTED(except_vec_vi_handler, 0, sp)
216 _ehb 218 _ehb
217#endif /* CONFIG_MIPS_MT_SMTC */ 219#endif /* CONFIG_MIPS_MT_SMTC */
218 CLI 220 CLI
221 TRACE_IRQS_OFF
219 move a0, sp 222 move a0, sp
220 jalr v0 223 jalr v0
221 j ret_from_irq 224 j ret_from_irq
@@ -288,11 +291,13 @@ NESTED(nmi_handler, PT_SIZE, sp)
288 .endm 291 .endm
289 292
290 .macro __build_clear_sti 293 .macro __build_clear_sti
294 TRACE_IRQS_ON
291 STI 295 STI
292 .endm 296 .endm
293 297
294 .macro __build_clear_cli 298 .macro __build_clear_cli
295 CLI 299 CLI
300 TRACE_IRQS_OFF
296 .endm 301 .endm
297 302
298 .macro __build_clear_fpe 303 .macro __build_clear_fpe
@@ -300,6 +305,7 @@ NESTED(nmi_handler, PT_SIZE, sp)
300 li a2, ~(0x3f << 12) 305 li a2, ~(0x3f << 12)
301 and a2, a1 306 and a2, a1
302 ctc1 a2, fcr31 307 ctc1 a2, fcr31
308 TRACE_IRQS_ON
303 STI 309 STI
304 .endm 310 .endm
305 311
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index 476c1eb33c94..8c6db0fc72f0 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -5,7 +5,7 @@
5 * 5 *
6 * Copyright (C) 1994, 1995 Waldorf Electronics 6 * Copyright (C) 1994, 1995 Waldorf Electronics
7 * Written by Ralf Baechle and Andreas Busse 7 * Written by Ralf Baechle and Andreas Busse
8 * Copyright (C) 1994, 95, 96, 97, 98, 99, 2003 Ralf Baechle 8 * Copyright (C) 1994 - 99, 2003, 06 Ralf Baechle
9 * Copyright (C) 1996 Paul M. Antoine 9 * Copyright (C) 1996 Paul M. Antoine
10 * Modified for DECStation and hence R3000 support by Paul M. Antoine 10 * Modified for DECStation and hence R3000 support by Paul M. Antoine
11 * Further modifications by David S. Miller and Harald Koerfgen 11 * Further modifications by David S. Miller and Harald Koerfgen
@@ -18,6 +18,7 @@
18 18
19#include <asm/asm.h> 19#include <asm/asm.h>
20#include <asm/asmmacro.h> 20#include <asm/asmmacro.h>
21#include <asm/irqflags.h>
21#include <asm/regdef.h> 22#include <asm/regdef.h>
22#include <asm/page.h> 23#include <asm/page.h>
23#include <asm/mipsregs.h> 24#include <asm/mipsregs.h>
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index c8e5f9c9a113..ba1bcd83c7d3 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -3,13 +3,14 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02 by Ralf Baechle 6 * Copyright (C) 1995-99, 2000- 02, 06 Ralf Baechle <ralf@linux-mips.org>
7 * Copyright (C) 2001 MIPS Technologies, Inc. 7 * Copyright (C) 2001 MIPS Technologies, Inc.
8 * Copyright (C) 2004 Thiemo Seufer 8 * Copyright (C) 2004 Thiemo Seufer
9 */ 9 */
10#include <linux/errno.h> 10#include <linux/errno.h>
11#include <asm/asm.h> 11#include <asm/asm.h>
12#include <asm/asmmacro.h> 12#include <asm/asmmacro.h>
13#include <asm/irqflags.h>
13#include <asm/mipsregs.h> 14#include <asm/mipsregs.h>
14#include <asm/regdef.h> 15#include <asm/regdef.h>
15#include <asm/stackframe.h> 16#include <asm/stackframe.h>
@@ -27,6 +28,18 @@
27NESTED(handle_sys, PT_SIZE, sp) 28NESTED(handle_sys, PT_SIZE, sp)
28 .set noat 29 .set noat
29 SAVE_SOME 30 SAVE_SOME
31#ifdef CONFIG_TRACE_IRQFLAGS
32 TRACE_IRQS_ON
33#ifdef CONFIG_64BIT
34 LONG_L $8, PT_R8(sp)
35 LONG_L $9, PT_R9(sp)
36#endif
37 LONG_L $7, PT_R7(sp)
38 LONG_L $6, PT_R6(sp)
39 LONG_L $5, PT_R5(sp)
40 LONG_L $4, PT_R4(sp)
41 LONG_L $2, PT_R2(sp)
42#endif
30 STI 43 STI
31 .set at 44 .set at
32 45
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 809fd1b55f84..939e172db953 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -10,6 +10,7 @@
10#include <linux/errno.h> 10#include <linux/errno.h>
11#include <asm/asm.h> 11#include <asm/asm.h>
12#include <asm/asmmacro.h> 12#include <asm/asmmacro.h>
13#include <asm/irqflags.h>
13#include <asm/mipsregs.h> 14#include <asm/mipsregs.h>
14#include <asm/regdef.h> 15#include <asm/regdef.h>
15#include <asm/stackframe.h> 16#include <asm/stackframe.h>
@@ -33,6 +34,7 @@ NESTED(handle_sys64, PT_SIZE, sp)
33 */ 34 */
34 .set noat 35 .set noat
35 SAVE_SOME 36 SAVE_SOME
37 TRACE_IRQS_ON
36 STI 38 STI
37 .set at 39 .set at
38#endif 40#endif
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index b2b5cb9fe571..98abbc5a9f13 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -10,6 +10,7 @@
10#include <linux/errno.h> 10#include <linux/errno.h>
11#include <asm/asm.h> 11#include <asm/asm.h>
12#include <asm/asmmacro.h> 12#include <asm/asmmacro.h>
13#include <asm/irqflags.h>
13#include <asm/mipsregs.h> 14#include <asm/mipsregs.h>
14#include <asm/regdef.h> 15#include <asm/regdef.h>
15#include <asm/stackframe.h> 16#include <asm/stackframe.h>
@@ -32,6 +33,7 @@ NESTED(handle_sysn32, PT_SIZE, sp)
32#ifndef CONFIG_MIPS32_O32 33#ifndef CONFIG_MIPS32_O32
33 .set noat 34 .set noat
34 SAVE_SOME 35 SAVE_SOME
36 TRACE_IRQS_ON
35 STI 37 STI
36 .set at 38 .set at
37#endif 39#endif
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 3a138dcc8827..505c9ee54009 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -16,6 +16,7 @@
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <asm/asm.h> 17#include <asm/asm.h>
18#include <asm/asmmacro.h> 18#include <asm/asmmacro.h>
19#include <asm/irqflags.h>
19#include <asm/mipsregs.h> 20#include <asm/mipsregs.h>
20#include <asm/regdef.h> 21#include <asm/regdef.h>
21#include <asm/stackframe.h> 22#include <asm/stackframe.h>
@@ -27,6 +28,7 @@
27NESTED(handle_sys, PT_SIZE, sp) 28NESTED(handle_sys, PT_SIZE, sp)
28 .set noat 29 .set noat
29 SAVE_SOME 30 SAVE_SOME
31 TRACE_IRQS_ON
30 STI 32 STI
31 .set at 33 .set at
32 ld t1, PT_EPC(sp) # skip syscall on return 34 ld t1, PT_EPC(sp) # skip syscall on return
diff --git a/arch/mips/kernel/smtc-asm.S b/arch/mips/kernel/smtc-asm.S
index 72c6d98f8854..4cc3dea36612 100644
--- a/arch/mips/kernel/smtc-asm.S
+++ b/arch/mips/kernel/smtc-asm.S
@@ -96,6 +96,7 @@ FEXPORT(__smtc_ipi_vector)
96 /* Save all will redundantly recompute the SP, but use it for now */ 96 /* Save all will redundantly recompute the SP, but use it for now */
97 SAVE_ALL 97 SAVE_ALL
98 CLI 98 CLI
99 TRACE_IRQS_OFF
99 move a0,sp 100 move a0,sp
100 /* Function to be invoked passed stack pad slot 5 */ 101 /* Function to be invoked passed stack pad slot 5 */
101 lw t0,PT_PADSLOT5(sp) 102 lw t0,PT_PADSLOT5(sp)