From: nbd Date: Fri, 24 Jul 2015 15:36:02 +0000 (+0000) Subject: kernel: fix oprofile performance counter interrupt handling on mips X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=5272fcc7f5ea3acbc79b7457031c4edf3634be63;p=openwrt.git kernel: fix oprofile performance counter interrupt handling on mips Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46482 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/target/linux/ar71xx/patches-4.1/509-MIPS-ath79-process-board-kernel-option.patch b/target/linux/ar71xx/patches-4.1/509-MIPS-ath79-process-board-kernel-option.patch index 98ef1e134a..2366c40cd0 100644 --- a/target/linux/ar71xx/patches-4.1/509-MIPS-ath79-process-board-kernel-option.patch +++ b/target/linux/ar71xx/patches-4.1/509-MIPS-ath79-process-board-kernel-option.patch @@ -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 index 0000000000..3a3e89833a --- /dev/null +++ b/target/linux/generic/patches-4.1/131-MIPS-export-get_c0_perfcount_int.patch @@ -0,0 +1,73 @@ +From: Felix Fietkau +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 +--- + +--- 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) + {