1a3a555c by Mark Charlebois Committed by Behan Webster


Fix for prfm error on AArch64

The following error is generated with the mainline clang compiler
for AArch64:

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>
1 parent 7c220923
......@@ -147,13 +147,13 @@ extern struct task_struct *cpu_switch_to(struct task_struct *prev,
static inline void prefetch(const void *ptr)
asm volatile("prfm pldl1keep, %a0\n" : : "p" (ptr));
asm volatile("prfm pldl1keep, [%x0]\n" : : "p" (ptr));
static inline void prefetchw(const void *ptr)
asm volatile("prfm pstl1keep, %a0\n" : : "p" (ptr));
asm volatile("prfm pstl1keep, [%x0]\n" : : "p" (ptr));