MIPS: bugfix of TLB refill optimisation
authorLeonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Tue, 18 Nov 2014 01:44:26 +0000 (17:44 -0800)
committerRaghu Gandham <raghu.gandham@imgtec.com>
Tue, 2 Dec 2014 00:58:26 +0000 (16:58 -0800)
commit091c618da77ce0c4b4cb1efae0ce3612465f4def
treea3ac996a291e37b7165d40ce86b286b6dd15a4d1
parentc499236c7124441cc48ec1f28708880661a75bc6
MIPS: bugfix of TLB refill optimisation

Patch 748e787e replaced SRL(4)->ROTR(2) sequence in TLB refill handler
during loading EntryLo from PTE by a single ROTR(6).
It prevents running MIPS32 kernel on MIPS64 CPU and even running MIPS32
kernel on system with 36 bits physical address CPU, even with 256MB.
That patch just doesn't clear 4 high-order bits 29:26 and CPU tries
to use a high memory due to SW bits in this field.

This patch restores an original SRL+ROTR sequence if CPU is able to use
that 4 bits of physical address (36:32 in 4K system).

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
arch/mips/include/asm/cpu-features.h
arch/mips/include/asm/cpu.h
arch/mips/kernel/cpu-probe.c
arch/mips/mm/tlbex.c