[PATCH] ARM64: Fix compiling with GCC 6 and Atomics enabled

From: Andrew Pinski
Date: Fri Dec 18 2015 - 23:18:28 EST


The problem here is that GCC 6 and above emits .arch now
for each function so now the global .arch_extension has
no effect. This fixes the problem by putting
.arch_extension inside ARM64_LSE_ATOMIC_INSN so
it is enabled for each place where LSE is used.

Signed-off-by: Andrew Pinski <apinski@xxxxxxxxxx>
---
arch/arm64/include/asm/lse.h | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/include/asm/lse.h b/arch/arm64/include/asm/lse.h
index 3de42d6..625601f 100644
--- a/arch/arm64/include/asm/lse.h
+++ b/arch/arm64/include/asm/lse.h
@@ -17,8 +17,6 @@

#else /* __ASSEMBLER__ */

-__asm__(".arch_extension lse");
-
/* Move the ll/sc atomics out-of-line */
#define __LL_SC_INLINE
#define __LL_SC_PREFIX(x) __ll_sc_##x
@@ -29,7 +27,7 @@ __asm__(".arch_extension lse");

/* In-line patching at runtime */
#define ARM64_LSE_ATOMIC_INSN(llsc, lse) \
- ALTERNATIVE(llsc, lse, ARM64_HAS_LSE_ATOMICS)
+ ALTERNATIVE(".arch_extension lse\n" llsc, lse, ARM64_HAS_LSE_ATOMICS)

#endif /* __ASSEMBLER__ */
#else /* CONFIG_AS_LSE && CONFIG_ARM64_LSE_ATOMICS */
--
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/