Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp346849ybh; Mon, 20 Jul 2020 18:49:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQd/h4IRJzMqJcz958n5zmgkrt1XAOZiSNE21IqAihF6+ncUTjH0fxlMy5y7r0GQEF0o8B X-Received: by 2002:a17:906:494a:: with SMTP id f10mr24042158ejt.428.1595296189021; Mon, 20 Jul 2020 18:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595296189; cv=none; d=google.com; s=arc-20160816; b=Xt0VIgs3CcM6QOLWWhYP4UN9ErGZWP+PSlJlI8TnVZ9hq54dBuGqUogjlNeHPTRYi6 92h4CslsYdLLgxmHvW86tBsiXvPEKhwqBFzoAqZH/PKO20dnhFYKsyMLnhCOHuhONn1L IXxhiAEu2C7RFc9p2+Fi/yOWNOLkObWApj82sVF9ni04uI+ZUGrvuQiKKh/YrYxBAmf6 EhC4ydJm3wbwHN9z36sqiAlcZLdexXRMZ2mk90dwa0vCAeAYmvNNbBsnSyP8e5m3uEXQ DfkDALPg6ZOiLjnMj2pX++hjzjArax7mCEEMnqefLd0D74PsSq2yoltc8cJiXOXv081e 0TYg== 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:from:references:cc:to:subject; bh=ESXdduPTFe9rCyZpMkMiPDSRoTUgU7zsFdlAifBIaeY=; b=ybOUYp/M5Kdj5UrUPE7k6NW4QsksQLwptUkvD514DSho6jeHahM1oepDqBffWl/d7l iZjheuKqA/tV66/iW88c04szA1SgfsQm8bTUhPw70Cu9gj/fMg9unYew1AYgJ7ZuhHkx Mb8NkTy4eAmxBqDJChpITux6PKJeNJ5GtCVol3tUYwantbaq1c+GnBCSPGP4czU8dgZR YhY3UO+d/GpdWfXp1jYhERb9s1WWYxicr+mTr4Fvr/CQfll0oA+lwZObUjdEPl7xZuki +IKHFdB8jbeGmfAxY9UKyAbjoBBa16mfhW289Rf9HZJ8BivF7H8EaJATkmA1/7zqsMnO qZSw== 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 n5si11896993ejc.171.2020.07.20.18.49.23; Mon, 20 Jul 2020 18:49:49 -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 S1726135AbgGUBrV (ORCPT + 99 others); Mon, 20 Jul 2020 21:47:21 -0400 Received: from out28-196.mail.aliyun.com ([115.124.28.196]:34555 "EHLO out28-196.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbgGUBrU (ORCPT ); Mon, 20 Jul 2020 21:47:20 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.09037068|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_regular_dialog|0.0898497-0.00457316-0.905577;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03301;MF=maochenxi@eswin.com;NM=1;PH=DS;RN=6;RT=6;SR=0;TI=SMTPD_---.I54Ds6m_1595296035; Received: from 10.1.56.17(mailfrom:maochenxi@eswin.com fp:SMTPD_---.I54Ds6m_1595296035) by smtp.aliyun-inc.com(10.194.98.253); Tue, 21 Jul 2020 09:47:16 +0800 Subject: Re: [PATCH 1/1] riscv: Enable ARCH_HAS_FAST_MULTIPLIER for RV64I 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: From: Chenxi Mao Message-ID: <7ad95929-039f-9760-fc30-e89e02424361@eswin.com> Date: Tue, 21 Jul 2020 09:47:15 +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: 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: 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.