diff options
Diffstat (limited to 'arch/mips/kernel/genex.S')
-rw-r--r-- | arch/mips/kernel/genex.S | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index aacd4a005c5f..297bd56c2347 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
@@ -128,6 +128,37 @@ handle_vcei: | |||
128 | 128 | ||
129 | .align 5 | 129 | .align 5 |
130 | NESTED(handle_int, PT_SIZE, sp) | 130 | NESTED(handle_int, PT_SIZE, sp) |
131 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
132 | /* | ||
133 | * Check to see if the interrupted code has just disabled | ||
134 | * interrupts and ignore this interrupt for now if so. | ||
135 | * | ||
136 | * local_irq_disable() disables interrupts and then calls | ||
137 | * trace_hardirqs_off() to track the state. If an interrupt is taken | ||
138 | * after interrupts are disabled but before the state is updated | ||
139 | * it will appear to restore_all that it is incorrectly returning with | ||
140 | * interrupts disabled | ||
141 | */ | ||
142 | .set push | ||
143 | .set noat | ||
144 | mfc0 k0, CP0_STATUS | ||
145 | #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) | ||
146 | and k0, ST0_IEP | ||
147 | bnez k0, 1f | ||
148 | |||
149 | mfc0 k0, EP0_EPC | ||
150 | .set noreorder | ||
151 | j k0 | ||
152 | rfe | ||
153 | #else | ||
154 | and k0, ST0_IE | ||
155 | bnez k0, 1f | ||
156 | |||
157 | eret | ||
158 | #endif | ||
159 | 1: | ||
160 | .set pop | ||
161 | #endif | ||
131 | SAVE_ALL | 162 | SAVE_ALL |
132 | CLI | 163 | CLI |
133 | TRACE_IRQS_OFF | 164 | TRACE_IRQS_OFF |
@@ -181,13 +212,13 @@ NESTED(except_vec_vi, 0, sp) | |||
181 | * during service by SMTC kernel, we also want to | 212 | * during service by SMTC kernel, we also want to |
182 | * pass the IM value to be cleared. | 213 | * pass the IM value to be cleared. |
183 | */ | 214 | */ |
184 | EXPORT(except_vec_vi_mori) | 215 | FEXPORT(except_vec_vi_mori) |
185 | ori a0, $0, 0 | 216 | ori a0, $0, 0 |
186 | #endif /* CONFIG_MIPS_MT_SMTC */ | 217 | #endif /* CONFIG_MIPS_MT_SMTC */ |
187 | EXPORT(except_vec_vi_lui) | 218 | FEXPORT(except_vec_vi_lui) |
188 | lui v0, 0 /* Patched */ | 219 | lui v0, 0 /* Patched */ |
189 | j except_vec_vi_handler | 220 | j except_vec_vi_handler |
190 | EXPORT(except_vec_vi_ori) | 221 | FEXPORT(except_vec_vi_ori) |
191 | ori v0, 0 /* Patched */ | 222 | ori v0, 0 /* Patched */ |
192 | .set pop | 223 | .set pop |
193 | END(except_vec_vi) | 224 | END(except_vec_vi) |
@@ -220,7 +251,17 @@ NESTED(except_vec_vi_handler, 0, sp) | |||
220 | _ehb | 251 | _ehb |
221 | #endif /* CONFIG_MIPS_MT_SMTC */ | 252 | #endif /* CONFIG_MIPS_MT_SMTC */ |
222 | CLI | 253 | CLI |
254 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
255 | move s0, v0 | ||
256 | #ifdef CONFIG_MIPS_MT_SMTC | ||
257 | move s1, a0 | ||
258 | #endif | ||
223 | TRACE_IRQS_OFF | 259 | TRACE_IRQS_OFF |
260 | #ifdef CONFIG_MIPS_MT_SMTC | ||
261 | move a0, s1 | ||
262 | #endif | ||
263 | move v0, s0 | ||
264 | #endif | ||
224 | 265 | ||
225 | LONG_L s0, TI_REGS($28) | 266 | LONG_L s0, TI_REGS($28) |
226 | LONG_S sp, TI_REGS($28) | 267 | LONG_S sp, TI_REGS($28) |