Commit 289c270e authored by Eric Biggers's avatar Eric Biggers
Browse files

mips/crc32: expose CRC32 functions through lib



Move the mips CRC32 assembly code into the lib directory and wire it up
to the library interface.  This allows it to be used without going
through the crypto API.  It remains usable via the crypto API too via
the shash algorithms that use the library interface.  Thus all the
arch-specific "shash" code becomes unnecessary and is removed.

Note: to see the diff from arch/mips/crypto/crc32-mips.c to
arch/mips/lib/crc32-mips.c, view this commit with 'git show -M10'.

Reviewed-by: default avatarArd Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20241202010844.144356-8-ebiggers@kernel.org


Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
parent 72f51a4f
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1995,11 +1995,11 @@ config CPU_MIPSR5
config CPU_MIPSR6
	bool
	default y if CPU_MIPS32_R6 || CPU_MIPS64_R6
	select ARCH_HAS_CRC32
	select CPU_HAS_RIXI
	select CPU_HAS_DIEI if !CPU_DIEI_BROKEN
	select HAVE_ARCH_BITREVERSE
	select MIPS_ASID_BITS_VARIABLE
	select MIPS_CRC_SUPPORT
	select MIPS_SPRAM

config TARGET_ISA_REV
@@ -2475,9 +2475,6 @@ config MIPS_ASID_BITS
config MIPS_ASID_BITS_VARIABLE
	bool

config MIPS_CRC_SUPPORT
	bool

# R4600 erratum.  Due to the lack of errata information the exact
# technical details aren't known.  I've experimentally found that disabling
# interrupts during indexed I-cache flushes seems to be sufficient to deal
+0 −1
Original line number Diff line number Diff line
@@ -99,7 +99,6 @@ CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_ROOT_NFS=y
CONFIG_CRYPTO_CRC32_MIPS=y
CONFIG_FRAME_WARN=1024
CONFIG_DEBUG_FS=y
# CONFIG_RCU_TRACE is not set
+0 −1
Original line number Diff line number Diff line
@@ -102,7 +102,6 @@ CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_ROOT_NFS=y
CONFIG_CRYPTO_CRC32_MIPS=y
CONFIG_FRAME_WARN=1024
CONFIG_DEBUG_FS=y
# CONFIG_RCU_TRACE is not set
+0 −2
Original line number Diff line number Diff line
CONFIG_CPU_MIPS32_R6=y
CONFIG_HIGHMEM=y

CONFIG_CRYPTO_CRC32_MIPS=y
+0 −1
Original line number Diff line number Diff line
@@ -4,5 +4,4 @@ CONFIG_MIPS32_O32=y
CONFIG_MIPS32_N32=y

CONFIG_CPU_HAS_MSA=y
CONFIG_CRYPTO_CRC32_MIPS=y
CONFIG_VIRTUALIZATION=y
Loading