diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/cpu-features.h | 2 | ||||
-rw-r--r-- | arch/mips/oprofile/op_model_mipsxx.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index 1dc086087a72..fa44f3ec5302 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #define current_cpu_type() current_cpu_data.cputype | 17 | #define current_cpu_type() current_cpu_data.cputype |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #define boot_cpu_type() cpu_data[0].cputype | ||
21 | |||
20 | /* | 22 | /* |
21 | * SMP assumption: Options of CPU 0 are a superset of all processors. | 23 | * SMP assumption: Options of CPU 0 are a superset of all processors. |
22 | * This is true for all known MIPS systems. | 24 | * This is true for all known MIPS systems. |
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index e4b1140cdae0..3a2b6e9f25cf 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -166,7 +166,7 @@ static void mipsxx_reg_setup(struct op_counter_config *ctr) | |||
166 | reg.control[i] |= M_PERFCTL_USER; | 166 | reg.control[i] |= M_PERFCTL_USER; |
167 | if (ctr[i].exl) | 167 | if (ctr[i].exl) |
168 | reg.control[i] |= M_PERFCTL_EXL; | 168 | reg.control[i] |= M_PERFCTL_EXL; |
169 | if (current_cpu_type() == CPU_XLR) | 169 | if (boot_cpu_type() == CPU_XLR) |
170 | reg.control[i] |= M_PERFCTL_COUNT_ALL_THREADS; | 170 | reg.control[i] |= M_PERFCTL_COUNT_ALL_THREADS; |
171 | reg.counter[i] = 0x80000000 - ctr[i].count; | 171 | reg.counter[i] = 0x80000000 - ctr[i].count; |
172 | } | 172 | } |