Skip to content
Commit 8fe4908b authored by James Hogan's avatar James Hogan Committed by Ralf Baechle
Browse files

MIPS: tlbex: Avoid unnecessary _PAGE_PRESENT shifts



Commit c5b36783 ("MIPS: Add support for XPA.") added generation of a
shift by _PAGE_PRESENT_SHIFT in build_pte_present() and
build_pte_writable(), however except for the XPA case this is always
zero making it unnecessary.

Make the shift conditional upon _PAGE_PRESENT_SHIFT being non-zero to
save an instruction in those cases.

Fixes: c5b36783 ("MIPS: Add support for XPA.")
Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9889/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent a3ae565a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment