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();
7 +static irqreturn_t mipsxx_perfcount_int(int irq, void *dev_id)
9 + return mipsxx_perfcount_handler();
12 static int __init mipsxx_init(void)
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);
19 + if (cp0_perfcount_irq >= 0)
20 + return request_irq(cp0_perfcount_irq, mipsxx_perfcount_int,
21 + IRQF_SHARED, "Perfcounter", save_perf_irq);
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);
30 + if (cp0_perfcount_irq >= 0)
31 + free_irq(cp0_perfcount_irq, save_perf_irq);
33 counters = counters_per_cpu_to_total(counters);
34 on_each_cpu(reset_counters, (void *)(long)counters, 1);