1 Index: linux-2.6.24.7/arch/mips/kernel/traps.c
2 ===================================================================
3 --- linux-2.6.24.7.orig/arch/mips/kernel/traps.c
4 +++ linux-2.6.24.7/arch/mips/kernel/traps.c
6 #include <asm/mmu_context.h>
8 #include <asm/stacktrace.h>
11 extern asmlinkage void handle_int(void);
12 extern asmlinkage void handle_tlbm(void);
13 @@ -1360,6 +1361,8 @@ void __init per_cpu_trap_init(void)
15 if (cpu_has_mips_r2) {
16 cp0_compare_irq = (read_c0_intctl() >> 29) & 7;
17 + if (get_c0_compare_irq)
18 + cp0_compare_irq = get_c0_compare_irq();
19 cp0_perfcount_irq = (read_c0_intctl() >> 26) & 7;
20 if (cp0_perfcount_irq == cp0_compare_irq)
21 cp0_perfcount_irq = -1;
22 Index: linux-2.6.24.7/include/asm-mips/time.h
23 ===================================================================
24 --- linux-2.6.24.7.orig/include/asm-mips/time.h
25 +++ linux-2.6.24.7/include/asm-mips/time.h
26 @@ -60,6 +60,7 @@ extern int (*perf_irq)(void);
27 #ifdef CONFIG_CEVT_R4K
28 extern int mips_clockevent_init(void);
29 extern unsigned int __weak get_c0_compare_int(void);
30 +extern unsigned int __weak get_c0_compare_irq(void);
32 static inline int mips_clockevent_init(void)
34 Index: linux-2.6.24.7/arch/mips/atheros/board.c
35 ===================================================================
36 --- linux-2.6.24.7.orig/arch/mips/atheros/board.c
37 +++ linux-2.6.24.7/arch/mips/atheros/board.c
38 @@ -205,6 +205,11 @@ void (*board_time_init)(void);
39 void __init plat_time_init(void) {
43 +unsigned int __init get_c0_compare_irq(void)
45 + return CP0_LEGACY_COMPARE_IRQ;
49 void __init arch_init_irq(void)