summaryrefslogtreecommitdiffstats
path: root/arch/mips/Makefile
diff options
context:
space:
mode:
authorJames Hogan2017-11-22 12:30:30 +0100
committerJames Hogan2018-01-22 21:51:55 +0100
commit8e4789d288e0155db1929b5672252429e52b36a8 (patch)
tree9854c6979a31354be2f95d58ac2edf00826ada55 /arch/mips/Makefile
parentMIPS: VZ: Pass GC0 register names in $n format (diff)
downloadkernel-qcow2-linux-8e4789d288e0155db1929b5672252429e52b36a8.tar.gz
kernel-qcow2-linux-8e4789d288e0155db1929b5672252429e52b36a8.tar.xz
kernel-qcow2-linux-8e4789d288e0155db1929b5672252429e52b36a8.zip
MIPS: XPA: Use XPA instructions in assembly
Utilise XPA instructions MFHC0 & MTHC0 in inline assembly instead of directly encoding them with the _ASM_INSN* macros, and transparently implement these instructions as assembler macros if the toolchain doesn't support them natively, using the recently introduced assembler macro helpers. The old direct encodings were restricted to using the register $at, so this allows the extra register moves to go away (saving a grand total of 24 bytes). Signed-off-by: James Hogan <jhogan@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17775/
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r--arch/mips/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 0f20f84de53b..d1ca839c3981 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -216,6 +216,12 @@ cflags-$(toolchain-msa) += -DTOOLCHAIN_SUPPORTS_MSA
endif
toolchain-virt := $(call cc-option-yn,$(mips-cflags) -mvirt)
cflags-$(toolchain-virt) += -DTOOLCHAIN_SUPPORTS_VIRT
+# For -mmicromips, use -Wa,-fatal-warnings to catch unsupported -mxpa which
+# only warns
+xpa-cflags-y := $(mips-cflags)
+xpa-cflags-$(micromips-ase) += -mmicromips -Wa$(comma)-fatal-warnings
+toolchain-xpa := $(call cc-option-yn,$(xpa-cflags-y) -mxpa)
+cflags-$(toolchain-xpa) += -DTOOLCHAIN_SUPPORTS_XPA
#
# Firmware support