MIPS: Add microMIPS configuration option.
PATCH v2 9/9 MIPS: Add microMIPS configuration option.
From: "Steven J. Hill" <[email protected]>
This adds the option to build the Linux kernel using only the microMIPS ISA. The resulting kernel binary is, at a minimum, 20% smaller than using the MIPS32R2 ISA.
Signed-off-by Steven J. Hill <[email protected]>
--- arch/mips/Kconfig | 10 +++ arch/mips/Makefile | 1 + arch/mips/configs/sead3micro_defconfig | 125 +++++++++++++++++++++++++++++++++ arch/mips/kernel/proc.c | 4 ++ 4 files changed, 140 insertions(+) create mode 100644 arch/mips/configs/sead3micro_defconfig
arch/mips/Kconfig +10 -0
@@ -2077,6 +2077,13 @@ config CPU_HAS_SMARTMIPS you don't know you probably don't have SmartMIPS and should say N here. +config CPU_MICROMIPS + depends on SYS_SUPPORTS_MICROMIPS + bool "Build kernel using microMIPS ISA" + help + When this option is enabled the kernel will be built using the + microMIPS ISA + config CPU_HAS_WB bool
@@ -2140,6 +2147,9 @@ config SYS_SUPPORTS_HIGHMEM config SYS_SUPPORTS_SMARTMIPS bool +config SYS_SUPPORTS_MICROMIPS + bool + config ARCH_FLATMEM_ENABLE def_bool y depends on !NUMA && !CPU_LOONGSON2
arch/mips/Makefile +1 -0
@@ -114,6 +114,7 @@ cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*e cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le)) cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips) +cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips -mno-jals) cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ -fno-omit-frame-pointer
arch/mips/configs/sead3micro_defconfig new file +125 -0
125 lines not on this page · raw message
arch/mips/kernel/proc.c +4 -0
@@ -73,6 +73,10 @@ static int show_cpuinfo(struct seq_file *m, void *v) cpu_has_mipsmt ?" mt" :"" , cpu_has_mmips ?" micromips" :"" ); +if (cpu_has_mmips) { +seq_printf (m,"micromips kernel\t: %s\n" , + (read_c0_config3 () &MIPS_CONF3_ISA_OE ) ?"yes" :"no" ); + }seq_printf (m,"shadow register sets\t: %d\n" , cpu_data[n].srsets); seq_printf(m, "kscratch registers\t: %d\n",
Signature · 1 line
1.7.11.1