Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1514679ybh; Sun, 19 Jul 2020 23:24:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYUrSHk9hRh+u8ajd4HVWregPXO8hgPmMfED4fs9KZVBu7l7n0hCTHDf6t2TG5rrmpM0Oh X-Received: by 2002:a50:f418:: with SMTP id r24mr19654243edm.382.1595226286953; Sun, 19 Jul 2020 23:24:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595226286; cv=none; d=google.com; s=arc-20160816; b=h9EkFD1QC2QU5QwteUpCb8tgyBkzOfmR+rBnYNI100MnF8mrHThCZWsnS4qop38rnA HXeuHVYyTfZ3v3Hb6IljHRnUjrsjBrmpkolASkiv8MFgzHLElthUZqRAkTCiqUxAzuO7 ovgCdW8DK2D5NKNFrPeI1iWNpvR9umKpTszqIoZmOpVy5UDC2EAvazOmhz9sJfe5pZKJ UbnmDuar00XOR2+ylcxkFs2+E5phNJvdfL4vyZzS7vrAFU52YxttLbPCvbY27lcnj1e3 CJ+Ui4WZOuopx0Pqgz2pxInA4ss4IRxeByud9eV2m9CMAMCF/dDmtniQXu1Llmjt8S+y eXhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uwMzK71OA8OgIIXaxhyU9BRQ6Aib0u76w2J3QDkPk24=; b=bnnfmhvUq6U2HnKBnQyeEZ/wz/tvW6GiJroU7SAgOLzILQxTShbSm0JY6GkD7NtTTM QMG9Ehv7hmbxMmshLpAVGrSer1hctxdqtZRGdnyCdPRuJJgHfq3Gh5wbB9I23JdrgDJe nidJ30K2am5SX2PKlYnIkP51l5cU8Eerhwm+lKOmy+dAwsiInqUbUV3iND0/mi73AKOf jij7jZpFw5lP7LErrYNXliXYBWWAW3/xBeqy2m5iP5/zEPzvxznwlcES+6on7RR2gNih cC2cu70nqHOW89fjFNFDogqu89jUL+8K3SvhZhDoZs/dZNXK63bkA9jwpM8yCMontVyE l6Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E6CsRWmF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf15si9948417edb.350.2020.07.19.23.24.24; Sun, 19 Jul 2020 23:24:46 -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; dkim=pass header.i=@kernel.org header.s=default header.b=E6CsRWmF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbgGTGXl (ORCPT + 99 others); Mon, 20 Jul 2020 02:23:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:58180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbgGTGXl (ORCPT ); Mon, 20 Jul 2020 02:23:41 -0400 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C2C3A22B4E for ; Mon, 20 Jul 2020 06:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595226220; bh=FWQE8h03YB9otNyLDGP6oLxadjk+HVDXF0TxF12WqIA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=E6CsRWmFx27wtggInTT+Eq+PnmXSOe5CsXBg3NBRz61gGiaIMdiV76/qiUkgmi+h1 c0sRMJ9XLnRa7w3G/x6xd/GtE1Bcw/PRr4L+DuHDfsM3mdIRc4/8GqQJ1WhgtV/txG 6oVh8G/RIIXd1O52ajeHlosg3+uAtckpswC7Cocg= Received: by mail-oi1-f174.google.com with SMTP id r8so13585016oij.5 for ; Sun, 19 Jul 2020 23:23:40 -0700 (PDT) X-Gm-Message-State: AOAM532q2CfJruKIJf9kR44cbbuwf5ID62AVMCXNLVOlM4aKBCpwbPun /oOHqpJrqx8GT1tYawp0uMgF1CdZtMovT2XE5sY= X-Received: by 2002:aca:f257:: with SMTP id q84mr17293654oih.174.1595226220136; Sun, 19 Jul 2020 23:23:40 -0700 (PDT) MIME-Version: 1.0 References: <20200708054354.25283-1-maochenxi@eswin.com> In-Reply-To: From: Ard Biesheuvel Date: Mon, 20 Jul 2020 09:23:28 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] riscv: Enable compiler optimizations To: Palmer Dabbelt Cc: maochenxi@eswin.com, Paul Walmsley , Albert Ou , linux-riscv , Linux Kernel Mailing List , chenxi.mao2013@gmail.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 19 Jul 2020 at 07:45, Palmer Dabbelt wrote: > > On Tue, 07 Jul 2020 22:43:54 PDT (-0700), maochenxi@eswin.com wrote: > > Enable ARCH_HAS_FAST_MULTIPLIER and ARCH_SUPPORTS_INT128 for better > > code generation. > > These 2 configurations works fine on GCC-9.3 and GCC-10.1 > > > > Signed-off-by: Chenxi Mao > > --- > > arch/riscv/Kconfig | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > index 128192e14ff2..f21b7e5188ca 100644 > > --- a/arch/riscv/Kconfig > > +++ b/arch/riscv/Kconfig > > @@ -26,6 +26,8 @@ config RISCV > > select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU > > select ARCH_WANT_FRAME_POINTERS > > select ARCH_WANT_HUGE_PMD_SHARE if 64BIT > > + select ARCH_HAS_FAST_MULTIPLIER > > + select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000 || CC_IS_CLANG > > IIRC int128 is only supported on 64-bit targets, and we already have this under > RV64I but with a different set of requirements. It looks like everyone has a > different set of requirements, but I feel like CC_HAS_INT128 is the right way > to go. I'm not sure why we have the version check there. Ard: do you know why > we would need both? > That looks like copy/paste from the arm64 tree to me, where the names of the libgcc routines were changed at some point, and we only support the newer ones in the kernel. > The fast multiplier one looks fine to me. They're supposed to stay > alphabetical, though. > > > select CLONE_BACKWARDS > > select COMMON_CLK > > select EDAC_SUPPORT