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>
This commit is contained in:

committed by
Ralf Baechle

parent
92d1b63dba
commit
67b35e5d01
@@ -50,4 +50,7 @@ extern void __init prom_init_env(void);
|
||||
#define LOONGSON_PXARB_CFG BONITO(BONITO_REGBASE + 0x68)
|
||||
#define LOONGSON_PXARB_STATUS BONITO(BONITO_REGBASE + 0x6c)
|
||||
|
||||
/* loongson2-specific perf counter IRQ */
|
||||
#define LOONGSON2_PERFCNT_IRQ (MIPS_CPU_IRQ_BASE + 6)
|
||||
|
||||
#endif /* __ASM_MACH_LOONGSON_LOONGSON_H */
|
||||
|
Reference in New Issue
Block a user