summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-3.3/0014-MIPS-lantiq-enable-oprofile-support-on-lantiq-target.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-04-16 12:31:48 +0000
committerJohn Crispin <john@openwrt.org>2012-04-16 12:31:48 +0000
commit83948d6385c9ce23545a159ffd64f5b2854332ed (patch)
tree1d79b701055f05ca319d5ac3623af6615f394844 /target/linux/lantiq/patches-3.3/0014-MIPS-lantiq-enable-oprofile-support-on-lantiq-target.patch
parentfb2b2b958e9da0d9ea0195a0829da52a0eda667c (diff)
downloadmaster-31e0f0ae-83948d6385c9ce23545a159ffd64f5b2854332ed.tar.gz
master-31e0f0ae-83948d6385c9ce23545a159ffd64f5b2854332ed.tar.bz2
master-31e0f0ae-83948d6385c9ce23545a159ffd64f5b2854332ed.zip
adds 3.3 patches and files
SVN-Revision: 31307
Diffstat (limited to 'target/linux/lantiq/patches-3.3/0014-MIPS-lantiq-enable-oprofile-support-on-lantiq-target.patch')
-rw-r--r--target/linux/lantiq/patches-3.3/0014-MIPS-lantiq-enable-oprofile-support-on-lantiq-target.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.3/0014-MIPS-lantiq-enable-oprofile-support-on-lantiq-target.patch b/target/linux/lantiq/patches-3.3/0014-MIPS-lantiq-enable-oprofile-support-on-lantiq-target.patch
new file mode 100644
index 0000000000..dfac38fae9
--- /dev/null
+++ b/target/linux/lantiq/patches-3.3/0014-MIPS-lantiq-enable-oprofile-support-on-lantiq-target.patch
@@ -0,0 +1,53 @@
+From 4a6b5278deced0bd79df1521df291fe744c260b5 Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Wed, 24 Aug 2011 13:28:55 +0200
+Subject: [PATCH 14/70] MIPS: lantiq: enable oprofile support on lantiq
+ targets
+
+This patch sets the performance counters irq and HAVE_OPROFILE flag for Lantiq
+SoCs.
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+---
+ arch/mips/Kconfig | 1 +
+ arch/mips/lantiq/irq.c | 5 +++++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
+index 5ab6e89..8ad52f4 100644
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -229,6 +229,7 @@ config LANTIQ
+ select SWAP_IO_SPACE
+ select BOOT_RAW
+ select HAVE_CLK
++ select HAVE_OPROFILE
+ select MIPS_MACHINE
+
+ config LASAT
+diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
+index f56bcce..ada3874 100644
+--- a/arch/mips/lantiq/irq.c
++++ b/arch/mips/lantiq/irq.c
+@@ -40,6 +40,9 @@
+
+ #define MAX_EIU 6
+
++/* the performance counter */
++#define LTQ_PERF_IRQ (INT_NUM_IM4_IRL0 + 31)
++
+ /* irqs generated by device attached to the EBU need to be acked in
+ * a special manner
+ */
+@@ -317,6 +320,8 @@ void __init arch_init_irq(void)
+ set_c0_status(IE_SW0 | IE_SW1 | IE_IRQ0 | IE_IRQ1 |
+ IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5);
+ #endif
++
++ cp0_perfcount_irq = LTQ_PERF_IRQ;
+ }
+
+ unsigned int __cpuinit get_c0_compare_int(void)
+--
+1.7.9.1
+