File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -140,17 +140,18 @@ static __always_inline bool
140
140
arch_atomic_try_cmpxchg_lock (atomic_t * v , int * old , int new )
141
141
{
142
142
int r , o = * old ;
143
+ unsigned int eh = IS_ENABLED (CONFIG_PPC64 );
143
144
144
145
__asm__ __volatile__ (
145
- "1: lwarx %0,0,%2,%5 # atomic_try_cmpxchg_acquire \n"
146
+ "1: lwarx %0,0,%2,%[eh] # atomic_try_cmpxchg_acquire \n"
146
147
" cmpw 0,%0,%3 \n"
147
148
" bne- 2f \n"
148
149
" stwcx. %4,0,%2 \n"
149
150
" bne- 1b \n"
150
151
"\t" PPC_ACQUIRE_BARRIER " \n"
151
152
"2: \n"
152
153
: "=&r" (r ), "+m" (v -> counter )
153
- : "r" (& v -> counter ), "r" (o ), "r" (new ), "i " (IS_ENABLED ( CONFIG_PPC64 ) ? 1 : 0 )
154
+ : "r" (& v -> counter ), "r" (o ), "r" (new ), [ eh ] "n " (eh )
154
155
: "cr0" , "memory" );
155
156
156
157
if (unlikely (r != o ))
You can’t perform that action at this time.
0 commit comments