]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
MIPS: set mips32r5 for virt extensions
authorNick Desaulniers <ndesaulniers@google.com>
Mon, 28 Jun 2021 21:50:26 +0000 (14:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:16:03 +0000 (16:16 +0200)
[ Upstream commit c994a3ec7ecc8bd2a837b2061e8a76eb8efc082b ]

Clang's integrated assembler only accepts these instructions when the
cpu is set to mips32r5. With this change, we can assemble
malta_defconfig with Clang via `make LLVM_IAS=1`.

Link: https://github.com/ClangBuiltLinux/linux/issues/763
Reported-by: Dmitry Golovin <dima@golovin.in>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/include/asm/mipsregs.h

index f9a7c137be9f27c25a1490f6a234ade053a67e5f..c8333782a6706b09919f3d8cb9da2151cf15ffe9 100644 (file)
@@ -1986,7 +1986,7 @@ _ASM_MACRO_0(tlbginvf, _ASM_INSN_IF_MIPS(0x4200000c)
 ({ int __res;                                                          \
        __asm__ __volatile__(                                           \
                ".set\tpush\n\t"                                        \
-               ".set\tmips32r2\n\t"                                    \
+               ".set\tmips32r5\n\t"                                    \
                _ASM_SET_VIRT                                           \
                "mfgc0\t%0, " #source ", %1\n\t"                        \
                ".set\tpop"                                             \
@@ -1999,7 +1999,7 @@ _ASM_MACRO_0(tlbginvf, _ASM_INSN_IF_MIPS(0x4200000c)
 ({ unsigned long long __res;                                           \
        __asm__ __volatile__(                                           \
                ".set\tpush\n\t"                                        \
-               ".set\tmips64r2\n\t"                                    \
+               ".set\tmips64r5\n\t"                                    \
                _ASM_SET_VIRT                                           \
                "dmfgc0\t%0, " #source ", %1\n\t"                       \
                ".set\tpop"                                             \
@@ -2012,7 +2012,7 @@ _ASM_MACRO_0(tlbginvf, _ASM_INSN_IF_MIPS(0x4200000c)
 do {                                                                   \
        __asm__ __volatile__(                                           \
                ".set\tpush\n\t"                                        \
-               ".set\tmips32r2\n\t"                                    \
+               ".set\tmips32r5\n\t"                                    \
                _ASM_SET_VIRT                                           \
                "mtgc0\t%z0, " #register ", %1\n\t"                     \
                ".set\tpop"                                             \
@@ -2024,7 +2024,7 @@ do {                                                                      \
 do {                                                                   \
        __asm__ __volatile__(                                           \
                ".set\tpush\n\t"                                        \
-               ".set\tmips64r2\n\t"                                    \
+               ".set\tmips64r5\n\t"                                    \
                _ASM_SET_VIRT                                           \
                "dmtgc0\t%z0, " #register ", %1\n\t"                    \
                ".set\tpop"                                             \