blob: 215de117f3907ccce18807f0bbbb8a7c09387c52 [file] [log] [blame]
From ff0687b37fa923ecbbee25b8baeff96d77011fa1 Mon Sep 17 00:00:00 2001
From: Ilie Halip <>
Date: Thu, 19 Mar 2020 23:45:28 +0200
Subject: [PATCH] arm64: alternative: fix build with clang integrated assembler
commit 6f5459da2b8736720afdbd67c4bd2d1edba7d0e3 upstream.
Building an arm64 defconfig with clang's integrated assembler, this error
<instantiation>:2:2: error: unrecognized instruction mnemonic
_ASM_EXTABLE 9999b, 9f
arch/arm64/mm/cache.S:50:1: note: while in macro instantiation
user_alt 9f, "dc cvau, x4", "dc civac, x4", 0
While GNU as seems fine with case-sensitive macro instantiations, clang
doesn't, so use the actual macro name (_asm_extable) as in the rest of
the file.
Also checked that the generated assembly matches the GCC output.
Reviewed-by: Nick Desaulniers <>
Tested-by: Nick Desaulniers <>
Fixes: 290622efc76e ("arm64: fix "dc cvau" cache operation on errata-affected core")
Signed-off-by: Ilie Halip <>
Signed-off-by: Will Deacon <>
Signed-off-by: Paul Gortmaker <>
diff --git a/arch/arm64/include/asm/alternative.h b/arch/arm64/include/asm/alternative.h
index b9f8d787eea9..97624ee1aaa3 100644
--- a/arch/arm64/include/asm/alternative.h
+++ b/arch/arm64/include/asm/alternative.h
@@ -211,7 +211,7 @@ alternative_endif
.macro user_alt, label, oldinstr, newinstr, cond
9999: alternative_insn "\oldinstr", "\newinstr", \cond
- _ASM_EXTABLE 9999b, \label
+ _asm_extable 9999b, \label