提交 be609f35 编写于 作者: R Ralf Baechle

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

Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 a7aacdf9
...@@ -32,15 +32,17 @@ ...@@ -32,15 +32,17 @@
#ifdef CONFIG_MIPS_MT_SMP #ifdef CONFIG_MIPS_MT_SMP
#define WHAT (M_TC_EN_VPE | M_PERFCTL_VPEID(smp_processor_id())) #define WHAT (M_TC_EN_VPE | M_PERFCTL_VPEID(smp_processor_id()))
#define vpe_id() smp_processor_id()
#else #else
#define WHAT 0 #define WHAT 0
#define vpe_id() smp_processor_id()
#endif #endif
#define __define_perf_accessors(r, n, np) \ #define __define_perf_accessors(r, n, np) \
\ \
static inline unsigned int r_c0_ ## r ## n(void) \ static inline unsigned int r_c0_ ## r ## n(void) \
{ \ { \
unsigned int cpu = smp_processor_id(); \ unsigned int cpu = vpe_id(); \
\ \
switch (cpu) { \ switch (cpu) { \
case 0: \ case 0: \
...@@ -55,7 +57,7 @@ static inline unsigned int r_c0_ ## r ## n(void) \ ...@@ -55,7 +57,7 @@ static inline unsigned int r_c0_ ## r ## n(void) \
\ \
static inline void w_c0_ ## r ## n(unsigned int value) \ static inline void w_c0_ ## r ## n(unsigned int value) \
{ \ { \
unsigned int cpu = smp_processor_id(); \ unsigned int cpu = vpe_id(); \
\ \
switch (cpu) { \ switch (cpu) { \
case 0: \ case 0: \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册