diff options
Diffstat (limited to 'arch/x86/include/asm/rwsem.h')
| -rw-r--r-- | arch/x86/include/asm/rwsem.h | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h index a34e0d4b957d..4d38d85a16ad 100644 --- a/arch/x86/include/asm/rwsem.h +++ b/arch/x86/include/asm/rwsem.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */  /* rwsem.h: R/W semaphores implemented using XADD/CMPXCHG for i486+   *   * Written by David Howells ([email protected]). @@ -103,7 +104,6 @@ static inline bool __down_read_trylock(struct rw_semaphore *sem)  ({							\  	long tmp;					\  	struct rw_semaphore* ret;			\ -	register void *__sp asm(_ASM_SP);		\  							\  	asm volatile("# beginning down_write\n\t"	\  		     LOCK_PREFIX "  xadd      %1,(%4)\n\t"	\ @@ -114,7 +114,8 @@ static inline bool __down_read_trylock(struct rw_semaphore *sem)  		     "  call " slow_path "\n"		\  		     "1:\n"				\  		     "# ending down_write"		\ -		     : "+m" (sem->count), "=d" (tmp), "=a" (ret), "+r" (__sp) \ +		     : "+m" (sem->count), "=d" (tmp),	\ +		       "=a" (ret), ASM_CALL_CONSTRAINT	\  		     : "a" (sem), "1" (RWSEM_ACTIVE_WRITE_BIAS) \  		     : "memory", "cc");			\  	ret;						\ |