aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/genex.S6
-rw-r--r--arch/mips/kernel/traps.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index fb6f73148df2..8882e5766f27 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -458,7 +458,11 @@ NESTED(nmi_handler, PT_SIZE, sp)
458 BUILD_HANDLER fpe fpe fpe silent /* #15 */ 458 BUILD_HANDLER fpe fpe fpe silent /* #15 */
459 BUILD_HANDLER mdmx mdmx sti silent /* #22 */ 459 BUILD_HANDLER mdmx mdmx sti silent /* #22 */
460#ifdef CONFIG_HARDWARE_WATCHPOINTS 460#ifdef CONFIG_HARDWARE_WATCHPOINTS
461 BUILD_HANDLER watch watch sti silent /* #23 */ 461 /*
462 * For watch, interrupts will be enabled after the watch
463 * registers are read.
464 */
465 BUILD_HANDLER watch watch cli silent /* #23 */
462#else 466#else
463 BUILD_HANDLER watch watch sti verbose /* #23 */ 467 BUILD_HANDLER watch watch sti verbose /* #23 */
464#endif 468#endif
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index fa06460cbf2c..b2d7041341b8 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -944,6 +944,9 @@ asmlinkage void do_mdmx(struct pt_regs *regs)
944 force_sig(SIGILL, current); 944 force_sig(SIGILL, current);
945} 945}
946 946
947/*
948 * Called with interrupts disabled.
949 */
947asmlinkage void do_watch(struct pt_regs *regs) 950asmlinkage void do_watch(struct pt_regs *regs)
948{ 951{
949 u32 cause; 952 u32 cause;
@@ -963,9 +966,12 @@ asmlinkage void do_watch(struct pt_regs *regs)
963 */ 966 */
964 if (test_tsk_thread_flag(current, TIF_LOAD_WATCH)) { 967 if (test_tsk_thread_flag(current, TIF_LOAD_WATCH)) {
965 mips_read_watch_registers(); 968 mips_read_watch_registers();
969 local_irq_enable();
966 force_sig(SIGTRAP, current); 970 force_sig(SIGTRAP, current);
967 } else 971 } else {
968 mips_clear_watch_registers(); 972 mips_clear_watch_registers();
973 local_irq_enable();
974 }
969} 975}
970 976
971asmlinkage void do_mcheck(struct pt_regs *regs) 977asmlinkage void do_mcheck(struct pt_regs *regs)