mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 02:01:18 -04:00
lib/crc: arm64: Drop unnecessary chunking logic from crc64
On arm64, kernel mode NEON executes with preemption enabled, so there is no need to chunk the input by hand. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20260330144630.33026-8-ardb@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
This commit is contained in:
committed by
Eric Biggers
parent
5276ea17a2
commit
e0718ed60d
@@ -16,15 +16,13 @@ static inline u64 crc64_nvme_arch(u64 crc, const u8 *p, size_t len)
|
||||
{
|
||||
if (len >= 128 && cpu_have_named_feature(PMULL) &&
|
||||
likely(may_use_simd())) {
|
||||
do {
|
||||
size_t chunk = min_t(size_t, len & ~15, SZ_4K);
|
||||
size_t chunk = len & ~15;
|
||||
|
||||
scoped_ksimd()
|
||||
crc = crc64_nvme_arm64_c(crc, p, chunk);
|
||||
scoped_ksimd()
|
||||
crc = crc64_nvme_arm64_c(crc, p, chunk);
|
||||
|
||||
p += chunk;
|
||||
len -= chunk;
|
||||
} while (len >= 128);
|
||||
p += chunk;
|
||||
len &= 15;
|
||||
}
|
||||
return crc64_nvme_generic(crc, p, len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user