Skip to content

Commit a013ba3

Browse files
committed
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 <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/21022/ Cc: [email protected]
1 parent d08b8cc commit a013ba3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/mips/include/asm/cpu-features.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@
195195
#endif
196196

197197
#ifndef cpu_has_mmips
198-
# ifdef CONFIG_SYS_SUPPORTS_MICROMIPS
198+
# if defined(__mips_micromips)
199+
# define cpu_has_mmips 1
200+
# elif defined(CONFIG_SYS_SUPPORTS_MICROMIPS)
199201
# define cpu_has_mmips __opt(MIPS_CPU_MICROMIPS)
200202
# else
201203
# define cpu_has_mmips 0

0 commit comments

Comments
 (0)