* [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx on CONFIG_ARM_MULTIARCH configurations
@ 2025-05-20 12:17 Ahmad Fatoum
2025-05-20 12:17 ` [PATCH master 2/2] ARM: omap: fix cpu_is_omap " Ahmad Fatoum
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2025-05-20 12:17 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
CONFIG_BOARD_ARM_GENERIC_DT is not the only way an i.MX initcall could
run on a non-i.MX SoC. Since the addition of the multiarch (really
multiplatform) support, this can also happen with native images.
Therefore check for both config options.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/mach/imx/generic.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/mach/imx/generic.h b/include/mach/imx/generic.h
index 04086a2ea88d..a0f65391686b 100644
--- a/include/mach/imx/generic.h
+++ b/include/mach/imx/generic.h
@@ -293,7 +293,7 @@ static __always_inline void imx_set_cpu_type(unsigned int cpu_type)
# define cpu_is_vf610() (0)
#endif
-#ifdef CONFIG_BOARD_ARM_GENERIC_DT
+#if defined(CONFIG_ARCH_MULTIARCH) || defined(CONFIG_BOARD_ARM_GENERIC_DT)
# ifdef imx_cpu_type
# undef imx_cpu_type
# define imx_cpu_type __imx_cpu_type
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH master 2/2] ARM: omap: fix cpu_is_omap on CONFIG_ARM_MULTIARCH configurations
2025-05-20 12:17 [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx on CONFIG_ARM_MULTIARCH configurations Ahmad Fatoum
@ 2025-05-20 12:17 ` Ahmad Fatoum
2025-05-20 12:29 ` Roland Hieber
2025-05-20 12:28 ` [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx " Roland Hieber
2025-05-21 7:35 ` Sascha Hauer
2 siblings, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2025-05-20 12:17 UTC (permalink / raw)
To: barebox; +Cc: Roland Hieber, Ahmad Fatoum
Normally, <mach/omap/generic.h> would only be included if we are running
on some OMAP SoC. This doesn't hold true anymore with CONFIG_ARM_MULTIARCH
or CONFIG_BOARD_ARM_GENERIC_DT, because we could have CONFIG_ARCH_AM33XX
enabled, but running on some other SoC, which the header doesn't know about.
This cpu_type scheme is only used on one other SoC and that's the i.MX
and there, there is a final #ifdef clause to fix this, so follow suit.
Reported-by: Roland Hieber <r.hieber@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/mach/omap/generic.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/mach/omap/generic.h b/include/mach/omap/generic.h
index 2961c530bc93..9802087bf295 100644
--- a/include/mach/omap/generic.h
+++ b/include/mach/omap/generic.h
@@ -56,6 +56,15 @@ extern unsigned int __omap_cpu_type;
# define cpu_is_am33xx() (0)
#endif
+#if defined(CONFIG_ARCH_MULTIARCH) || defined(CONFIG_BOARD_ARM_GENERIC_DT)
+# ifdef omap_cpu_type
+# undef omap_cpu_type
+# define omap_cpu_type __omap_cpu_type
+# else
+# define omap_cpu_type 0
+# endif
+#endif
+
#ifdef omap_cpu_type
#define cpu_is_omap() (omap_cpu_type > 0)
#else
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx on CONFIG_ARM_MULTIARCH configurations
2025-05-20 12:17 [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx on CONFIG_ARM_MULTIARCH configurations Ahmad Fatoum
2025-05-20 12:17 ` [PATCH master 2/2] ARM: omap: fix cpu_is_omap " Ahmad Fatoum
@ 2025-05-20 12:28 ` Roland Hieber
2025-05-21 7:35 ` Sascha Hauer
2 siblings, 0 replies; 5+ messages in thread
From: Roland Hieber @ 2025-05-20 12:28 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Tue, May 20, 2025 at 02:17:37PM +0200, Ahmad Fatoum wrote:
> CONFIG_BOARD_ARM_GENERIC_DT is not the only way an i.MX initcall could
> run on a non-i.MX SoC. Since the addition of the multiarch (really
> multiplatform) support, this can also happen with native images.
>
> Therefore check for both config options.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Tested-by: Roland Hieber <rhi@pengutronix.de>
> ---
> include/mach/imx/generic.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/mach/imx/generic.h b/include/mach/imx/generic.h
> index 04086a2ea88d..a0f65391686b 100644
> --- a/include/mach/imx/generic.h
> +++ b/include/mach/imx/generic.h
> @@ -293,7 +293,7 @@ static __always_inline void imx_set_cpu_type(unsigned int cpu_type)
> # define cpu_is_vf610() (0)
> #endif
>
> -#ifdef CONFIG_BOARD_ARM_GENERIC_DT
> +#if defined(CONFIG_ARCH_MULTIARCH) || defined(CONFIG_BOARD_ARM_GENERIC_DT)
> # ifdef imx_cpu_type
> # undef imx_cpu_type
> # define imx_cpu_type __imx_cpu_type
> --
> 2.39.5
>
>
>
--
Roland Hieber, Pengutronix e.K. | rhi@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH master 2/2] ARM: omap: fix cpu_is_omap on CONFIG_ARM_MULTIARCH configurations
2025-05-20 12:17 ` [PATCH master 2/2] ARM: omap: fix cpu_is_omap " Ahmad Fatoum
@ 2025-05-20 12:29 ` Roland Hieber
0 siblings, 0 replies; 5+ messages in thread
From: Roland Hieber @ 2025-05-20 12:29 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Tue, May 20, 2025 at 02:17:38PM +0200, Ahmad Fatoum wrote:
> Normally, <mach/omap/generic.h> would only be included if we are running
> on some OMAP SoC. This doesn't hold true anymore with CONFIG_ARM_MULTIARCH
> or CONFIG_BOARD_ARM_GENERIC_DT, because we could have CONFIG_ARCH_AM33XX
> enabled, but running on some other SoC, which the header doesn't know about.
>
> This cpu_type scheme is only used on one other SoC and that's the i.MX
> and there, there is a final #ifdef clause to fix this, so follow suit.
>
> Reported-by: Roland Hieber <r.hieber@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Thanks!
Tested-by: Roland Hieber <rhi@pengutronix.de>
> ---
> include/mach/omap/generic.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/include/mach/omap/generic.h b/include/mach/omap/generic.h
> index 2961c530bc93..9802087bf295 100644
> --- a/include/mach/omap/generic.h
> +++ b/include/mach/omap/generic.h
> @@ -56,6 +56,15 @@ extern unsigned int __omap_cpu_type;
> # define cpu_is_am33xx() (0)
> #endif
>
> +#if defined(CONFIG_ARCH_MULTIARCH) || defined(CONFIG_BOARD_ARM_GENERIC_DT)
> +# ifdef omap_cpu_type
> +# undef omap_cpu_type
> +# define omap_cpu_type __omap_cpu_type
> +# else
> +# define omap_cpu_type 0
> +# endif
> +#endif
> +
> #ifdef omap_cpu_type
> #define cpu_is_omap() (omap_cpu_type > 0)
> #else
> --
> 2.39.5
>
>
>
--
Roland Hieber, Pengutronix e.K. | rhi@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx on CONFIG_ARM_MULTIARCH configurations
2025-05-20 12:17 [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx on CONFIG_ARM_MULTIARCH configurations Ahmad Fatoum
2025-05-20 12:17 ` [PATCH master 2/2] ARM: omap: fix cpu_is_omap " Ahmad Fatoum
2025-05-20 12:28 ` [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx " Roland Hieber
@ 2025-05-21 7:35 ` Sascha Hauer
2 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2025-05-21 7:35 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Tue, 20 May 2025 14:17:37 +0200, Ahmad Fatoum wrote:
> CONFIG_BOARD_ARM_GENERIC_DT is not the only way an i.MX initcall could
> run on a non-i.MX SoC. Since the addition of the multiarch (really
> multiplatform) support, this can also happen with native images.
>
> Therefore check for both config options.
>
>
> [...]
Applied, thanks!
[1/2] ARM: i.MX: fix cpu_is_imx on CONFIG_ARM_MULTIARCH configurations
https://git.pengutronix.de/cgit/barebox/commit/?id=1826809f122e (link may not be stable)
[2/2] ARM: omap: fix cpu_is_omap on CONFIG_ARM_MULTIARCH configurations
https://git.pengutronix.de/cgit/barebox/commit/?id=ba84cd9af113 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-21 7:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-20 12:17 [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx on CONFIG_ARM_MULTIARCH configurations Ahmad Fatoum
2025-05-20 12:17 ` [PATCH master 2/2] ARM: omap: fix cpu_is_omap " Ahmad Fatoum
2025-05-20 12:29 ` Roland Hieber
2025-05-20 12:28 ` [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx " Roland Hieber
2025-05-21 7:35 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox