Thread (41 messages) 41 messages, 6 authors, 2024-11-05

Re: [PATCH v2 06/18] loongarch/crc32: expose CRC32 functions through lib

From: Eric Biggers <ebiggers@kernel.org>
Date: 2024-11-03 13:57:32
Also in: linux-arch, linux-arm-kernel, linux-crypto, linux-ext4, linux-f2fs-devel, linux-mips, linux-riscv, linux-s390, linux-scsi, lkml, loongarch, sparclinux

On Sun, Nov 03, 2024 at 09:36:55PM +0800, WangYuli wrote:
Even though the narrower CRC instructions doesn't require GRLEN=64, they still *aren't* part of LA32 (LoongArch reference manual v1.10, Volume 1, Table 2-1).
Link: https://lore.kernel.org/all/0a7d0a9e-c56e-4ee2-a83b-00164a450abe@xen0n.name/ (local)

Therefore, we could not directly add ARCH_HAS_CRC32 to config LOONGARCH.
There's still a runtime CPU feature check of cpu_has(CPU_FEATURE_CRC32).
See arch/loongarch/lib/crc32-loongarch.c.  So it's the same as before.
ARCH_HAS_CRC32 just means that the file will be compiled.

If you're trying to say that you think this file should be built only when
CONFIG_64BIT=y, then that would be an existing bug since the existing file
arch/loongarch/crypto/crc32-loongarch.c was built for both 32-bit and 64-bit.
But if you think this is a bug, I can fix this too.

- Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help