From 9bf3c0bec59b16a068d9c5457696265de590717d Mon Sep 17 00:00:00 2001 From: Sumit Semwal Date: Wed, 9 Nov 2016 01:38:33 +0530 Subject: DO-NOT-UPSTREAM: arm64,llvm: prfm Fix for prfm error on AArch64 Inspired by 4ddb5e09c741: ("DO-NOT-UPSTREAM arm64, LLVMLinux: prfm") Upstream Commit: cd5e10bdf379: ("arm64: prefetch: don't provide spin_lock_prefetch with LSE") updates spin_lock_prefetch() with a prfm instruction, which suffers from the same issue mentioned in the 'inspired by' commit above. This is visible as a build time error with clang: ./arch/arm64/include/asm/processor.h:185:8: error: invalid operand in inline asm: 'prfm pstl1strm, ${0:a}' "prfm pstl1strm, %a0", This patch works around the same way as in the LLVMLinux commit. Signed-off-by: Sumit Semwal --- arch/arm64/include/asm/processor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 8142505bac7e..ed7b2f4ff788 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -182,8 +182,8 @@ static inline void prefetchw(const void *ptr) static inline void spin_lock_prefetch(const void *ptr) { asm volatile(ARM64_LSE_ATOMIC_INSN( - "prfm pstl1strm, %a0", - "nop") : : "p" (ptr)); + "prfm pstl1strm, [%x0]", + "nop") : : "r" (ptr)); } #define HAVE_ARCH_PICK_MMAP_LAYOUT -- cgit v1.2.3