[PATCH v5 21/44] x86: Use string functions for all 32-bit builds

Tom Rini trini at konsulko.com
Thu Mar 2 21:37:50 CET 2023


On Wed, Feb 22, 2023 at 09:34:02AM -0700, Simon Glass wrote:

> At present these are not included in SPL. They do add to code size but
> are a bit faster, so adjust the setting to add them.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
> (no changes since v1)
> 
>  arch/x86/include/asm/string.h | 2 +-
>  arch/x86/lib/Makefile         | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/string.h b/arch/x86/include/asm/string.h
> index c15b264a5c0..0254a022160 100644
> --- a/arch/x86/include/asm/string.h
> +++ b/arch/x86/include/asm/string.h
> @@ -14,7 +14,7 @@ extern char *strrchr(const char *s, int c);
>  #undef __HAVE_ARCH_STRCHR
>  extern char *strchr(const char *s, int c);
>  
> -#ifdef CONFIG_X86_64
> +#if CONFIG_IS_ENABLED(X86_64)
>  
>  #undef __HAVE_ARCH_MEMCPY
>  extern void *memcpy(void *, const void *, __kernel_size_t);
> diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
> index a6f22441474..ea7ff2bcf38 100644
> --- a/arch/x86/lib/Makefile
> +++ b/arch/x86/lib/Makefile
> @@ -4,7 +4,7 @@
>  # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
>  
>  obj-y	+= bdinfo.o
> -ifndef CONFIG_X86_64
> +ifndef CONFIG_$(SPL_TPL_)X86_64
>  ifndef CONFIG_TPL_BUILD
>  obj-y += bios.o
>  obj-y += bios_asm.o

This is just.. confusing.  Please re-work the string selection code to
be more direct, with a new symbol if needed.  And please re-examine if
SPL_X86_64 is needed as a symbol at all.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230302/c5a3379e/attachment.sig>


More information about the U-Boot mailing list