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

47 lines
1.3 KiB
Diff
Raw Normal View History

From 3aff11c50f2bb898f021799b37855047ceb07917 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Thu, 10 Sep 2020 21:38:28 +0200
Subject: [PATCH 156/464] arm64: xor: Select 32regs without benchmark to speed
up boot
32regs is fastest on Cortex-A53.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
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 befcd8a7abc9..e4487ddc76e1 100644
--- a/arch/arm64/include/asm/xor.h
+++ b/arch/arm64/include/asm/xor.h
@@ -57,21 +57,15 @@ xor_neon_5(unsigned long bytes, unsigned long * __restrict p1,
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.34.1