diff options
Diffstat (limited to 'arch/mips/kernel/cpu-probe.c')
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 80e202eca056..758ad426c57f 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -284,6 +284,15 @@ static inline int __cpu_has_fpu(void) | |||
284 | return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE); | 284 | return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE); |
285 | } | 285 | } |
286 | 286 | ||
287 | static inline void cpu_probe_vmbits(struct cpuinfo_mips *c) | ||
288 | { | ||
289 | #ifdef __NEED_VMBITS_PROBE | ||
290 | write_c0_entryhi(0x3fffffffffffe000ULL); | ||
291 | back_to_back_c0_hazard(); | ||
292 | c->vmbits = fls64(read_c0_entryhi() & 0x3fffffffffffe000ULL); | ||
293 | #endif | ||
294 | } | ||
295 | |||
287 | #define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \ | 296 | #define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \ |
288 | | MIPS_CPU_COUNTER) | 297 | | MIPS_CPU_COUNTER) |
289 | 298 | ||
@@ -969,6 +978,8 @@ __cpuinit void cpu_probe(void) | |||
969 | c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1; | 978 | c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1; |
970 | else | 979 | else |
971 | c->srsets = 1; | 980 | c->srsets = 1; |
981 | |||
982 | cpu_probe_vmbits(c); | ||
972 | } | 983 | } |
973 | 984 | ||
974 | __cpuinit void cpu_report(void) | 985 | __cpuinit void cpu_report(void) |