lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 28 Mar 2024 01:18:07 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Huacai Chen <chenhuacai@...nel.org>,
	WANG Xuerui <kernel@...0n.name>
Cc: loongarch@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Tiezhu Yang <yangtiezhu@...ngson.cn>,
	Xi Ruoyao <xry111@...111.site>
Subject: [PATCH] LoongArch: Select ARCH_HAS_FAST_MULTIPLIER

LA464 and LA664 can do 32-bit/64-bit integer multiplication with a
latency of 4 cycles and a throughput of 2 ops per cycle.  It's
comparable to mainstream x86 and arm64 cores, so select
ARCH_HAS_FAST_MULTIPLIER like them.

It speeds up __sw_hweight32 in lib/hweight.c for about 14% on LA464 and
11% on LA664, and __sw_hweight64 for about 30% on LA464 and 33% on
LA664.

Signed-off-by: Xi Ruoyao <xry111@...111.site>
---
 arch/loongarch/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index 5a769bb92d7c..d52a95195e7f 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -16,6 +16,7 @@ config LOONGARCH
 	select ARCH_HAS_ACPI_TABLE_UPGRADE	if ACPI
 	select ARCH_HAS_CPU_FINALIZE_INIT
 	select ARCH_HAS_CURRENT_STACK_POINTER
+	select ARCH_HAS_FAST_MULTIPLIER
 	select ARCH_HAS_FORTIFY_SOURCE
 	select ARCH_HAS_KCOV
 	select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ