]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix VZ probe gas errors with binutils <2.24
authorJames Hogan <james.hogan@imgtec.com>
Mon, 16 May 2016 11:50:04 +0000 (12:50 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 17 May 2016 09:06:04 +0000 (11:06 +0200)
commit3a6a8879a9c36d8c6245cd5b9fd35ff47badd66b
tree2c4f05e03c679cfb72741634beb3b1d3d5fbdcd8
parentff89fc333eba2c14a1c94a737a7360e4e1c92a93
MIPS: Fix VZ probe gas errors with binutils <2.24

The VZ guest register & TLB access macros introduced in commit "MIPS:
Add guest CP0 accessors" use VZ ASE specific instructions that aren't
understood by versions of binutils prior to 2.24.

Add a check for whether the toolchain supports the -mvirt option,
similar to the MSA toolchain check, and implement the accessors using
.word if not.

Due to difficulty in converting compiler specified registers (e.g. "$3")
to usable numbers (e.g. "3") in inline asm, we need to copy to/from a
temporary register, namely the assembler temporary (at/$1), and specify
guest CP0 registers numerically in the gc0 macros.

Fixes: 56e8cb7dd937 ("MIPS: Add guest CP0 accessors")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-next@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13255/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Makefile
arch/mips/include/asm/mipsregs.h