From f9afa21ef1f4d64f959fa1d5b18677ff24ac3a27 Mon Sep 17 00:00:00 2001 From: Shengqi Chen Date: Wed, 22 Nov 2023 22:27:24 +0800 Subject: [PATCH] module/icp/asm-arm/sha2: fix compiling on armv5/6 The `adr` insn in neon kernel generates an compiling error on armv5/6 target. Fix that by using `ldr`. Signed-off-by: Shengqi Chen --- module/icp/asm-arm/sha2/sha256-armv7.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/icp/asm-arm/sha2/sha256-armv7.S b/module/icp/asm-arm/sha2/sha256-armv7.S index 0d36315873d8..190dbabc5ecb 100644 --- a/module/icp/asm-arm/sha2/sha256-armv7.S +++ b/module/icp/asm-arm/sha2/sha256-armv7.S @@ -1849,7 +1849,11 @@ 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