diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-02 15:45:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-02 15:45:33 -0500 |
commit | e770a0f1154193ca6b6e720a86aeaa2edc9261c6 (patch) | |
tree | 04f5f5420e4116a18be8f94c117aadb870eaa46d /arch/mips/kernel | |
parent | 7ab02af428c2d312c0cf8fb0b01cc1eb21131a3d (diff) | |
parent | 91dfc423cc8cfd399fb308a837102a7ab7fa067e (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: 64-bit: Detect virtual memory size
MIPS: AR7: Fix USB slave mem range typo
MIPS: Alchemy: Fix dbdma ring destruction memory debugcheck.
Diffstat (limited to 'arch/mips/kernel')
-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..9c187a64649b 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(0x3ffffffffffff000ULL); | ||
291 | back_to_back_c0_hazard(); | ||
292 | c->vmbits = fls64(read_c0_entryhi() & 0x3ffffffffffff000ULL); | ||
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) |