--- zzzz-none-000/linux-2.6.28.10/arch/mips/oprofile/op_model_mipsxx.c 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/arch/mips/oprofile/op_model_mipsxx.c 2010-05-06 12:35:22.000000000 +0000 @@ -11,7 +11,13 @@ #include #include #include +#if defined(CONFIG_AR9) || defined(CONFIG_VR9) +#include +#endif /*--- #if defined(CONFIG_AR9) || defined(CONFIG_VR9) ---*/ +#include +/*------------------------------------------------------------------------------------------*\ +\*------------------------------------------------------------------------------------------*/ #include "op_impl.h" #define M_PERFCTL_EXL (1UL << 0) @@ -374,6 +380,11 @@ save_perf_irq = perf_irq; perf_irq = mipsxx_perfcount_handler; + /*--- enable interrupt ---*/ +#if defined(CONFIG_AR9) || defined(CONFIG_VR9) + bsp_enable_irq(MIPS_CPU_CPUCTR_IRQ); +#endif /*--- #if defined(CONFIG_AR9) || defined(CONFIG_VR9) ---*/ + return 0; } @@ -381,6 +392,10 @@ { int counters = op_model_mipsxx_ops.num_counters; +#if defined(CONFIG_AR9) || defined(CONFIG_VR9) + bsp_disable_irq(MIPS_CPU_CPUCTR_IRQ); +#endif /*--- #if defined(CONFIG_AR9) || defined(CONFIG_VR9) ---*/ + counters = counters_per_cpu_to_total(counters); on_each_cpu(reset_counters, (void *)(long)counters, 1);