| 1 | --- a/arch/mips/kernel/traps.c |
| 2 | +++ b/arch/mips/kernel/traps.c |
| 3 | @@ -48,6 +48,7 @@ |
| 4 | #include <asm/types.h> |
| 5 | #include <asm/stacktrace.h> |
| 6 | #include <asm/irq.h> |
| 7 | +#include <asm/time.h> |
| 8 | |
| 9 | extern void check_wait(void); |
| 10 | extern asmlinkage void r4k_wait(void); |
| 11 | @@ -1537,6 +1538,8 @@ void __cpuinit per_cpu_trap_init(void) |
| 12 | */ |
| 13 | if (cpu_has_mips_r2) { |
| 14 | cp0_compare_irq = (read_c0_intctl() >> 29) & 7; |
| 15 | + if (get_c0_compare_irq) |
| 16 | + cp0_compare_irq = get_c0_compare_irq(); |
| 17 | cp0_perfcount_irq = (read_c0_intctl() >> 26) & 7; |
| 18 | if (cp0_perfcount_irq == cp0_compare_irq) |
| 19 | cp0_perfcount_irq = -1; |
| 20 | --- a/arch/mips/include/asm/time.h |
| 21 | +++ b/arch/mips/include/asm/time.h |
| 22 | @@ -52,6 +52,7 @@ extern int (*perf_irq)(void); |
| 23 | */ |
| 24 | #ifdef CONFIG_CEVT_R4K_LIB |
| 25 | extern unsigned int __weak get_c0_compare_int(void); |
| 26 | +extern unsigned int __weak get_c0_compare_irq(void); |
| 27 | extern int r4k_clockevent_init(void); |
| 28 | #endif |
| 29 | |
| 30 | |