kernel: fix oprofile performance counter interrupt handling on mips
[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 @@ -186,6 +186,7 @@ int get_c0_perfcount_int(void)
17  {
18         return ATH79_MISC_IRQ(5);
19  }
20 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
21  
22  unsigned int get_c0_compare_int(void)
23  {
24 --- a/arch/mips/lantiq/irq.c
25 +++ b/arch/mips/lantiq/irq.c
26 @@ -466,6 +466,7 @@ int get_c0_perfcount_int(void)
27  {
28         return ltq_perfcount_irq;
29  }
30 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
31  
32  unsigned int get_c0_compare_int(void)
33  {
34 --- a/arch/mips/mti-malta/malta-time.c
35 +++ b/arch/mips/mti-malta/malta-time.c
36 @@ -148,6 +148,7 @@ int get_c0_perfcount_int(void)
37  
38         return mips_cpu_perf_irq;
39  }
40 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
41  
42  unsigned int get_c0_compare_int(void)
43  {
44 --- a/arch/mips/mti-sead3/sead3-time.c
45 +++ b/arch/mips/mti-sead3/sead3-time.c
46 @@ -77,6 +77,7 @@ int get_c0_perfcount_int(void)
47                 return MIPS_CPU_IRQ_BASE + cp0_perfcount_irq;
48         return -1;
49  }
50 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
51  
52  unsigned int get_c0_compare_int(void)
53  {
54 --- a/arch/mips/pistachio/time.c
55 +++ b/arch/mips/pistachio/time.c
56 @@ -26,6 +26,7 @@ int get_c0_perfcount_int(void)
57  {
58         return gic_get_c0_perfcount_int();
59  }
60 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
61  
62  void __init plat_time_init(void)
63  {
64 --- a/arch/mips/ralink/irq.c
65 +++ b/arch/mips/ralink/irq.c
66 @@ -89,6 +89,7 @@ int get_c0_perfcount_int(void)
67  {
68         return rt_perfcount_irq;
69  }
70 +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
71  
72  unsigned int get_c0_compare_int(void)
73  {