Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp372525ybh; Mon, 20 Jul 2020 19:41:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy02y6rwWcM0Kpc6ujq9kUscToR7FbjwK/DDZJLXfrrXx5E/wfcuZRkiSpNi4GKecbzc+zE X-Received: by 2002:aa7:c2cf:: with SMTP id m15mr23137551edp.27.1595299315200; Mon, 20 Jul 2020 19:41:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595299315; cv=none; d=google.com; s=arc-20160816; b=Qck2+Vy/cxUJZ2e/F68WcpDl2G+6BNkW1ozBm/QqQiv9KeXJbEXx71S6VBDocjbjSA BkoQ58kyQv5CazdCA9CMK420YMze+RY8DKnF88JIrkJUcmC/IzTy44suyltjbfA157HJ m57j2FOtvEM3ZjoZvOZUKz1CDmbs8xCOAuXX8b0fowZ8GBs0w3pq0TIRMz3pDVEOppFJ lO+EGJlnZogeYLM+27MWlzWBf0HknUKSN0ff+lzevZpjC5dOsUmvmBCF9Vv3rEMRq6Pa 8qVkqqy2gO2s8EE8HobTwF3fUQShU8Y2RJZUGeNz56EWoPUiOti1lMoXjoeMDYfOraMt HhcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=IA16aVC5nQIaJwVmP1F60jptC8OiFZTWNNpxl4g44fc=; b=aS+0Wk2ZQN+M/aVt5kzuzcRZTvZb2DFrTAYWoh7ao8zyXDfxb9wrU+uNysj1CKrsor oVymqr9HuuhY0LNpEdFfAdUWJIgpnTiF/EW+crj7YfCwkWxmTb3+xJ/sQ5ORm71YDB7z rDX9HqnyNB/s35TrvA6W3ze843q7i58DpCZpY9AMbE9uUs4/GMDdcvSInir8ziME+YqI QWBDN5kT9vMhY+NvL+4XU5aR7oyqIRI/f8OtK+4D8+Kw5bN1WoILi2rihvxkJ6qotb61 NCbLP1ZfVE8VrIqdD5X2FUKxy6tkkoJixv/Ap2mrGuXzNn27yQ7UOLMxAc4L8A/7q76R VJCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o10si11610665ejn.140.2020.07.20.19.41.33; Mon, 20 Jul 2020 19:41:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728447AbgGUCib (ORCPT + 99 others); Mon, 20 Jul 2020 22:38:31 -0400 Received: from out28-76.mail.aliyun.com ([115.124.28.76]:47041 "EHLO out28-76.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbgGUCia (ORCPT ); Mon, 20 Jul 2020 22:38:30 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07916176|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_regular_dialog|0.0445112-0.0024327-0.953056;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03298;MF=maochenxi@eswin.com;NM=1;PH=DS;RN=6;RT=6;SR=0;TI=SMTPD_---.I56PH.u_1595299106; Received: from 10.1.56.17(mailfrom:maochenxi@eswin.com fp:SMTPD_---.I56PH.u_1595299106) by smtp.aliyun-inc.com(10.194.98.253); Tue, 21 Jul 2020 10:38:26 +0800 Subject: Re: [PATCH 1/1] riscv: Enable ARCH_HAS_FAST_MULTIPLIER for RV64I From: Chenxi Mao To: Palmer Dabbelt Cc: Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, chenxi.mao2013@gmail.com References: <7ad95929-039f-9760-fc30-e89e02424361@eswin.com> Message-ID: Date: Tue, 21 Jul 2020 10:38:25 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <7ad95929-039f-9760-fc30-e89e02424361@eswin.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Palmer: Move to RISCV platform is ok for me, but I cannot evaluate RV32 condition. Chenxi On 2020/7/21 上午9:47, Chenxi Mao wrote: > Hi Palmer: > > Thanks for your reply. > > Frankly, I didn't test ARCH_HAS_FAST_MULTIPLIER on RV32, > > so I cannot put it in RISCV platform. > > I am trying to comparing ARM64 with Riscv to find out more optimization > > configurations. > > I suggest to enable ARCH_HAS_FAST_MULTIPLIER on RV64 first. > > If someone else evaluate this on RV32, we could move it to RISCV platform. > > > Chenxi > > > On 2020/7/21 上午9:17, Palmer Dabbelt wrote: >> On Wed, 08 Jul 2020 22:19:22 PDT (-0700), maochenxi@eswin.com wrote: >>> Enable ARCH_HAS_FAST_MULTIPLIER on RV64I >>> which works fine on GCC-9.3 and GCC-10.1 >>> >>> PS2: remove ARCH_SUPPORTS_INT128 because of RV64I already enabled. >>> >>> Signed-off-by: Chenxi Mao >>> --- >>>  arch/riscv/Kconfig | 1 + >>>  1 file changed, 1 insertion(+) >>> >>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >>> index 128192e14ff2..84e6777fecad 100644 >>> --- a/arch/riscv/Kconfig >>> +++ b/arch/riscv/Kconfig >>> @@ -202,6 +202,7 @@ config ARCH_RV64I >>>      bool "RV64I" >>>      select 64BIT >>>      select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000 >>> +    select ARCH_HAS_FAST_MULTIPLIER >>>      select HAVE_DYNAMIC_FTRACE if MMU >>>      select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE >>>      select HAVE_FTRACE_MCOUNT_RECORD >> Ah, thanks -- this one didn't show up when I was looking at the last one.  I >> think we can put the fast multiplier on rv32 and rv64, there shouldn't be any >> difference there.  I guess in theory we should be sticking this all in some >> sort of "platform type" optimization flags, but that's probably bit much for >> now.