kernel: fix oprofile performance counter interrupt handling on mips
authorFelix Fietkau <nbd@openwrt.org>
Fri, 24 Jul 2015 15:36:02 +0000 (15:36 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 24 Jul 2015 15:36:02 +0000 (15:36 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 46482

target/linux/ar71xx/patches-4.1/509-MIPS-ath79-process-board-kernel-option.patch
target/linux/generic/patches-4.1/131-MIPS-export-get_c0_perfcount_int.patch [new file with mode: 0644]

index 98ef1e134a078ad8abfa7f2d18c6083f7bfbb2e0..2366c40cd00bdbc87ada30882990603b115806ff 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/setup.c
 +++ b/arch/mips/ath79/setup.c
-@@ -235,6 +235,8 @@ void __init plat_time_init(void)
+@@ -236,6 +236,8 @@ void __init plat_time_init(void)
        mips_hpt_frequency = cpu_clk_rate / 2;
  }
  
diff --git a/target/linux/generic/patches-4.1/131-MIPS-export-get_c0_perfcount_int.patch b/target/linux/generic/patches-4.1/131-MIPS-export-get_c0_perfcount_int.patch
new file mode 100644 (file)
index 0000000..3a3e898
--- /dev/null
@@ -0,0 +1,73 @@
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Thu, 23 Jul 2015 18:54:49 +0200
+Subject: [PATCH] MIPS: export get_c0_perfcount_int()
+
+get_c0_perfcount_int is tested from oprofile code. If oprofile is
+compiled as module, get_c0_perfcount_int needs to be exported, otherwise
+it cannot be resolved.
+
+Fixes: a669efc4a3b4 ("MIPS: Add hook to get C0 performance counter interrupt")
+Cc: stable@vger.kernel.org # v3.19+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/arch/mips/ath79/setup.c
++++ b/arch/mips/ath79/setup.c
+@@ -186,6 +186,7 @@ int get_c0_perfcount_int(void)
+ {
+       return ATH79_MISC_IRQ(5);
+ }
++EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
+ unsigned int get_c0_compare_int(void)
+ {
+--- a/arch/mips/lantiq/irq.c
++++ b/arch/mips/lantiq/irq.c
+@@ -466,6 +466,7 @@ int get_c0_perfcount_int(void)
+ {
+       return ltq_perfcount_irq;
+ }
++EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
+ unsigned int get_c0_compare_int(void)
+ {
+--- a/arch/mips/mti-malta/malta-time.c
++++ b/arch/mips/mti-malta/malta-time.c
+@@ -148,6 +148,7 @@ int get_c0_perfcount_int(void)
+       return mips_cpu_perf_irq;
+ }
++EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
+ unsigned int get_c0_compare_int(void)
+ {
+--- a/arch/mips/mti-sead3/sead3-time.c
++++ b/arch/mips/mti-sead3/sead3-time.c
+@@ -77,6 +77,7 @@ int get_c0_perfcount_int(void)
+               return MIPS_CPU_IRQ_BASE + cp0_perfcount_irq;
+       return -1;
+ }
++EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
+ unsigned int get_c0_compare_int(void)
+ {
+--- a/arch/mips/pistachio/time.c
++++ b/arch/mips/pistachio/time.c
+@@ -26,6 +26,7 @@ int get_c0_perfcount_int(void)
+ {
+       return gic_get_c0_perfcount_int();
+ }
++EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
+ void __init plat_time_init(void)
+ {
+--- a/arch/mips/ralink/irq.c
++++ b/arch/mips/ralink/irq.c
+@@ -89,6 +89,7 @@ int get_c0_perfcount_int(void)
+ {
+       return rt_perfcount_irq;
+ }
++EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
+ unsigned int get_c0_compare_int(void)
+ {