Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp825966lqh; Thu, 28 Mar 2024 19:13:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWoE/p72z6gaOLe+XRpAEkRnYWrfyTAx/hAH3+mulcjWBfo1AqhKX7L1p9v6m5cr9CyWP6JnhRz/9uLnQW/SjYXGBHh1J5/jeQNbzkhxg== X-Google-Smtp-Source: AGHT+IE28u53vILfqSqYArku8nIM/Ly0PZCtxnVfH8tUA+PxOpL38b/7GIsG63XL6mlq+HIY+ry0 X-Received: by 2002:a17:906:6092:b0:a4e:15f9:f167 with SMTP id t18-20020a170906609200b00a4e15f9f167mr518118ejj.11.1711678409870; Thu, 28 Mar 2024 19:13:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711678409; cv=pass; d=google.com; s=arc-20160816; b=gLotsba+tKyJQpOSKWDSRmutsV+aANulURYfi28W+U5l8R8PTFbN3h3yN8ycQPr7hL 3onCmBBh/+Tb8ChVqBvpdDrJPe2STe0b0ZyN0M+CeXBE2aNSsEUckbgPn3T0Bsn9reK1 Pld4XIEmgR+572f0EV4ejmZTot4tGV7RgPzBBfD9ctyU2uttO5mPfvfWqWJy7GdpbsiX p4iB+LnWn6/xSv9dcQIjm3fZM4zZlFSjMXSgWM2+3bnx4JCkRVXKGT3EAav/W3CRQSpV 8eE2WLrqDzHOpH9kW1en9Jwt3chYRboCo1A/rBXnwJWDugqAeJAQv7eDSQWrLtzsEYJ4 K6DA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=We2u5g0i+W/waXFA7r2X2IKuLxrG3u1CZP4na+L6ggc=; fh=Chg3i5GPQEvL2Es6SrV2F4MiKLnuAu6EWQDx+3NqnoI=; b=Hi6iva91/HMoOojNy2ODJVdtrUf4tLBwAuhbyYuZeCHQWmeF0FnNitmHFPi3FqdPZb M1CBKEqMTjEykgR7oGllGuVe2V8aipOWA9e9G/jq6Q0fVhwJERhvnA+8qBYecfxouUCl MWm5qHBtksMvcfDN6CMNSS+pVOyHvrVBUK5YfXVAy78nLiqwrkUzrooP6po4+wV5KORo vkpI0f5SqO0aHBEl6FtZGu5RT0Je66oOs/MnFkFjPP/4j1jBd9QaVj7kRZYcyzcKRruJ MtqgNvH7ZpNKf69oklj2kZKsIO1nZQ71vrTAS9Y8epEcRxZ/Mbt5OJsA1ucVoi0qpoJh ByiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=INIavxLJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bq3-20020a170906d0c300b00a4733fc6f33si1267837ejb.1030.2024.03.28.19.13.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 19:13:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=INIavxLJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 878801F24A81 for ; Fri, 29 Mar 2024 02:13:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF4C63E49B; Fri, 29 Mar 2024 02:09:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="INIavxLJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEF3B3BBE8 for ; Fri, 29 Mar 2024 02:09:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711678199; cv=none; b=L2XRKicWq09y33hc7fCcYj+arZwRJh4BydrTYrt1aZD6P/cvZo1DTLFdhJQVEAYA2L0gUbPYeJ+t5659Szftevw6kHxXMol54zsDNPcfI38Oq9TEYrDW8hyyHRJYXpH6oQbzf2QpaZBIRMHtwAB7nVfEComx1NLfAM3o7puTtEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711678199; c=relaxed/simple; bh=O9z1sL+vMCRFfB3bDOcyTXkEgXLhwYxZh+K+xvS9TS4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=qVnsM2nn2b+cs2RqnyjjC3b7/JkHpQ6Wj7QUC4TVYbwdSQfFWDUh6ovDLQL+Z1/s35B/vhe3wdRM9DXOCcXa5R+MD2ytZCEV/sqpX9Ib6kAcW8aP53TAwKCzfbHammodMhTRr1TBzZvHQZVVPbrZKdVi8rsmEzrqKfr6HCB1uxg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=INIavxLJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C346C433F1 for ; Fri, 29 Mar 2024 02:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711678198; bh=O9z1sL+vMCRFfB3bDOcyTXkEgXLhwYxZh+K+xvS9TS4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=INIavxLJvHbcdDLbeoKPveLdoWzghwsDneAUpUr9dyM1TKpI7HuK7KM2i6p07734g NFm1FnGq2DHgjRMnetNg6vhN6SP2FNQI9SyJTpxkSDDxgbcgDSW1iMxTaQDtbq/OJU 43SoAUDvCDWouiS/lpqXBvpBQwyMT4stQjyQrUSn7iUC5m+sSlKdZpT1f+dh+ctwwA s1mxmsSRx9TrR8jtwyvZCMbNr924Hjv10kBvOWP+UrC5RyYOb/c/Cm11AMSFMT5bgC JHkWUtwfpsESRGMnvEV9yCXnr7Ww3TeUgjzQ7h6L8UokfqLaC6ynyt5rAzF6h8XUO1 JHvzwtrdONtDw== Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-56bc5a3aeb9so1983073a12.3 for ; Thu, 28 Mar 2024 19:09:58 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVmqzPcUL9T3gzwAX8GGkptzNXry1hqFUeP9v2bt1psjYe74225e0vGKAninrlS7w0v3TQjgvimsXET9v1vm0ugyueQKgCQCfNkeTDq X-Gm-Message-State: AOJu0Yy7fN4AxMHmRBePgsvsJvbxusA6sslZJMXwSieDfq8gAgaucHVE +Mji9IXMrw1eGr2G7fzZpyXeYr1a1E/ALNqShXap4aHQdaXxh0IbsjpEgFKZ+pHWGDyhLvsQu0f Yub/Sa7I97782CvfpMtzdahAJITw= X-Received: by 2002:a17:907:d87:b0:a47:52b7:3822 with SMTP id go7-20020a1709070d8700b00a4752b73822mr718148ejc.47.1711678197111; Thu, 28 Mar 2024 19:09:57 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240327171807.27741-1-xry111@xry111.site> In-Reply-To: <20240327171807.27741-1-xry111@xry111.site> From: Huacai Chen Date: Fri, 29 Mar 2024 10:09:46 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] LoongArch: Select ARCH_HAS_FAST_MULTIPLIER To: Xi Ruoyao Cc: WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Tiezhu Yang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Queued for loongarch-next, thanks. Huacai On Thu, Mar 28, 2024 at 1:18=E2=80=AFAM Xi Ruoyao wrot= e: > > 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 > --- > 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 >