diff options
-rw-r--r-- | arch/mips/oprofile/op_model_mipsxx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index dd0aec9c3ce1..ebce715f076d 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -31,16 +31,18 @@ | |||
31 | #define M_COUNTER_OVERFLOW (1UL << 31) | 31 | #define M_COUNTER_OVERFLOW (1UL << 31) |
32 | 32 | ||
33 | #ifdef CONFIG_MIPS_MT_SMP | 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 | #else | 36 | #else |
36 | #define WHAT 0 | 37 | #define WHAT 0 |
38 | #define vpe_id() smp_processor_id() | ||
37 | #endif | 39 | #endif |
38 | 40 | ||
39 | #define __define_perf_accessors(r, n, np) \ | 41 | #define __define_perf_accessors(r, n, np) \ |
40 | \ | 42 | \ |
41 | static inline unsigned int r_c0_ ## r ## n(void) \ | 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 | switch (cpu) { \ | 47 | switch (cpu) { \ |
46 | case 0: \ | 48 | case 0: \ |
@@ -55,7 +57,7 @@ static inline unsigned int r_c0_ ## r ## n(void) \ | |||
55 | \ | 57 | \ |
56 | static inline void w_c0_ ## r ## n(unsigned int value) \ | 58 | static inline void w_c0_ ## r ## n(unsigned int value) \ |
57 | { \ | 59 | { \ |
58 | unsigned int cpu = smp_processor_id(); \ | 60 | unsigned int cpu = vpe_id(); \ |
59 | \ | 61 | \ |
60 | switch (cpu) { \ | 62 | switch (cpu) { \ |
61 | case 0: \ | 63 | case 0: \ |