diff options
author | H. Peter Anvin <hpa@zytor.com> | 2016-06-08 15:38:44 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2016-06-08 15:41:20 -0400 |
commit | 35ccfb7114e2f0f454f264c049b03c31f4c6bbc0 (patch) | |
tree | 2012e88f1afee9bc26902042fdaf66e9fdaa48f9 | |
parent | 64be6d36f5674f3424d1901772f76e21874f4954 (diff) |
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: H. Peter Anvin <hpa@zytor.com>
Link: http://lkml.kernel.org/r/1465414726-197858-9-git-send-email-hpa@linux.intel.com
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
-rw-r--r-- | arch/x86/include/asm/rwsem.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h index c5087706c02e..1e8be263065e 100644 --- a/arch/x86/include/asm/rwsem.h +++ b/arch/x86/include/asm/rwsem.h | |||
@@ -149,10 +149,10 @@ static inline bool __down_write_trylock(struct rw_semaphore *sem) | |||
149 | LOCK_PREFIX " cmpxchg %2,%0\n\t" | 149 | LOCK_PREFIX " cmpxchg %2,%0\n\t" |
150 | " jnz 1b\n\t" | 150 | " jnz 1b\n\t" |
151 | "2:\n\t" | 151 | "2:\n\t" |
152 | " sete %3\n\t" | 152 | CC_SET(e) |
153 | "# ending __down_write_trylock\n\t" | 153 | "# ending __down_write_trylock\n\t" |
154 | : "+m" (sem->count), "=&a" (tmp0), "=&r" (tmp1), | 154 | : "+m" (sem->count), "=&a" (tmp0), "=&r" (tmp1), |
155 | "=qm" (result) | 155 | CC_OUT(e) (result) |
156 | : "er" (RWSEM_ACTIVE_WRITE_BIAS) | 156 | : "er" (RWSEM_ACTIVE_WRITE_BIAS) |
157 | : "memory", "cc"); | 157 | : "memory", "cc"); |
158 | return result; | 158 | return result; |