diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-02 12:45:33 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-02 12:45:33 -0800 |
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 80e202eca05..9c187a64649 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) return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE); } +static inline void cpu_probe_vmbits(struct cpuinfo_mips *c) +{ +#ifdef __NEED_VMBITS_PROBE + write_c0_entryhi(0x3ffffffffffff000ULL); + back_to_back_c0_hazard(); + c->vmbits = fls64(read_c0_entryhi() & 0x3ffffffffffff000ULL); +#endif +} + #define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \ | MIPS_CPU_COUNTER) @@ -969,6 +978,8 @@ __cpuinit void cpu_probe(void) c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1; else c->srsets = 1; + + cpu_probe_vmbits(c); } __cpuinit void cpu_report(void) |