diff options
author | Will Deacon <will.deacon@arm.com> | 2016-09-06 17:42:58 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-09-09 19:12:34 +0200 |
commit | 05492f2fd87d0a2e6a626bf8fe002c9a11941950 (patch) | |
tree | 021fd9f449e9be0a2876f290f10276bd999dc928 /arch/arm64/include/asm/cmpxchg.h | |
parent | arm64: barriers: introduce nops and __nops macros for NOP sequences (diff) | |
download | linux-05492f2fd87d0a2e6a626bf8fe002c9a11941950.tar.xz linux-05492f2fd87d0a2e6a626bf8fe002c9a11941950.zip |
arm64: lse: convert lse alternatives NOP padding to use __nops
The LSE atomics are implemented using alternative code sequences of
different lengths, and explicit NOP padding is used to ensure the
patching works correctly.
This patch converts the bulk of the LSE code over to using the __nops
macro, which makes it slightly clearer as to what is going on and also
consolidates all of the padding at the end of the various sequences.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/cmpxchg.h')
-rw-r--r-- | arch/arm64/include/asm/cmpxchg.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h index bd86a79491bc..91b26d26af8a 100644 --- a/arch/arm64/include/asm/cmpxchg.h +++ b/arch/arm64/include/asm/cmpxchg.h @@ -43,10 +43,8 @@ static inline unsigned long __xchg_case_##name(unsigned long x, \ " cbnz %w1, 1b\n" \ " " #mb, \ /* LSE atomics */ \ - " nop\n" \ - " nop\n" \ " swp" #acq_lse #rel #sz "\t%" #w "3, %" #w "0, %2\n" \ - " nop\n" \ + __nops(3) \ " " #nop_lse) \ : "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr) \ : "r" (x) \ |