OSDN Git Service

Revert "arm64: spinlock: Drop the prfm from arch_spin_trylock"
authorNick Desaulniers <ndesaulniers@google.com>
Wed, 19 Dec 2018 21:05:31 +0000 (13:05 -0800)
committer0ranko0P <ranko0p@outlook.com>
Tue, 14 Jan 2020 13:43:11 +0000 (21:43 +0800)
This reverts commit 00d37423ceaf815799a1d3e4fd5c958b8b3c66a6.

Causes the following assembler errors:
/tmp/spinlock_debug-15a9d8.s:441: Error: attempt to move .org backwards

The reverted commit is an out of tree patch that does not exist in
4.14.y upstream.  Mainline has outright removed the arch_spin_trylock()
function in this translation units.

See also from mainline:
commit a4c1887d4c14 ("locking/arch: Remove dummy
arch_{read,spin,write}_lock_flags() implementations")
commit c11090474d70 ("arm64: locking: Replace ticket lock implementation
with qspinlock")

Bug: 117152549
Change-Id: I3eb40e5d18ed22c4e3ff1d2b8707e784067aabac
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
arch/arm64/include/asm/spinlock.h

index da7a921..fc037c3 100644 (file)
@@ -103,6 +103,7 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
 
        asm volatile(ARM64_LSE_ATOMIC_INSN(
        /* LL/SC */
+       "       prfm    pstl1strm, %2\n"
        "1:     ldaxr   %w0, %2\n"
        "       eor     %w1, %w0, %w0, ror #16\n"
        "       cbnz    %w1, 2f\n"