x86, asm: Use CC_SET()/CC_OUT() in <asm/percpu.h>
Remove open-coded uses of set instructions to use CC_SET()/CC_OUT() in <asm/percpu.h>. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Link: http://lkml.kernel.org/r/1465414726-197858-8-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>
This commit is contained in:
parent
86b61240d4
commit
64be6d36f5
|
@ -511,8 +511,9 @@ do { \
|
|||
#define x86_test_and_clear_bit_percpu(bit, var) \
|
||||
({ \
|
||||
bool old__; \
|
||||
asm volatile("btr %2,"__percpu_arg(1)"\n\tsetc %0" \
|
||||
: "=qm" (old__), "+m" (var) \
|
||||
asm volatile("btr %2,"__percpu_arg(1)"\n\t" \
|
||||
CC_SET(c) \
|
||||
: CC_OUT(c) (old__), "+m" (var) \
|
||||
: "dIr" (bit)); \
|
||||
old__; \
|
||||
})
|
||||
|
@ -535,8 +536,8 @@ static inline bool x86_this_cpu_variable_test_bit(int nr,
|
|||
bool oldbit;
|
||||
|
||||
asm volatile("bt "__percpu_arg(2)",%1\n\t"
|
||||
"setc %0"
|
||||
: "=qm" (oldbit)
|
||||
CC_SET(c)
|
||||
: CC_OUT(c) (oldbit)
|
||||
: "m" (*(unsigned long *)addr), "Ir" (nr));
|
||||
|
||||
return oldbit;
|
||||
|
|
Loading…
Reference in New Issue