All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: set mips32r5 for virt extensions
@ 2021-06-28 21:50 Nick Desaulniers
  2021-06-29  8:33 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Desaulniers @ 2021-06-28 21:50 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: Nick Desaulniers, Dmitry Golovin, Nathan Chancellor, Huacai Chen,
	WANG Xuerui, Maciej W. Rozycki, Tiezhu Yang, linux-mips,
	linux-kernel, clang-built-linux

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>
---
 arch/mips/include/asm/mipsregs.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 9c8099a6ffed..acdf8c69220b 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -2077,7 +2077,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"						\
@@ -2090,7 +2090,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"						\
@@ -2103,7 +2103,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"						\
@@ -2115,7 +2115,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"						\
-- 
2.32.0.93.g670b81a890-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: set mips32r5 for virt extensions
  2021-06-28 21:50 [PATCH] MIPS: set mips32r5 for virt extensions Nick Desaulniers
@ 2021-06-29  8:33 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-06-29  8:33 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Dmitry Golovin, Nathan Chancellor, Huacai Chen, WANG Xuerui,
	Maciej W. Rozycki, Tiezhu Yang, linux-mips, linux-kernel,
	clang-built-linux

On Mon, Jun 28, 2021 at 02:50:26PM -0700, Nick Desaulniers wrote:
> 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>
> ---
>  arch/mips/include/asm/mipsregs.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-29  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 21:50 [PATCH] MIPS: set mips32r5 for virt extensions Nick Desaulniers
2021-06-29  8:33 ` Thomas Bogendoerfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.