| 1 | Index: linux-2.6.33.2/arch/mips/kernel/traps.c |
| 2 | =================================================================== |
| 3 | --- linux-2.6.33.2.orig/arch/mips/kernel/traps.c 2010-04-02 01:02:33.000000000 +0200 |
| 4 | +++ linux-2.6.33.2/arch/mips/kernel/traps.c 2010-04-02 23:36:16.000000000 +0200 |
| 5 | @@ -1496,7 +1496,18 @@ |
| 6 | if (cpu_has_mips_r2) { |
| 7 | cp0_compare_irq_shift = CAUSEB_TI - CAUSEB_IP; |
| 8 | cp0_compare_irq = (read_c0_intctl() >> INTCTLB_IPTI) & 7; |
| 9 | + |
| 10 | + if (!cp0_compare_irq) |
| 11 | + cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ; |
| 12 | + |
| 13 | cp0_perfcount_irq = (read_c0_intctl() >> INTCTLB_IPPCI) & 7; |
| 14 | + |
| 15 | + if (!cp0_perfcount_irq) |
| 16 | + cp0_perfcount_irq = CP0_LEGACY_PERFCNT_IRQ; |
| 17 | + |
| 18 | + if (arch_fixup_c0_irqs) |
| 19 | + arch_fixup_c0_irqs(); |
| 20 | + |
| 21 | if (cp0_perfcount_irq == cp0_compare_irq) |
| 22 | cp0_perfcount_irq = -1; |
| 23 | } else { |
| 24 | Index: linux-2.6.33.2/arch/mips/include/asm/irq.h |
| 25 | =================================================================== |
| 26 | --- linux-2.6.33.2.orig/arch/mips/include/asm/irq.h 2010-04-02 01:02:33.000000000 +0200 |
| 27 | +++ linux-2.6.33.2/arch/mips/include/asm/irq.h 2010-04-02 23:37:14.000000000 +0200 |
| 28 | @@ -133,9 +133,11 @@ |
| 29 | * IE7. Since R2 their number has to be read from the c0_intctl register. |
| 30 | */ |
| 31 | #define CP0_LEGACY_COMPARE_IRQ 7 |
| 32 | +#define CP0_LEGACY_PERFCNT_IRQ 7 |
| 33 | |
| 34 | extern int cp0_compare_irq; |
| 35 | extern int cp0_compare_irq_shift; |
| 36 | extern int cp0_perfcount_irq; |
| 37 | +extern void __weak arch_fixup_c0_irqs(void); |
| 38 | |
| 39 | #endif /* _ASM_IRQ_H */ |
| 40 | |