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