2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-24 05:04:00 +08:00

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:
H. Peter Anvin 2016-06-08 12:38:43 -07:00 committed by H. Peter Anvin
parent 86b61240d4
commit 64be6d36f5

View File

@ -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;