diff options
author | Mark Charlebois <charlebm@gmail.com> | 2014-07-30 15:55:33 -0700 |
---|---|---|
committer | Behan Webster <behanw@converseincode.com> | 2014-08-30 14:22:05 -0700 |
commit | 1a3a555c6ddeba7470a890d2bf839bee19f297fc (patch) | |
tree | 3dfc7aecb5f5f8cc3eeb2688e4f4574bd4d0b8bc | |
parent | 7c220923da8eecc4c63572de567d6e3a08f53b9a (diff) |
Fix for prfm error on AArch64
The following error is generated with the mainline clang compiler
for AArch64:
arch/arm64/include/asm/processor.h:149:15:
error: invalid operand in inline asm: 'prfm pldl1keep, ${0:a}
'
Per comments by Tim Northover on the LLVM Bug database:
"It's rather unclear how it's better than "prfm pstl1keep, [%0]" though.
Not all instructions can make use of any offset, so wouldn't we have to be
conservative and always map it to "[xN]"?
This test works with GCC under unit test but not in the kernel build.
Not-Signed-off-by: Mark Charlebois <charlebm@gmail.com>
-rw-r--r-- | arch/arm64/include/asm/processor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 3df21feeabdd..0be402d22cdb 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -147,13 +147,13 @@ extern struct task_struct *cpu_switch_to(struct task_struct *prev, #define ARCH_HAS_PREFETCH static inline void prefetch(const void *ptr) { - asm volatile("prfm pldl1keep, %a0\n" : : "p" (ptr)); + asm volatile("prfm pldl1keep, [%x0]\n" : : "p" (ptr)); } #define ARCH_HAS_PREFETCHW static inline void prefetchw(const void *ptr) { - asm volatile("prfm pstl1keep, %a0\n" : : "p" (ptr)); + asm volatile("prfm pstl1keep, [%x0]\n" : : "p" (ptr)); } #define ARCH_HAS_SPINLOCK_PREFETCH |