diff options
author | Wu Zhangjin <wuzhangjin@gmail.com> | 2010-07-24 05:22:14 +0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-08-05 16:26:24 +0400 |
commit | de3bc0e7ba5e89d63cb2dbac4e49a5c4b18669b5 (patch) | |
tree | 16813f3d063da6c8d8fdbe47b574b4067d048579 /arch/mips/include | |
parent | b8c7428af023c4cc37b8651e309713c1f4d9a18e (diff) | |
download | linux-de3bc0e7ba5e89d63cb2dbac4e49a5c4b18669b5.tar.xz |
MIPS: Loongson: Oprofile: add a new do_perfcnt_IRQ()
On FuLoong-2F IP6 is shared by the performance counter overflow interrupt
and the Bonito northbridge interrupt. To reduce overhead only call
do_IRQ() when oprofile is enabled to reduce overhead.
This patch adds an inline function do_perfcnt_IRQ() to hide the #if's ,
which can be shared by the other Loongson machines, i.e. gdium.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1492/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/mach-loongson/loongson.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h index 53ee881c675d..cb6985f24303 100644 --- a/arch/mips/include/asm/mach-loongson/loongson.h +++ b/arch/mips/include/asm/mach-loongson/loongson.h @@ -62,6 +62,14 @@ extern int mach_i8259_irq(void); #define LOONGSON_IRQ_BASE 32 #define LOONGSON2_PERFCNT_IRQ (MIPS_CPU_IRQ_BASE + 6) /* cpu perf counter */ +#include <linux/interrupt.h> +static inline void do_perfcnt_IRQ(void) +{ +#if defined(CONFIG_OPROFILE) || defined(CONFIG_OPROFILE_MODULE) + do_IRQ(LOONGSON2_PERFCNT_IRQ); +#endif +} + #define LOONGSON_FLASH_BASE 0x1c000000 #define LOONGSON_FLASH_SIZE 0x02000000 /* 32M */ #define LOONGSON_FLASH_TOP (LOONGSON_FLASH_BASE+LOONGSON_FLASH_SIZE-1) |