From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 3/7] include: sync <linux/linkage.h> with Linux
Date: Fri, 26 May 2023 09:45:17 +0200 [thread overview]
Message-ID: <919f0a5e-14e1-694d-ccf2-ca5f3b055b11@pengutronix.de> (raw)
In-Reply-To: <20230526065436.GQ17518@pengutronix.de>
On 26.05.23 08:54, Sascha Hauer wrote:
> On Fri, May 26, 2023 at 08:37:42AM +0200, Ahmad Fatoum wrote:
>> Linux has added new SYM_ macros in the assembly code and deprecated
>> ENTRY/PROC. Import the necessary definitions to make kernel code
>> porting easier.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>> common/Kconfig | 6 +
>> include/linux/linkage.h | 321 ++++++++++++++++++++++++++++++++++++----
>> 2 files changed, 298 insertions(+), 29 deletions(-)
>>
>> diff --git a/common/Kconfig b/common/Kconfig
>> index ce94718c848a..5346ba5a623c 100644
>> --- a/common/Kconfig
>> +++ b/common/Kconfig
>> @@ -1710,3 +1710,9 @@ config DDR_SPD
>>
>> config HAVE_ARCH_ASAN
>> bool
>> +
>> +config ARCH_USE_SYM_ANNOTATIONS
>> + bool
>> + help
>> + This is selected by architectures that exclusively use the new SYM_
>> + macros in their assembly code and not the deprecated ENTRY/PROC.
>> diff --git a/include/linux/linkage.h b/include/linux/linkage.h
>> index efb2d6fa407b..c262c7b36907 100644
>> --- a/include/linux/linkage.h
>> +++ b/include/linux/linkage.h
>> @@ -3,9 +3,16 @@
>> #ifndef _LINUX_LINKAGE_H
>> #define _LINUX_LINKAGE_H
>>
>> -#include <linux/compiler.h>
>> +#include <linux/compiler_types.h>
>> +#include <linux/stringify.h>
>> +#include <linux/export.h>
>
> This breaks compilation zylonite310_defconfig. include/linux/export.h is
> not safe for being included from assembly files when CONFIG_MODULES is
> enabled. We could drop this inclusion here as linux/export.h doesn't
> contain anything useful for assembly code. However, I added the
> following instead to not trap into this again should linux/linkage.h
> be updated again.
>
> Sascha
>
> From 36b3448b724db0ed1888d61de7069df0ebcfcdc1 Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Fri, 26 May 2023 08:48:55 +0200
> Subject: [PATCH] include: make linux/export.h safe for being included from
> assembly
>
> include/linux/linkage.h is included from assembly files and itself
> includes linux/export.h, so add #ifndef __ASSEMBLY__ protection
> to that file as well.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Looks good to me. Thanks!
> ---
> include/linux/export.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/export.h b/include/linux/export.h
> index 88d318bd8a..90f6ada2d5 100644
> --- a/include/linux/export.h
> +++ b/include/linux/export.h
> @@ -2,6 +2,8 @@
> #ifndef _LINUX_EXPORT_H
> #define _LINUX_EXPORT_H
>
> +#ifndef __ASSEMBLY__
> +
> #define THIS_MODULE 0
>
> #ifdef CONFIG_MODULES
> @@ -36,4 +38,6 @@ struct kernel_symbol
>
> #endif /* CONFIG_MODULES */
>
> +#endif /* __ASSEMBLY__ */
> +
> #endif /* _LINUX_EXPORT_H */
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2023-05-26 7:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 6:37 [PATCH v2 0/7] ARM64: crypto: add Crypto Extensions accelerated SHA implementation Ahmad Fatoum
2023-05-26 6:37 ` [PATCH v2 1/7] crypto: digest: match driver name if no algo name matches Ahmad Fatoum
2023-05-26 6:37 ` [PATCH v2 2/7] test: self: add digest test Ahmad Fatoum
2023-05-26 6:37 ` [PATCH v2 3/7] include: sync <linux/linkage.h> with Linux Ahmad Fatoum
2023-05-26 6:54 ` Sascha Hauer
2023-05-26 7:45 ` Ahmad Fatoum [this message]
2023-05-26 6:37 ` [PATCH v2 4/7] ARM: asm: implement CPU_BE/CPU_LE Ahmad Fatoum
2023-05-26 6:37 ` [PATCH v2 5/7] ARM: asm: import Linux adr_l/ldr_l assembler.h definitions Ahmad Fatoum
2023-05-26 6:37 ` [PATCH v2 6/7] crypto: sha: reorder struct sha*_state into Linux order Ahmad Fatoum
2023-05-26 6:37 ` [PATCH v2 7/7] ARM64: crypto: add Crypto Extensions accelerated SHA implementation Ahmad Fatoum
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=919f0a5e-14e1-694d-ccf2-ca5f3b055b11@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=sha@pengutronix.de \
/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