aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lemote
diff options
context:
space:
mode:
authorWu Zhangjin <wuzj@lemote.com>2009-07-02 11:25:46 -0400
committerRalf Baechle <ralf@linux-mips.org>2009-09-17 14:07:47 -0400
commit67b35e5d01aba7a83f2161b0c90acb08afa01e3e (patch)
treeb85665bc0611c07d26299c20424332cc8899133d /arch/mips/lemote
parent92d1b63dbae0865bee5317ca6b65e0b304dc590d (diff)
MIPS: Loongson: Add oprofile support
This kernel support is needed by the user-space tool:oprofile to profile linux kernel or applications via loongson2 performance counters. you can enable this driver via CONFIG_OPROFILE = y or m. On Loongson2 there are two performance counters, each one can count 16 events respectively. when anyone of the performance counter overflows, an interrupt will be generated and is routed to the IRQ MIPS_CPU_IRQ_BASE + 6. Signed-off-by: Yanhua <yanh@lemote.com> Signed-off-by: Wu Zhangjin <wuzj@lemote.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lemote')
-rw-r--r--arch/mips/lemote/lm2e/irq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/lemote/lm2e/irq.c b/arch/mips/lemote/lm2e/irq.c
index fb7643a25618..9585f5aa7cce 100644
--- a/arch/mips/lemote/lm2e/irq.c
+++ b/arch/mips/lemote/lm2e/irq.c
@@ -58,6 +58,8 @@ asmlinkage void plat_irq_dispatch(void)
58 58
59 if (pending & CAUSEF_IP7) 59 if (pending & CAUSEF_IP7)
60 do_IRQ(MIPS_CPU_IRQ_BASE + 7); 60 do_IRQ(MIPS_CPU_IRQ_BASE + 7);
61 else if (pending & CAUSEF_IP6) /* perf counter loverflow */
62 do_IRQ(LOONGSON2_PERFCNT_IRQ);
61 else if (pending & CAUSEF_IP5) 63 else if (pending & CAUSEF_IP5)
62 i8259_irqdispatch(); 64 i8259_irqdispatch();
63 else if (pending & CAUSEF_IP2) 65 else if (pending & CAUSEF_IP2)