mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 21:24: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:
parent
86b61240d4
commit
64be6d36f5
@ -511,8 +511,9 @@ do { \
|
|||||||
#define x86_test_and_clear_bit_percpu(bit, var) \
|
#define x86_test_and_clear_bit_percpu(bit, var) \
|
||||||
({ \
|
({ \
|
||||||
bool old__; \
|
bool old__; \
|
||||||
asm volatile("btr %2,"__percpu_arg(1)"\n\tsetc %0" \
|
asm volatile("btr %2,"__percpu_arg(1)"\n\t" \
|
||||||
: "=qm" (old__), "+m" (var) \
|
CC_SET(c) \
|
||||||
|
: CC_OUT(c) (old__), "+m" (var) \
|
||||||
: "dIr" (bit)); \
|
: "dIr" (bit)); \
|
||||||
old__; \
|
old__; \
|
||||||
})
|
})
|
||||||
@ -535,8 +536,8 @@ static inline bool x86_this_cpu_variable_test_bit(int nr,
|
|||||||
bool oldbit;
|
bool oldbit;
|
||||||
|
|
||||||
asm volatile("bt "__percpu_arg(2)",%1\n\t"
|
asm volatile("bt "__percpu_arg(2)",%1\n\t"
|
||||||
"setc %0"
|
CC_SET(c)
|
||||||
: "=qm" (oldbit)
|
: CC_OUT(c) (oldbit)
|
||||||
: "m" (*(unsigned long *)addr), "Ir" (nr));
|
: "m" (*(unsigned long *)addr), "Ir" (nr));
|
||||||
|
|
||||||
return oldbit;
|
return oldbit;
|
||||||
|
Loading…
Reference in New Issue
Block a user