From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Eric Biggers" <ebiggers@kernel.org>
Cc: linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
"Demian Shulhan" <demyansh@gmail.com>
Subject: Re: [PATCH 5/5] lib/crc: arm: Enable arm64's NEON intrinsics implementation of crc64
Date: Wed, 01 Apr 2026 18:48:28 +0200 [thread overview]
Message-ID: <e3f27e82-604c-4744-a2e9-bbf72dbafa44@app.fastmail.com> (raw)
In-Reply-To: <20260331224156.GB45047@quark>
On Wed, 1 Apr 2026, at 00:41, Eric Biggers wrote:
> On Mon, Mar 30, 2026 at 04:46:36PM +0200, Ard Biesheuvel wrote:
>> Enable big-endian support only on GCC - the code generated by Clang is
>> horribly broken.
> [...]
>> +#if defined(CONFIG_ARM) && defined(CONFIG_CC_IS_CLANG)
>> +static inline uint64x2_t pmull64(uint64x2_t a, uint64x2_t b)
>> +{
>> + uint64_t l = vgetq_lane_u64(a, 0);
>> + uint64_t m = vgetq_lane_u64(b, 0);
>> + uint64x2_t result;
>> +
>> + asm("vmull.p64 %q0, %1, %2" : "=w"(result) : "w"(l), "w"(m));
>> +
>> + return result;
>> +}
>
> Perhaps omit big endian support, and use the inline asm implementation
> of these functions with both gcc and clang? The more unique
> combinations need to be tested to cover all the code, the higher the
> chance of one being missed in testing.
>
Yeah that should work.
> Also, leaving shared code in lib/crc/arm64/ will be confusing. How
> about lib/crc/arm-common/, and crc64_nvme_arm64_c => crc64_nvme_neon()?
> Or even just put crc64-neon.c directly in lib/crc/.
>
Yeah the latter seems the most straight-forward.
next prev parent reply other threads:[~2026-04-01 16:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 14:46 [PATCH 0/5] crc64: Tweak intrinsics code and enable it for ARM Ard Biesheuvel
2026-03-30 14:46 ` [PATCH 1/5] lib/crc: arm64: Drop unnecessary chunking logic from crc64 Ard Biesheuvel
2026-03-31 22:33 ` Eric Biggers
2026-04-01 0:09 ` Eric Biggers
2026-04-01 6:57 ` Ard Biesheuvel
2026-03-30 14:46 ` [PATCH 2/5] lib/crc: arm64: Use existing macros for kernel-mode FPU cflags Ard Biesheuvel
2026-03-30 14:46 ` [PATCH 3/5] ARM: Add a neon-intrinsics.h header like on arm64 Ard Biesheuvel
2026-03-30 14:46 ` [PATCH 4/5] lib/crc: arm64: Simplify intrinsics implementation Ard Biesheuvel
2026-03-30 14:46 ` [PATCH 5/5] lib/crc: arm: Enable arm64's NEON intrinsics implementation of crc64 Ard Biesheuvel
2026-03-31 6:47 ` Christoph Hellwig
2026-03-31 8:20 ` Ard Biesheuvel
2026-03-31 22:41 ` Eric Biggers
2026-04-01 16:48 ` Ard Biesheuvel [this message]
2026-04-01 19:59 ` [PATCH 0/5] crc64: Tweak intrinsics code and enable it for ARM Eric Biggers
2026-04-02 8:52 ` Ard Biesheuvel
2026-04-02 23:40 ` Eric Biggers
2026-04-03 6:49 ` Ard Biesheuvel
2026-04-03 19:59 ` Eric Biggers
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=e3f27e82-604c-4744-a2e9-bbf72dbafa44@app.fastmail.com \
--to=ardb@kernel.org \
--cc=demyansh@gmail.com \
--cc=ebiggers@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.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