From: Eric Biggers <ebiggers@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] crypto: arm64/ghash - Reduce boilerplate
Date: Tue, 10 Nov 2026 13:06:30 -0800 [thread overview]
Message-ID: <20261110210630.GA1907@quark> (raw)
In-Reply-To: <20261109164502.905237-2-u.kleine-koenig@baylibre.com>
On Mon, Nov 09, 2026 at 05:45:02PM +0100, Uwe Kleine-König wrote:
> Make use of module_cpu_feature_match() which expands to nearly the code
> that is typed out.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
> arch/arm64/crypto/ghash-ce-glue.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm64/crypto/ghash-ce-glue.c b/arch/arm64/crypto/ghash-ce-glue.c
> index eaf2932ceaf5..0884f812a315 100644
> --- a/arch/arm64/crypto/ghash-ce-glue.c
> +++ b/arch/arm64/crypto/ghash-ce-glue.c
> @@ -384,7 +384,8 @@ static struct aead_alg gcm_aes_algs[] = {{
>
> static int __init ghash_ce_mod_init(void)
> {
> - if (!cpu_have_named_feature(ASIMD) || !cpu_have_named_feature(PMULL))
> + /* ASIMD is implied by PMULL, but better be safe than sorry */
> + if (!cpu_have_named_feature(ASIMD))
> return -ENODEV;
The ASIMD check can be dropped too. There's already other code that
assumes PMULL implies ASIMD.
- Eric
prev parent reply other threads:[~2026-11-10 21:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 16:45 [PATCH] crypto: arm64/ghash - Reduce boilerplate Uwe Kleine-König
2026-11-10 21:06 ` Eric Biggers [this message]
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=20261110210630.GA1907@quark \
--to=ebiggers@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=will@kernel.org \
/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