提交 35ccfb71 编写于 作者: H H. Peter Anvin 提交者: H. Peter Anvin

x86, asm: Use CC_SET()/CC_OUT() in <asm/rwsem.h>

Remove open-coded uses of set instructions to use CC_SET()/CC_OUT() in
<asm/rwsem.h>.
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
Link: http://lkml.kernel.org/r/1465414726-197858-9-git-send-email-hpa@linux.intel.comReviewed-by: NAndy Lutomirski <luto@kernel.org>
Reviewed-by: NBorislav Petkov <bp@suse.de>
Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
上级 64be6d36
...@@ -149,10 +149,10 @@ static inline bool __down_write_trylock(struct rw_semaphore *sem) ...@@ -149,10 +149,10 @@ static inline bool __down_write_trylock(struct rw_semaphore *sem)
LOCK_PREFIX " cmpxchg %2,%0\n\t" LOCK_PREFIX " cmpxchg %2,%0\n\t"
" jnz 1b\n\t" " jnz 1b\n\t"
"2:\n\t" "2:\n\t"
" sete %3\n\t" CC_SET(e)
"# ending __down_write_trylock\n\t" "# ending __down_write_trylock\n\t"
: "+m" (sem->count), "=&a" (tmp0), "=&r" (tmp1), : "+m" (sem->count), "=&a" (tmp0), "=&r" (tmp1),
"=qm" (result) CC_OUT(e) (result)
: "er" (RWSEM_ACTIVE_WRITE_BIAS) : "er" (RWSEM_ACTIVE_WRITE_BIAS)
: "memory", "cc"); : "memory", "cc");
return result; return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册