Skip to content
Commit 12060666 authored by Paul Burton's avatar Paul Burton Committed by Ralf Baechle
Browse files

MIPS: Optimise non-EVA kernel user memory accesses



Commits ac1d8590 (MIPS: asm: uaccess: Use EVA instructions
wrappers), 05c65160 (MIPS: asm: uaccess: Add EVA support to
copy_{in, to,from}_user) & e3a9b07a (MIPS: asm: uaccess: Add EVA
support for str*_user operations) added checks to various user memory
access functions & macros in order to determine whether to perform
standard memory accesses or their EVA userspace equivalents. In kernels
built without support for EVA these checks are entirely redundant. Avoid
emitting them & allow the compiler to optimise out the EVA userspace
code in such kernels by checking config_enabled(CONFIG_EVA).

This reduces the size of a malta_defconfig kernel built using GCC 4.9.2
by approximately 33KB (from 5995072 to 5962304 bytes).

Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/10165/


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