diff options
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r-- | arch/mips/kernel/traps.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index f6083c6bfaa4..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 | */ | ||
947 | asmlinkage void do_watch(struct pt_regs *regs) | 950 | asmlinkage 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 | ||
971 | asmlinkage void do_mcheck(struct pt_regs *regs) | 977 | asmlinkage void do_mcheck(struct pt_regs *regs) |
@@ -1582,7 +1588,11 @@ void __init set_handler(unsigned long offset, void *addr, unsigned long size) | |||
1582 | static char panic_null_cerr[] __cpuinitdata = | 1588 | static char panic_null_cerr[] __cpuinitdata = |
1583 | "Trying to set NULL cache error exception handler"; | 1589 | "Trying to set NULL cache error exception handler"; |
1584 | 1590 | ||
1585 | /* Install uncached CPU exception handler */ | 1591 | /* |
1592 | * Install uncached CPU exception handler. | ||
1593 | * This is suitable only for the cache error exception which is the only | ||
1594 | * exception handler that is being run uncached. | ||
1595 | */ | ||
1586 | void __cpuinit set_uncached_handler(unsigned long offset, void *addr, | 1596 | void __cpuinit set_uncached_handler(unsigned long offset, void *addr, |
1587 | unsigned long size) | 1597 | unsigned long size) |
1588 | { | 1598 | { |
@@ -1593,7 +1603,7 @@ void __cpuinit set_uncached_handler(unsigned long offset, void *addr, | |||
1593 | unsigned long uncached_ebase = TO_UNCAC(ebase); | 1603 | unsigned long uncached_ebase = TO_UNCAC(ebase); |
1594 | #endif | 1604 | #endif |
1595 | if (cpu_has_mips_r2) | 1605 | if (cpu_has_mips_r2) |
1596 | ebase += (read_c0_ebase() & 0x3ffff000); | 1606 | uncached_ebase += (read_c0_ebase() & 0x3ffff000); |
1597 | 1607 | ||
1598 | if (!addr) | 1608 | if (!addr) |
1599 | panic(panic_null_cerr); | 1609 | panic(panic_null_cerr); |