module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6

My merged pull request #15557 fixes compilation of sha2 kernels on arm
v5/6. However, the compiler guards only allows sha256/512_armv7_impl to
be used when __ARM_ARCH > 6. This patch enables these ASM kernels on all
arm architectures. Some compiler guards are adjusted accordingly to
avoid the unnecessary compilation of SIMD (e.g., neon, armv8ce) kernels
on old architectures.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes #15623
This commit is contained in:
Shengqi Chen
2023-12-06 04:01:09 +08:00
committed by GitHub
parent 5f2700eee5
commit 727497ccdf
4 changed files with 27 additions and 26 deletions
+3 -5
View File
@@ -1837,6 +1837,7 @@ zfs_sha256_block_armv7:
#endif
.size zfs_sha256_block_armv7,.-zfs_sha256_block_armv7
#if __ARM_ARCH__ >= 7
.arch armv7-a
.fpu neon
@@ -1849,11 +1850,7 @@ zfs_sha256_block_neon:
stmdb sp!,{r4-r12,lr}
sub r11,sp,#16*4+16
#if __ARM_ARCH__ >=7
adr r14,K256
#else
ldr r14,=K256
#endif
bic r11,r11,#15 @ align for 128-bit stores
mov r12,sp
mov sp,r11 @ alloca
@@ -2773,4 +2770,5 @@ zfs_sha256_block_armv8:
bx lr @ bx lr
.size zfs_sha256_block_armv8,.-zfs_sha256_block_armv8
#endif
#endif // #if __ARM_ARCH__ >= 7
#endif // #if defined(__arm__)
+3 -1
View File
@@ -493,6 +493,7 @@ zfs_sha512_block_armv7:
#endif
.size zfs_sha512_block_armv7,.-zfs_sha512_block_armv7
#if __ARM_ARCH__ >= 7
.arch armv7-a
.fpu neon
@@ -1822,4 +1823,5 @@ zfs_sha512_block_neon:
VFP_ABI_POP
bx lr @ .word 0xe12fff1e
.size zfs_sha512_block_neon,.-zfs_sha512_block_neon
#endif
#endif // #if __ARM_ARCH__ >= 7
#endif // #if defined(__arm__)