[MIPS] Oprofile: fix on non-VSMP / non-SMTC SMP configurations.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+6 -4
+6 -4
arch/mips/oprofile/op_model_mipsxx.c
··· 31 #define M_COUNTER_OVERFLOW (1UL << 31) 32 33 #ifdef CONFIG_MIPS_MT_SMP 34 - #define WHAT (M_TC_EN_VPE | M_PERFCTL_VPEID(smp_processor_id())) 35 #else 36 - #define WHAT 0 37 #endif 38 39 #define __define_perf_accessors(r, n, np) \ 40 \ 41 static inline unsigned int r_c0_ ## r ## n(void) \ 42 { \ 43 - unsigned int cpu = smp_processor_id(); \ 44 \ 45 switch (cpu) { \ 46 case 0: \ ··· 57 \ 58 static inline void w_c0_ ## r ## n(unsigned int value) \ 59 { \ 60 - unsigned int cpu = smp_processor_id(); \ 61 \ 62 switch (cpu) { \ 63 case 0: \
··· 31 #define M_COUNTER_OVERFLOW (1UL << 31) 32 33 #ifdef CONFIG_MIPS_MT_SMP 34 + #define WHAT (M_TC_EN_VPE | M_PERFCTL_VPEID(smp_processor_id())) 35 + #define vpe_id() smp_processor_id() 36 #else 37 + #define WHAT 0 38 + #define vpe_id() smp_processor_id() 39 #endif 40 41 #define __define_perf_accessors(r, n, np) \ 42 \ 43 static inline unsigned int r_c0_ ## r ## n(void) \ 44 { \ 45 + unsigned int cpu = vpe_id(); \ 46 \ 47 switch (cpu) { \ 48 case 0: \ ··· 55 \ 56 static inline void w_c0_ ## r ## n(unsigned int value) \ 57 { \ 58 + unsigned int cpu = vpe_id(); \ 59 \ 60 switch (cpu) { \ 61 case 0: \