From: Christoph Hellwig <hch@infradead.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Demian Shulhan <demyansh@gmail.com>,
Eric Biggers <ebiggers@kernel.org>
Subject: Re: [PATCH 5/5] lib/crc: arm: Enable arm64's NEON intrinsics implementation of crc64
Date: Mon, 30 Mar 2026 23:47:42 -0700 [thread overview]
Message-ID: <actuDkpYbzLj0sI8@infradead.org> (raw)
In-Reply-To: <20260330144630.33026-12-ardb@kernel.org>
> depends on CRC64 && CRC_OPTIMIZATIONS
> + default y if ARM && KERNEL_MODE_NEON && !(CPU_BIG_ENDIAN && CC_IS_CLANG)
It would be useful to throw in a comment here why it is disabled for
big-endian on clang.
> +#define crc64_be_arch crc64_be_generic
> +
> +static inline u64 crc64_nvme_arch(u64 crc, const u8 *p, size_t len)
> +{
> + if (len >= 128 && static_branch_likely(&have_pmull) &&
> + likely(may_use_simd())) {
> + do {
> + size_t chunk = min_t(size_t, len & ~15, SZ_4K);
> +
> + scoped_ksimd()
> + crc = crc64_nvme_arm64_c(crc, p, chunk);
> +
> + p += chunk;
> + len -= chunk;
> + } while (len >= 128);
> + }
From reading the earlier patches, I'll assume arm SIMD code is
non-preemptable and thus you want the chunking here? Maybe add
a little comment explaining that?
next prev parent reply other threads:[~2026-03-31 6:47 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 [this message]
2026-03-31 8:20 ` Ard Biesheuvel
2026-03-31 22:41 ` Eric Biggers
2026-04-01 16:48 ` Ard Biesheuvel
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=actuDkpYbzLj0sI8@infradead.org \
--to=hch@infradead.org \
--cc=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