build/patch/kernel/archive/sunxi-5.15/patches.megous/arm64-xor-Select-32regs-without-benchmark-to-speed-up-boot.patch

47 lines
1.3 KiB
Diff
Raw Normal View History

From 2ce6587c86abb4cf0cdc71d225ddbd570c9cf628 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Thu, 10 Sep 2020 21:38:28 +0200
Subject: [PATCH 259/478] arm64: xor: Select 32regs without benchmark to speed
up boot
32regs is fastest on Cortex-A53.
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
arch/arm64/include/asm/xor.h | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/include/asm/xor.h b/arch/arm64/include/asm/xor.h
index 947f6a4f1aa0..461b55f0f5b2 100644
--- a/arch/arm64/include/asm/xor.h
+++ b/arch/arm64/include/asm/xor.h
@@ -50,21 +50,15 @@ xor_neon_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
kernel_neon_end();
}
-static struct xor_block_template xor_block_arm64 = {
+static struct xor_block_template xor_block_arm64 __maybe_unused = {
.name = "arm64_neon",
.do_2 = xor_neon_2,
.do_3 = xor_neon_3,
.do_4 = xor_neon_4,
.do_5 = xor_neon_5
};
-#undef XOR_TRY_TEMPLATES
-#define XOR_TRY_TEMPLATES \
- do { \
- xor_speed(&xor_block_8regs); \
- xor_speed(&xor_block_32regs); \
- if (cpu_has_neon()) { \
- xor_speed(&xor_block_arm64);\
- } \
- } while (0)
+
+#define XOR_SELECT_TEMPLATE(x) \
+ (&xor_block_32regs)
#endif /* ! CONFIG_KERNEL_MODE_NEON */
--
2.35.3