From: Robin Murphy <robin.murphy@arm.com>
To: Marc Zyngier <maz@kernel.org>, linux-arm-kernel@lists.infradead.org
Cc: kernel-team@android.com, James Morse <james.morse@arm.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH] arm64: Paper over ARM_SMCCC_ARCH_WORKAROUND_3 Clang issue
Date: Wed, 9 Mar 2022 17:19:18 +0000 [thread overview]
Message-ID: <894ef565-187e-c7dc-94ec-8e9cc7abe9a3@arm.com> (raw)
In-Reply-To: <20220309155716.3988480-1-maz@kernel.org>
On 2022-03-09 15:57, Marc Zyngier wrote:
> 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.
Alternatively, this is a perfectly valid cleanup, reducing the scope of
a header inclusion to the C prototype that actually needs it, thus
reducing header bloat for assembly files that don't. Which happens to
also have a pleasant side-effect in avoiding an inexplicable LTO nonsense :D
Even just in terms of that cleanup,
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
FWIW, my gut feeling is that LTO has somehow blurred the lines between
different expansions of _AC() in ARM_SMCCC_ARCH_WORKAROUND_3 that it
remembers from other compilation units that it's busy munging together,
and confused itself.
Robin.
> 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>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-03-09 17:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=894ef565-187e-c7dc-94ec-8e9cc7abe9a3@arm.com \
--to=robin.murphy@arm.com \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=ndesaulniers@google.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).