summaryrefslogtreecommitdiff
path: root/arch/mips/Makefile
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2018-10-15 18:26:12 +0000
committerPaul Burton <paul.burton@mips.com>2018-10-16 15:30:21 -0700
commitedbb4233e7efc37dbebb10f7774b38c64080dd66 (patch)
tree0adc3c1f11a4f49862cd290a79b8c05d099af275 /arch/mips/Makefile
parent965f22bc425298b619c5463e8af49aa98f744462 (diff)
MIPS: Cleanup DSP ASE detection
Currently we hardcode a list of files for which we specify that the toolchain has DSP ASE support when building for MIPSr2 only. This has a number of problems: 1) It doesn't actually ensure that the toolchain supports the DSP ASE at all. 2) It's fragile if we try to use DSP ASE macros in other files. 3) It makes no provision for MIPSr6 & later systems which also support the DSP ASE & end up using the .word directive implementation of the DSP macros. Fix this by detecting assembler support for the DSP ASE globally, not just for a small set of files, and not just for MIPSr2. This now exposes use of toolchain DSP support to kernel builds targeting MIPSr1 and older, so we add .set MIPS_ISA_LEVEL directives prior to all .set dsp directives in order to prevent the assembler from complaining that the DSP ASE is only supported with MIPSr2 & higher. Signed-off-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/20901/ Cc: linux-mips@linux-mips.org
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r--arch/mips/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 053e1c314f9e..e9ead5fe0405 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -231,6 +231,8 @@ toolchain-xpa := $(call cc-option-yn,$(xpa-cflags-y) -mxpa)
cflags-$(toolchain-xpa) += -DTOOLCHAIN_SUPPORTS_XPA
toolchain-crc := $(call cc-option-yn,$(mips-cflags) -Wa$(comma)-mcrc)
cflags-$(toolchain-crc) += -DTOOLCHAIN_SUPPORTS_CRC
+toolchain-dsp := $(call cc-option-yn,$(mips-cflags) -Wa$(comma)-mdsp)
+cflags-$(toolchain-dsp) += -DTOOLCHAIN_SUPPORTS_DSP
#
# Firmware support