From 67b35e5d01aba7a83f2161b0c90acb08afa01e3e Mon Sep 17 00:00:00 2001 From: Wu Zhangjin Date: Thu, 2 Jul 2009 23:25:46 +0800 Subject: 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 Signed-off-by: Wu Zhangjin Signed-off-by: Ralf Baechle --- arch/mips/lemote/lm2e/irq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/mips/lemote/lm2e') diff --git a/arch/mips/lemote/lm2e/irq.c b/arch/mips/lemote/lm2e/irq.c index fb7643a2561..9585f5aa7cc 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) if (pending & CAUSEF_IP7) do_IRQ(MIPS_CPU_IRQ_BASE + 7); + else if (pending & CAUSEF_IP6) /* perf counter loverflow */ + do_IRQ(LOONGSON2_PERFCNT_IRQ); else if (pending & CAUSEF_IP5) i8259_irqdispatch(); else if (pending & CAUSEF_IP2) -- cgit v1.2.3-70-g09d2