Skip to content

Commit

Permalink
[MIPS] Oprofile: fix on non-VSMP / non-SMTC SMP configurations.
Browse files Browse the repository at this point in the history
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
ralfbaechle committed Oct 30, 2006
1 parent a7aacdf commit be609f3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arch/mips/oprofile/op_model_mipsxx.c
Expand Up @@ -31,16 +31,18 @@
#define M_COUNTER_OVERFLOW (1UL << 31)

#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
#define WHAT 0
#define WHAT 0
#define vpe_id() smp_processor_id()
#endif

#define __define_perf_accessors(r, n, np) \
\
static inline unsigned int r_c0_ ## r ## n(void) \
{ \
unsigned int cpu = smp_processor_id(); \
unsigned int cpu = vpe_id(); \
\
switch (cpu) { \
case 0: \
Expand All @@ -55,7 +57,7 @@ static inline unsigned int r_c0_ ## r ## n(void) \
\
static inline void w_c0_ ## r ## n(unsigned int value) \
{ \
unsigned int cpu = smp_processor_id(); \
unsigned int cpu = vpe_id(); \
\
switch (cpu) { \
case 0: \
Expand Down

0 comments on commit be609f3

Please sign in to comment.