Usage of current R1 ISA is inconsistent with the MIPS32 subtarget, little
used and has limited utility for testing.
Many distros target a minimum R2 ISA. Debian MIPS 32-bit/64-bit ports all
use MIPS R2 ISA since Stretch, for example. Fedora's MIPS arch also targets
the R2 ISA for 32-bit/64-bit.
Widely used MIPS64 platforms like Octeon are based on the MIPS R2 ISA or
later, and benefit from having a compatible test platform in OpenWRT.
While Linux does support MIPS64 R1 targets, its usefulness for development
and testing is limited. As an example, the modern Linux eBPF JIT requires
a MIPS R2 ISA or later.
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
CPU_CFLAGS += -mno-branch-likely
CPU_CFLAGS_mips32 = -mips32 -mtune=mips32
CPU_CFLAGS_mips64 = -mips64 -mtune=mips64 -mabi=64
+ CPU_CFLAGS_mips64r2 = -mips64r2 -mtune=mips64r2 -mabi=64
CPU_CFLAGS_24kc = -mips32r2 -mtune=24kc
CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc
CPU_CFLAGS_octeonplus = -march=octeon+ -mabi=64
CONFIG_CPU_BIG_ENDIAN=y
# CONFIG_CPU_LITTLE_ENDIAN is not set
CONFIG_CPU_MIPS64=y
-CONFIG_CPU_MIPS64_R1=y
+CONFIG_CPU_MIPS64_R2=y
CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
CONFIG_CPU_SUPPORTS_HUGEPAGES=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
ARCH:=mips64
-CPU_TYPE:=mips64
+CPU_TYPE:=mips64r2
SUBTARGET:=be64
FEATURES+=source-only
BOARDNAME:=Big Endian (64-bits)
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_CPU_MIPS64=y
-CONFIG_CPU_MIPS64_R1=y
+CONFIG_CPU_MIPS64_R2=y
CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
CONFIG_CPU_SUPPORTS_HUGEPAGES=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
ARCH:=mips64el
-CPU_TYPE:=mips64
+CPU_TYPE:=mips64r2
SUBTARGET:=le64
FEATURES+=source-only
BOARDNAME:=Little Endian (64-bits)