Skip to contentSkip to conversation

lib/crc: arm64: Drop check for CONFIG_KERNEL_MODE_NEON

PATCH Applied Eric Biggers 2 participants 3 messages Mar 14 – Mar 17

Subsystems (2)
lore
Share & tools
lore

Eric Biggers

author maintainer
#0 lore raw

PATCH 1/1 lib/crc: arm64: Drop check for CONFIG_KERNEL_MODE_NEON

CONFIG_KERNEL_MODE_NEON is always enabled on arm64, and it always has been since its introduction in 2013. Given that and the fact that the usefulness of kernel-mode NEON has only been increasing over time, checking for this option in arm64-specific code is unnecessary. Remove this check from lib/crc/ to simplify the code and prevent any future bugs where e.g. code gets disabled due to a typo in this logic.

---

This patch is targeting crc-next
(https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=crc-next)

 lib/crc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/crc/Kconfig +1 -1
index cca228879bb5a..52e216f397468 100644
@@ -46,11 +46,11 @@ config CRC_T10DIF
 
 config CRC_T10DIF_ARCH
 	bool
 	depends on CRC_T10DIF && CRC_OPTIMIZATIONS
 	default y if ARM && KERNEL_MODE_NEON
-	default y if ARM64 && KERNEL_MODE_NEON
+	default y if ARM64
 	default y if PPC64 && ALTIVEC
 	default y if RISCV && RISCV_ISA_ZBC
 	default y if X86
 
 config CRC32

base-commit: c13cee2fc7f137dd25ed50c63eddcc578624f204

Signature · 1 line
2.53.0
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Eric Biggers

CONFIG_KERNEL_MODE_NEON is always enabled on arm64, and it always has been since its introduction in 2013. Given that and the fact that the usefulness of kernel-mode NEON has only been increasing over time, checking for this option in arm64-specific code is unnecessary. Remove this check from lib/crc/ to simplify the code and prevent any future bugs where e.g. code gets disabled due to a typo in this logic.

Quoted 9 lines

---

This patch is targeting crc-next
(https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=crc-next)

 lib/crc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 21 lines
lib/crc/Kconfig +1 -1
index cca228879bb5a..52e216f397468 100644
@@ -46,11 +46,11 @@ config CRC_T10DIF
 
 config CRC_T10DIF_ARCH
 	bool
 	depends on CRC_T10DIF && CRC_OPTIMIZATIONS
 	default y if ARM && KERNEL_MODE_NEON
-	default y if ARM64 && KERNEL_MODE_NEON
+	default y if ARM64
 	default y if PPC64 && ALTIVEC
 	default y if RISCV && RISCV_ISA_ZBC
 	default y if X86
 
 config CRC32

base-commit: c13cee2fc7f137dd25ed50c63eddcc578624f204

Signature · 1 line
2.53.0
author maintainer Applied
#2 lore raw
In reply to Eric Biggers
Quoted 7 lines · Eric Biggers

CONFIG_KERNEL_MODE_NEON is always enabled on arm64, and it always has been since its introduction in 2013. Given that and the fact that the usefulness of kernel-mode NEON has only been increasing over time, checking for this option in arm64-specific code is unnecessary. Remove this check from lib/crc/ to simplify the code and prevent any future bugs where e.g. code gets disabled due to a typo in this logic.

Quoted 5 lines

---

This patch is targeting crc-next
(https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=crc-next)

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=crc-next

- Eric