1
0
Fork 0

MIPS: Hardcode cpu_has_mmips=1 for microMIPS kernels

If we built the kernel targeting the microMIPS ISA then the very fact
that the kernel is running implies that the CPU supports microMIPS. Thus
we can hardcode cpu_has_mmips to 1 allowing the compiler greater scope
for optimisation due to the compile-time constant.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21022/
Cc: linux-mips@linux-mips.org
hifive-unleashed-5.1
Paul Burton 2018-11-07 23:19:41 +00:00
parent d08b8ccc47
commit a013ba3928
No known key found for this signature in database
GPG Key ID: 3EA79FACB57500DD
1 changed files with 3 additions and 1 deletions

View File

@ -195,7 +195,9 @@
#endif
#ifndef cpu_has_mmips
# ifdef CONFIG_SYS_SUPPORTS_MICROMIPS
# if defined(__mips_micromips)
# define cpu_has_mmips 1
# elif defined(CONFIG_SYS_SUPPORTS_MICROMIPS)
# define cpu_has_mmips __opt(MIPS_CPU_MICROMIPS)
# else
# define cpu_has_mmips 0