[PATCH v4 3/3] arm64: Kconfig: Enable usage of optimized memset/memcpy/memmove
Rasmus Villemoes
rasmus.villemoes at prevas.dk
Fri Aug 13 11:38:17 CEST 2021
On 12/08/2021 16.47, Stefan Roese wrote:
> This patch enables the use of the optimized memset(), memmove() &
> memcpy() versions recently added on ARM64.
>
> Signed-off-by: Stefan Roese <sr at denx.de>
>
>
> +config USE_ARCH_MEMMOVE
> + bool "Use an assembly optimized implementation of memmove"
> + default y
> + depends on ARM64
> + help
> + Enable the generation of an optimized version of memmove.
> + Such an implementation may be faster under some conditions
> + but may increase the binary size.
Hm. I don't think you can allow making this separately (de)selectable,
since if the optimized memcpy is selected, the memmove comes
unconditionally for free [and it would be a bit silly to guard the
ENTRY_ALIAS() by a CONFIG check IMO]. So with USE_ARCH_MEMCPY=y,
USE_ARCH_MEMMOVE=n, I think you'd get a "multiple definitions of
memmove" error. So on arm64, I think USE_ARCH_MEMMOVE should simply be
an unchangeable alias for USE_ARCH_MEMCPY (and similarly for the SPL/TPL
variants).
In Kconfig, I think one could spell this
bool "Use an ..." if !ARM64
default USE_ARCH_MEMCPY if ARM64
depends on ARM64
where the last line can be removed if an when there's a separate memmove
for arm32 that one should be allowed to select.
Rasmus
More information about the U-Boot
mailing list