MIPS: Cleanup DSP ASE detection
authorPaul Burton <paul.burton@mips.com>
Mon, 15 Oct 2018 18:26:12 +0000 (18:26 +0000)
committerPaul Burton <paul.burton@mips.com>
Tue, 16 Oct 2018 22:30:21 +0000 (15:30 -0700)
commitedbb4233e7efc37dbebb10f7774b38c64080dd66
tree0adc3c1f11a4f49862cd290a79b8c05d099af275
parent965f22bc425298b619c5463e8af49aa98f744462
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
arch/mips/Makefile
arch/mips/include/asm/mipsregs.h
arch/mips/kernel/Makefile