kernel: add CONFIG_BCMA_POSSIBLE=y to generic config as it is set in most of the...
[openwrt.git] / target / linux / generic / patches-3.6 / 307-mips_oprofile_fix.patch
1 --- a/arch/mips/oprofile/op_model_mipsxx.c
2 +++ b/arch/mips/oprofile/op_model_mipsxx.c
3 @@ -303,6 +303,11 @@ static irqreturn_t mipsxx_perfcount_int(
4         return mipsxx_perfcount_handler();
5  }
6  
7 +static irqreturn_t mipsxx_perfcount_int(int irq, void *dev_id)
8 +{
9 +       return mipsxx_perfcount_handler();
10 +}
11 +
12  static int __init mipsxx_init(void)
13  {
14         int counters;
15 @@ -385,6 +390,10 @@ static int __init mipsxx_init(void)
16                 return request_irq(cp0_perfcount_irq, mipsxx_perfcount_int,
17                         0, "Perfcounter", save_perf_irq);
18  
19 +       if (cp0_perfcount_irq >= 0)
20 +               return request_irq(cp0_perfcount_irq, mipsxx_perfcount_int,
21 +                       IRQF_SHARED, "Perfcounter", save_perf_irq);
22 +
23         return 0;
24  }
25  
26 @@ -395,6 +404,9 @@ static void mipsxx_exit(void)
27         if ((cp0_perfcount_irq >= 0) && (cp0_compare_irq != cp0_perfcount_irq))
28                 free_irq(cp0_perfcount_irq, save_perf_irq);
29  
30 +       if (cp0_perfcount_irq >= 0)
31 +               free_irq(cp0_perfcount_irq, save_perf_irq);
32 +
33         counters = counters_per_cpu_to_total(counters);
34         on_each_cpu(reset_counters, (void *)(long)counters, 1);
35