diff mbox series

ARM: Enable CONFIG_64BIT for static analysis

Message ID d156b6f6-429e-4c6c-b863-f8554480d74a@moroto.mountain
State Changes Requested
Delegated to: Tom Rini
Headers show
Series ARM: Enable CONFIG_64BIT for static analysis | expand

Commit Message

Dan Carpenter Feb. 22, 2024, 6:47 a.m. UTC
In the Makefile there is a line that says this:

    # the checker needs the correct machine size
    CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)

So set CONFIG_64BIT so that we don't pass -m32 to the static checker.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 arch/arm/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Tom Rini Feb. 22, 2024, 1:16 p.m. UTC | #1
On Thu, Feb 22, 2024 at 09:47:58AM +0300, Dan Carpenter wrote:

> In the Makefile there is a line that says this:
> 
>     # the checker needs the correct machine size
>     CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)
> 
> So set CONFIG_64BIT so that we don't pass -m32 to the static checker.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  arch/arm/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index fde85dc0d537..4c7be7cf9c33 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1,11 +1,15 @@
>  menu "ARM architecture"
>  	depends on ARM
>  
> +config 64BIT
> +	bool
> +
>  config SYS_ARCH
>  	default "arm"
>  
>  config ARM64
>  	bool
> +	select 64BIT
>  	select PHYS_64BIT
>  	select SYS_CACHE_SHIFT_6
>  	imply SPL_SEPARATE_BSS

That we have 'config 64BIT' in arch/{mips,riscv}/Kconfig as well is a
leftover of thinking this is like the Linux Kernel where there's no
top-level arch/Kconfig file, can you please move the two existing config
64BIT entries to arch/Kconfig and then select it for ARM64? Thanks.
Dan Carpenter Feb. 22, 2024, 1:55 p.m. UTC | #2
On Thu, Feb 22, 2024 at 08:16:19AM -0500, Tom Rini wrote:
> 
> That we have 'config 64BIT' in arch/{mips,riscv}/Kconfig as well is a
> leftover of thinking this is like the Linux Kernel where there's no
> top-level arch/Kconfig file, can you please move the two existing config
> 64BIT entries to arch/Kconfig and then select it for ARM64? Thanks.

Sure.  Even better.

regards,
dan carpenter
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fde85dc0d537..4c7be7cf9c33 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1,11 +1,15 @@ 
 menu "ARM architecture"
 	depends on ARM
 
+config 64BIT
+	bool
+
 config SYS_ARCH
 	default "arm"
 
 config ARM64
 	bool
+	select 64BIT
 	select PHYS_64BIT
 	select SYS_CACHE_SHIFT_6
 	imply SPL_SEPARATE_BSS