[PATCH] arm64: Paper over ARM_SMCCC_ARCH_WORKAROUND_3 Clang issue
Nathan Chancellor
nathan at kernel.org
Wed Mar 9 11:20:01 PST 2022
On Wed, Mar 09, 2022 at 06:45:13PM +0000, Catalin Marinas wrote:
> On Wed, Mar 09, 2022 at 10:50:36AM -0700, Nathan Chancellor wrote:
> > This diff seems like a somewhat proper solution, as __READ_ONCE() cannot
> > be used in assembly, but I am open to other suggestions.
> >
> > diff --git a/arch/arm64/include/asm/rwonce.h b/arch/arm64/include/asm/rwonce.h
> > index 1bce62fa908a..56f7b1d4d54b 100644
> > --- a/arch/arm64/include/asm/rwonce.h
> > +++ b/arch/arm64/include/asm/rwonce.h
> > @@ -5,7 +5,7 @@
> > #ifndef __ASM_RWONCE_H
> > #define __ASM_RWONCE_H
> >
> > -#ifdef CONFIG_LTO
> > +#if defined(CONFIG_LTO) && !defined(__ASSEMBLY__)
> >
> > #include <linux/compiler_types.h>
> > #include <asm/alternative-macros.h>
> > @@ -66,7 +66,7 @@
> > })
> >
> > #endif /* !BUILD_VDSO */
> > -#endif /* CONFIG_LTO */
> > +#endif /* CONFIG_LTO && !__ASSEMBLY__ */
>
> Thanks Nathan. Would you please send a proper patch for this? I'd go
> with your proposal as it seems more related to LTO than Marc's patch ;).
Done, thanks Catalin and James for your input!
https://lore.kernel.org/r/20220309191633.2307110-1-nathan@kernel.org/
Cheers,
Nathan
More information about the linux-arm-kernel
mailing list