All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huacai Chen <chenhuacai@kernel.org>
To: Xi Ruoyao <xry111@xry111.site>
Cc: WANG Xuerui <kernel@xen0n.name>,
	loongarch@lists.linux.dev,  linux-kernel@vger.kernel.org,
	Tiezhu Yang <yangtiezhu@loongson.cn>
Subject: Re: [PATCH] LoongArch: Select ARCH_HAS_FAST_MULTIPLIER
Date: Fri, 29 Mar 2024 10:09:46 +0800	[thread overview]
Message-ID: <CAAhV-H77h3gE_tDKiFYhDC4NbB9ain=sGCemeJ54y8aqvvmrMw@mail.gmail.com> (raw)
In-Reply-To: <20240327171807.27741-1-xry111@xry111.site>

Queued for loongarch-next, thanks.

Huacai

On Thu, Mar 28, 2024 at 1:18 AM Xi Ruoyao <xry111@xry111.site> wrote:
>
> 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@xry111.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
>

      reply	other threads:[~2024-03-29  2:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 17:18 [PATCH] LoongArch: Select ARCH_HAS_FAST_MULTIPLIER Xi Ruoyao
2024-03-29  2:09 ` Huacai Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAhV-H77h3gE_tDKiFYhDC4NbB9ain=sGCemeJ54y8aqvvmrMw@mail.gmail.com' \
    --to=chenhuacai@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=xry111@xry111.site \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.