lkml.org 
[lkml]   [2021]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 2/2] powerpc: Use %y addressing on bitops
Date
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/include/asm/bitops.h | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

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;
--
2.25.0
\
 
 \ /
  Last update: 2021-03-02 16:39    [W:0.888 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site