]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
MIPS: wrap cfcmsa & ctcmsa accesses for toolchains with MSA support
authorPaul Burton <paul.burton@imgtec.com>
Fri, 30 Jan 2015 12:09:33 +0000 (12:09 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 27 Mar 2015 18:42:44 +0000 (19:42 +0100)
commite1bebbab1eaecac77d77033010b5e0f51b737e64
treefceb2b86c2e64a2f850f6f27433dcf1e99a44262
parenta3a49810c55e3489dfb5d72a9b2e41ab1db9ffb9
MIPS: wrap cfcmsa & ctcmsa accesses for toolchains with MSA support

Uses of the cfcmsa & ctcmsa instructions were not being wrapped by a
macro in the case where the toolchain supports MSA, since the arguments
exactly match a typical use of the instructions. However using current
toolchains this leads to errors such as:

  arch/mips/kernel/genex.S:437: Error: opcode not supported on this processor: mips32r2 (mips32r2) `cfcmsa $5,1'

Thus uses of the instructions must be in the context of a ".set msa"
directive, however doing that from the users of the instructions would
be messy due to the possibility that the toolchain does not support
MSA. Fix this by renaming the macros (prepending an underscore) in order
to avoid recursion when attempting to emit the instructions, and provide
implementations for the TOOLCHAIN_SUPPORTS_MSA case which ".set msa" as
appropriate.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9163/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/asmmacro.h