]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields
authorPaul Burton <paul.burton@imgtec.com>
Tue, 22 Sep 2015 18:42:52 +0000 (11:42 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 26 Oct 2015 08:49:54 +0000 (09:49 +0100)
commit2202b6de77caa24b2e8424dfced46f0c4647ac7b
treebd3064c2f41b6dfaddf6bb2ae7e42fa14766f1b6
parentd53baf12927d1fa061f5e60c7ce0e0463d741fd5
MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields

Commit 748e787eb6de ("MIPS: Optimize TLB refill for RI/XI
configurations.") stopped explicitly clearing the bits used by software
in PTEs by making use of a rotate instruction that rotates them into the
fill bits of the Entry{Lo,Hi} register. This can only work if there are
actually enough fill bits in the register to cover the software
maintained bits, otherwise we end up writing those bits into the upper
bits of the PFN or PFNX field of the Entry{Lo,Hi} register.

Fix this by detecting the number of fill bits present in the
Entry{Lo,Hi} registers & explicitly clearing the software bits where
necessary.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-kernel@vger.kernel.org
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/11218/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/tlbex.c