| 1 | From cc4b9cdff8665a414ae51101d3a0ca6ed7444a27 Mon Sep 17 00:00:00 2001 |
| 2 | From: John Crispin <blogic@openwrt.org> |
| 3 | Date: Wed, 24 Aug 2011 13:28:55 +0200 |
| 4 | Subject: [PATCH 10/24] MIPS: enable oprofile support on lantiq targets |
| 5 | |
| 6 | This patch sets the performance counters irq and HAVE_OPROFILE flag. |
| 7 | |
| 8 | Signed-off-by: John Crispin <blogic@openwrt.org> |
| 9 | Cc: linux-mips@linux-mips.org |
| 10 | --- |
| 11 | arch/mips/Kconfig | 1 + |
| 12 | arch/mips/lantiq/irq.c | 5 +++++ |
| 13 | 2 files changed, 6 insertions(+), 0 deletions(-) |
| 14 | |
| 15 | diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig |
| 16 | index b122adc..0cf5bbd 100644 |
| 17 | --- a/arch/mips/Kconfig |
| 18 | +++ b/arch/mips/Kconfig |
| 19 | @@ -230,6 +230,7 @@ config LANTIQ |
| 20 | select SWAP_IO_SPACE |
| 21 | select BOOT_RAW |
| 22 | select HAVE_CLK |
| 23 | + select HAVE_OPROFILE |
| 24 | select MIPS_MACHINE |
| 25 | |
| 26 | config LASAT |
| 27 | diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c |
| 28 | index 17c057f..0b2ed87 100644 |
| 29 | --- a/arch/mips/lantiq/irq.c |
| 30 | +++ b/arch/mips/lantiq/irq.c |
| 31 | @@ -40,6 +40,9 @@ |
| 32 | |
| 33 | #define MAX_EIU 6 |
| 34 | |
| 35 | +/* the performance counter */ |
| 36 | +#define LTQ_PERF_IRQ (INT_NUM_IM4_IRL0 + 31) |
| 37 | + |
| 38 | /* irqs generated by device attached to the EBU need to be acked in |
| 39 | * a special manner |
| 40 | */ |
| 41 | @@ -318,6 +321,8 @@ void __init arch_init_irq(void) |
| 42 | set_c0_status(IE_SW0 | IE_SW1 | IE_IRQ0 | IE_IRQ1 | |
| 43 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5); |
| 44 | #endif |
| 45 | + |
| 46 | + cp0_perfcount_irq = LTQ_PERF_IRQ; |
| 47 | } |
| 48 | |
| 49 | unsigned int __cpuinit get_c0_compare_int(void) |
| 50 | -- |
| 51 | 1.7.5.4 |
| 52 | |
| 53 | |