MIPS: Provide a symbol for the legacy performance counter interrupt.
authorRalf Baechle <ralf@linux-mips.org>
Fri, 6 Jul 2012 21:56:00 +0000 (23:56 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 6 Jul 2012 21:56:00 +0000 (23:56 +0200)
Based on https://patchwork.linux-mips.org/patch/3576 - but this really
deserves its own patchset and the symbol should also be used :)

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/irq.h
arch/mips/kernel/traps.c

index fb698dc09bc9c39c60cf7c0d43992b424e239551..78dbb8a86da249d4bd4e6fa2db6b6c6b0c4bd4ed 100644 (file)
@@ -136,6 +136,7 @@ extern void free_irqno(unsigned int irq);
  * IE7.  Since R2 their number has to be read from the c0_intctl register.
  */
 #define CP0_LEGACY_COMPARE_IRQ 7
+#define CP0_LEGACY_PERFCNT_IRQ 7
 
 extern int cp0_compare_irq;
 extern int cp0_compare_irq_shift;
index 2d0c2a277f525b5b89b89500a5153c9032ed4ce3..f985b7292cd93f563ae982ea174a1ca39c3ebe52 100644 (file)
@@ -1597,7 +1597,7 @@ void __cpuinit per_cpu_trap_init(bool is_boot_cpu)
                        cp0_perfcount_irq = -1;
        } else {
                cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ;
-               cp0_compare_irq_shift = cp0_compare_irq;
+               cp0_compare_irq_shift = CP0_LEGACY_PERFCNT_IRQ;
                cp0_perfcount_irq = -1;
        }