MIPS: Don't probe reserved EntryHi bits.
authorDavid Daney <ddaney@caviumnetworks.com>
Mon, 8 Feb 2010 20:27:00 +0000 (12:27 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 10 Feb 2010 21:15:46 +0000 (22:15 +0100)
The patch that adds cpu_probe_vmbits is erroneously writing to reserved
bit 12.  Since we are really only probing high bits, don't write this bit
with a one.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Patchwork: http://patchwork.linux-mips.org/patch/949/
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/cpu-probe.c

index 9c187a6..758ad42 100644 (file)
@@ -287,9 +287,9 @@ static inline int __cpu_has_fpu(void)
 static inline void cpu_probe_vmbits(struct cpuinfo_mips *c)
 {
 #ifdef __NEED_VMBITS_PROBE
-       write_c0_entryhi(0x3ffffffffffff000ULL);
+       write_c0_entryhi(0x3fffffffffffe000ULL);
        back_to_back_c0_hazard();
-       c->vmbits = fls64(read_c0_entryhi() & 0x3ffffffffffff000ULL);
+       c->vmbits = fls64(read_c0_entryhi() & 0x3fffffffffffe000ULL);
 #endif
 }