aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Semwal <sumit.semwal@linaro.org>2016-11-09 01:38:33 +0530
committerSumit Semwal <sumit.semwal@linaro.org>2016-12-20 22:19:27 +0530
commit9bf3c0bec59b16a068d9c5457696265de590717d (patch)
treecc278051100344671f7807dde971fea2af201fc9
parent00556abdf94819c7fa3680247ff4a74bd3898ed7 (diff)
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 <sumit.semwal@linaro.org>
-rw-r--r--arch/arm64/include/asm/processor.h4
1 files 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