diff mbox series

[v1,2/2] powerpc: Use %y addressing on bitops

Message ID f79f83b551b7c955dd2022552ff1c483f4401922.1614674882.git.christophe.leroy@csgroup.eu (mailing list archive)
State Superseded
Headers show
Series [v1,1/2] powerpc: Use lwarx/ldarx directly instead of PPC_LWARX/LDARX macros | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (626a6c3d2e20da80aaa710104f34ea6037b28b33)
snowpatch_ozlabs/build-ppc64le success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/checkpatch warning total: 0 errors, 1 warnings, 0 checks, 46 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Christophe Leroy March 2, 2021, 8:48 a.m. UTC
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/include/asm/bitops.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h
index 11847b6a244e..264626b13ea8 100644
--- a/arch/powerpc/include/asm/bitops.h
+++ b/arch/powerpc/include/asm/bitops.h
@@ -70,12 +70,12 @@  static inline void fn(unsigned long mask,	\
 	unsigned long *p = (unsigned long *)_p;	\
 	__asm__ __volatile__ (			\
 	prefix					\
-"1:"	PPC_LLARX "%0,0,%3,0\n"			\
+"1:"	PPC_LLARX "%0,%y3,0\n"			\
 	stringify_in_c(op) "%0,%0,%2\n"		\
-	PPC_STLCX "%0,0,%3\n"			\
+	PPC_STLCX "%0,%y3\n"			\
 	"bne- 1b\n"				\
 	: "=&r" (old), "+m" (*p)		\
-	: "r" (mask), "r" (p)			\
+	: "r" (mask), "Z" (*p)			\
 	: "cc", "memory");			\
 }
 
@@ -115,13 +115,13 @@  static inline unsigned long fn(			\
 	unsigned long *p = (unsigned long *)_p;		\
 	__asm__ __volatile__ (				\
 	prefix						\
-"1:"	PPC_LLARX "%0,0,%3,%4\n"			\
+"1:"	PPC_LLARX "%0,%y3,%4\n"				\
 	stringify_in_c(op) "%1,%0,%2\n"			\
-	PPC_STLCX "%1,0,%3\n"				\
+	PPC_STLCX "%1,%y3\n"				\
 	"bne- 1b\n"					\
 	postfix						\
 	: "=&r" (old), "=&r" (t)			\
-	: "r" (mask), "r" (p), "i" (IS_ENABLED(CONFIG_PPC64) ? eh : 0)	\
+	: "r" (mask), "Z" (*p), "i" (IS_ENABLED(CONFIG_PPC64) ? eh : 0)	\
 	: "cc", "memory");				\
 	return (old & mask);				\
 }
@@ -170,12 +170,12 @@  clear_bit_unlock_return_word(int nr, volatile unsigned long *addr)
 
 	__asm__ __volatile__ (
 	PPC_RELEASE_BARRIER
-"1:"	PPC_LLARX "%0,0,%3,0\n"
+"1:"	PPC_LLARX "%0,%y3,0\n"
 	"andc %1,%0,%2\n"
-	PPC_STLCX "%1,0,%3\n"
+	PPC_STLCX "%1,%y3\n"
 	"bne- 1b\n"
 	: "=&r" (old), "=&r" (t)
-	: "r" (mask), "r" (p)
+	: "r" (mask), "Z" (*p)
 	: "cc", "memory");
 
 	return old;