From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
To: Stefan Roese <sr@denx.de>, u-boot@lists.denx.de
Cc: Wolfgang Denk <wd@denx.de>, sjg@chromium.org, trini@konsulko.com
Subject: Re: [PATCH v4 3/3] arm64: Kconfig: Enable usage of optimized memset/memcpy/memmove
Date: Fri, 13 Aug 2021 11:38:17 +0200 [thread overview]
Message-ID: <3bdbc28d-e000-ef0a-3277-abdad4023310@prevas.dk> (raw)
In-Reply-To: <20210812144751.2563707-4-sr@denx.de>
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@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
next prev parent reply other threads:[~2021-08-13 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 14:47 [PATCH v4 0/3] arm64: Add optimized memset/memcpy/memove functions Stefan Roese
2021-08-12 14:47 ` [PATCH v4 1/3] arm64: arch/arm/lib: Add optimized memset/memcpy/memmove functions Stefan Roese
2021-08-12 14:47 ` [PATCH v4 2/3] arm64: memset-arm64: Use simple memset when cache is disabled Stefan Roese
2021-08-12 14:47 ` [PATCH v4 3/3] arm64: Kconfig: Enable usage of optimized memset/memcpy/memmove Stefan Roese
2021-08-13 9:38 ` Rasmus Villemoes [this message]
2021-08-17 8:50 ` Stefan Roese
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=3bdbc28d-e000-ef0a-3277-abdad4023310@prevas.dk \
--to=rasmus.villemoes@prevas.dk \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=wd@denx.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