Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: Paper over ARM_SMCCC_ARCH_WORKAROUND_3 Clang issue
@ 2022-03-09 15:57 Marc Zyngier
  2022-03-09 16:09 ` James Morse
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Marc Zyngier @ 2022-03-09 15:57 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: kernel-team, James Morse, Nick Desaulniers, Will Deacon,
	Catalin Marinas

Compiling the arm64 kernel with the BHB workarounds and Clang+LTO
results in a bunch of:

<instantiation>:4:2: error: invalid fixup for movz/movk instruction
 mov w0, #ARM_SMCCC_ARCH_WORKAROUND_3

when compiling arch/arm64/kernel/entry.S, and makes no sense at all.

As it turns out, moving a single include line around makes the
problem disappear. Why, you'd ask? Well, I don't have the faintest
idea, and I'm running out of patience. So make of that what you want.

Cc: James Morse <james.morse@arm.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/arm-smccc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index 220c8c60e021..0a341dd9ff61 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -5,7 +5,6 @@
 #ifndef __LINUX_ARM_SMCCC_H
 #define __LINUX_ARM_SMCCC_H
 
-#include <linux/init.h>
 #include <uapi/linux/const.h>
 
 /*
@@ -193,6 +192,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/init.h>
 #include <linux/linkage.h>
 #include <linux/types.h>
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-09 19:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-09 15:57 [PATCH] arm64: Paper over ARM_SMCCC_ARCH_WORKAROUND_3 Clang issue Marc Zyngier
2022-03-09 16:09 ` James Morse
2022-03-09 17:11 ` Nathan Chancellor
2022-03-09 17:50   ` Nathan Chancellor
2022-03-09 18:26     ` James Morse
2022-03-09 18:45     ` Catalin Marinas
2022-03-09 19:20       ` Nathan Chancellor
2022-03-09 17:19 ` Robin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox