aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorJames Hogan <jhogan@kernel.org>2017-11-22 11:30:31 +0000
committerJames Hogan <jhogan@kernel.org>2018-01-22 20:52:02 +0000
commit3478ba9969dae8e1537ad9b74d7bc01d9087d0cd (patch)
tree9b54b67838dcb5c26dbecd48d358beb08079f04d /arch/mips
parentMIPS: XPA: Use XPA instructions in assembly (diff)
downloadlinux-dev-3478ba9969dae8e1537ad9b74d7bc01d9087d0cd.tar.xz
linux-dev-3478ba9969dae8e1537ad9b74d7bc01d9087d0cd.zip
MIPS: XPA: Allow use of $0 (zero) to MTHC0
Tweak __writex_32bit_c0_register() to allow the compiler to use $0 (the zero register) as an input to the mthc0 instruction. 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/17774/
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/mipsregs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index f336846fb415..b1dedd5935a1 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -1537,10 +1537,10 @@ do { \
" .set push \n" \
" .set mips32r2 \n" \
_ASM_SET_XPA \
- " mthc0 %0, $%1 \n" \
+ " mthc0 %z0, $%1 \n" \
" .set pop \n" \
: \
- : "r" (value), "i" (register)); \
+ : "Jr" (value), "i" (register)); \
} while (0)
#define read_c0_index() __read_32bit_c0_register($0, 0)