Skip to contentSkip to conversation

arm64: prefetch: add missing #include for spin_lock_prefetch

PATCH New Will Deacon 2 participants 2 messages Feb 10, 2016 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: prefetch: add missing #include for spin_lock_prefetch

As of 52e662326e1e ("arm64: prefetch: don't provide spin_lock_prefetch with LSE"), spin_lock_prefetch is patched at runtime when the LSE atomics are in use. This relies on the ARM64_LSE_ATOMIC_INSN macro to drive the alternatives framework, but that macro is only available via asm/lse.h, which isn't explicitly included in processor.h. Consequently, drivers can run into build failures such as:

In file included from include/linux/prefetch.h:14:0,

                    from drivers/net/ethernet/intel/i40e/i40e_txrx.c:27:
   arch/arm64/include/asm/processor.h: In function 'spin_lock_prefetch':
   arch/arm64/include/asm/processor.h:183:15: error: expected string literal before 'ARM64_LSE_ATOMIC_INSN'
     asm volatile(ARM64_LSE_ATOMIC_INSN(

This patch add the missing include and gets things building again.

---
 arch/arm64/include/asm/processor.h | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/include/asm/processor.h +1 -0
index 31b76fce4477..5bb1d763d17a 100644
@@ -32,6 +32,7 @@
 #include <asm/alternative.h>
 #include <asm/fpsimd.h>
 #include <asm/hw_breakpoint.h>
+#include <asm/lse.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/ptrace.h>
 #include <asm/types.h>
Signature · 1 line
2.1.4
maintainer Applied
#1 lore raw

PATCH 1/1 arm64: prefetch: add missing #include for spin_lock_prefetch

Quoted 13 lines · Will Deacon

As of 52e662326e1e ("arm64: prefetch: don't provide spin_lock_prefetch with LSE"), spin_lock_prefetch is patched at runtime when the LSE atomics are in use. This relies on the ARM64_LSE_ATOMIC_INSN macro to drive the alternatives framework, but that macro is only available via asm/lse.h, which isn't explicitly included in processor.h. Consequently, drivers can run into build failures such as:

In file included from include/linux/prefetch.h:14:0,

                    from drivers/net/ethernet/intel/i40e/i40e_txrx.c:27:
   arch/arm64/include/asm/processor.h: In function 'spin_lock_prefetch':
   arch/arm64/include/asm/processor.h:183:15: error: expected string literal before 'ARM64_LSE_ATOMIC_INSN'
     asm volatile(ARM64_LSE_ATOMIC_INSN(
Quoted 4 lines

This patch add the missing include and gets things building again.

Applied. Thanks.

Signature · 1 line
Catalin