bee7673120da830fac6d5a1c187b5fbe38ec497c
[openwrt/openwrt.git] / target / linux / generic / patches-4.1 / 131-MIPS-export-get_c0_perfcount_int.patch
1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Thu, 23 Jul 2015 18:54:49 +0200
3 Subject: [PATCH] MIPS: export get_c0_perfcount_int()
4
5 get_c0_perfcount_int is tested from oprofile code. If oprofile is
6 compiled as module, get_c0_perfcount_int needs to be exported, otherwise
7 it cannot be resolved.
8
9 Fixes: a669efc4a3b4 ("MIPS: Add hook to get C0 performance counter interrupt")
10 Cc: stable@vger.kernel.org # v3.19+
11 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 ---
13
14 --- a/arch/mips/ath79/setup.c
15 +++ b/arch/mips/ath79/setup.c
16 @@ -181,6 +181,7 @@ const char *get_system_type(void)
17 {
18 return ath79_sys_type;
19 }
20 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
21
22 int get_c0_perfcount_int(void)
23 {
24 --- a/arch/mips/lantiq/irq.c
25 +++ b/arch/mips/lantiq/irq.c
26 @@ -461,6 +461,7 @@ int __init icu_of_init(struct device_nod
27
28 return 0;
29 }
30 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
31
32 int get_c0_perfcount_int(void)
33 {
34 --- a/arch/mips/mti-malta/malta-time.c
35 +++ b/arch/mips/mti-malta/malta-time.c
36 @@ -163,6 +163,7 @@ unsigned int get_c0_compare_int(void)
37
38 return mips_cpu_timer_irq;
39 }
40 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
41
42 static void __init init_rtc(void)
43 {
44 --- a/arch/mips/mti-sead3/sead3-time.c
45 +++ b/arch/mips/mti-sead3/sead3-time.c
46 @@ -85,6 +85,7 @@ unsigned int get_c0_compare_int(void)
47 return gic_get_c0_compare_int();
48 return MIPS_CPU_IRQ_BASE + cp0_compare_irq;
49 }
50 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
51
52 void __init plat_time_init(void)
53 {
54 --- a/arch/mips/pistachio/time.c
55 +++ b/arch/mips/pistachio/time.c
56 @@ -21,6 +21,7 @@ unsigned int get_c0_compare_int(void)
57 {
58 return gic_get_c0_compare_int();
59 }
60 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
61
62 int get_c0_perfcount_int(void)
63 {
64 --- a/arch/mips/ralink/irq.c
65 +++ b/arch/mips/ralink/irq.c
66 @@ -95,6 +95,7 @@ unsigned int get_c0_compare_int(void)
67 {
68 return CP0_LEGACY_COMPARE_IRQ;
69 }
70 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
71
72 static void ralink_intc_irq_handler(unsigned int irq, struct irq_desc *desc)
73 {