All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Fix write_gc0_* macros when writing zero
@ 2016-05-18 16:04 ` James Hogan
  0 siblings, 0 replies; 9+ messages in thread
From: James Hogan @ 2016-05-18 16:04 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: James Hogan, linux-mips

The versions of the __write_{32,64}bit_gc0_register() macros for when
there is no virt support in the assembler use the "J" inline asm
constraint to allow integer zero, but this needs to be accompanied by
the "z" formatting string so that it turns into $0. Fix both macros to
do this.

Fixes: bad50d79255a ("MIPS: Fix VZ probe gas errors with binutils <2.24")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
---
 arch/mips/include/asm/mipsregs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 25d01577d0b5..18bb6f9f0d16 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -1770,7 +1770,7 @@ do {									\
 	__asm__ __volatile__(						\
 		".set\tpush\n\t"					\
 		".set\tnoat\n\t"					\
-		"move\t$1, %0\n\t"					\
+		"move\t$1, %z0\n\t"					\
 		"# mtgc0\t$1, $%1, %2\n\t"				\
 		".word\t(0x40610200 | %1 << 11 | %2)\n\t"		\
 		".set\tpop"						\
@@ -1783,7 +1783,7 @@ do {									\
 	__asm__ __volatile__(						\
 		".set\tpush\n\t"					\
 		".set\tnoat\n\t"					\
-		"move\t$1, %0\n\t"					\
+		"move\t$1, %z0\n\t"					\
 		"# dmtgc0\t$1, $%1, %2\n\t"				\
 		".word\t(0x40610300 | %1 << 11 | %2)\n\t"		\
 		".set\tpop"						\
-- 
2.4.10

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

end of thread, other threads:[~2016-05-20 13:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 16:04 [PATCH] MIPS: Fix write_gc0_* macros when writing zero James Hogan
2016-05-18 16:04 ` James Hogan
2016-05-20  8:01 ` Maciej W. Rozycki
2016-05-20  8:01   ` Maciej W. Rozycki
2016-05-20  8:13   ` James Hogan
2016-05-20  8:13     ` James Hogan
2016-05-20  8:31     ` Maciej W. Rozycki
2016-05-20  8:31       ` Maciej W. Rozycki
2016-05-20 13:13       ` Ralf Baechle

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.