Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3982299pxb; Tue, 25 Jan 2022 00:37:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwECwsR+3xP0aGwFuGU1l58k3pUfN/FvXhHmD7ZVDMQ6qtMxXfhfk7DLYy+k3j2tIn0CrT2 X-Received: by 2002:a17:907:9716:: with SMTP id jg22mr1131535ejc.397.1643099831124; Tue, 25 Jan 2022 00:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643099831; cv=none; d=google.com; s=arc-20160816; b=mm3CErT/d3hsoYkkE5AMa7ZatLFs2XK5c5cy+vHLyolqBJkSsrJOiGEy7QTcpPL3Yz ksyWVLN1WWUhdAuz8kxsTzptx8/EynOCWEONlLruAY7yzNcq32E3fBQf6E7sGbE9KYLb 6+/p3uftas5gs/OcNi8VRYwr01938SSUbNl0ONJtKGbTOuZLrhJdncAJjYjcZCx7ABQn zunDpL7vDDvG6btSMwuT73pnZfk7hiXW95SmYBeVJAJrYCGLX6LSmoLRaPe9TZizkDb/ cbV2PhX6tMYQJpCCizDuFs3DoJW1zZJhba1KkCt64Tp4jYUQJDQ2VDjliW2AfPhScxWK rwzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :dkim-signature:dkim-signature; bh=xrVlhzn9aqAvytXYY/7c6YYYVRGhNM6WvivtbLM07nw=; b=WcWaINYpGn50j3dKnmkGh+rn9YpkODdHY8U4o3HxxNsXYeiKvnC0fzolF8geVOndCz tiXy22RLVs4yzmILmtnuhRuPYlvEjRO31FHav8zN73fxc620XuPfWUuzMVvVu78IvdmA 7ljQa2UhwfN1qgm+hxycFGiJ7TWM+uqNwoLYTQm9+R/fRJGtbhGD0g66vaK/NbCS6O+G QGNOo8YlSd8Hk0B3qWVmxzY/haUElmnZb0CoHMc/AZiH5wZFsmpaFW5SixzyO0rvZe0R aM/RICIm0QmXR4eytfOnxfbcADTOIFp86UI1nu2KXFRd92Ibk1K9ASkpMgnX+eQwQcF6 IjtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=iq7pi02P; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=aN0JG3Uj; 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 w19si9290270edx.512.2022.01.25.00.36.43; Tue, 25 Jan 2022 00:37:11 -0800 (PST) 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=@flygoat.com header.s=fm1 header.b=iq7pi02P; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=aN0JG3Uj; 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 S1315439AbiAYCxZ (ORCPT + 99 others); Mon, 24 Jan 2022 21:53:25 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:41253 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2370182AbiAYADy (ORCPT ); Mon, 24 Jan 2022 19:03:54 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 6F7365C0062; Mon, 24 Jan 2022 19:03:53 -0500 (EST) Received: from imap44 ([10.202.2.94]) by compute4.internal (MEProxy); Mon, 24 Jan 2022 19:03:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; bh=xrVlhzn9aqAvyt XYY/7c6YYYVRGhNM6WvivtbLM07nw=; b=iq7pi02PS8sL3wMUrWNyF5p7h24mDK sM3thbyjTfoF7TylAYssOVXZtD9s+jCqJ0TwGcUTBTEHbmCJtTzqeh0ZC7PGZdnC DnvYqeLd13a5LAWuX15LfuI3UAEyCfpLWDZokM1cXwVr1grQiM/pPVZ+hK9Nq1we miFX4xyrtWqIYb/xhy9xnTs5ZnZqcBdxOuA9bO3gxhjAeuSwvb+RzDyTfuv22Cny Jx4wt3qz5Df1pHMIfkK4UH6kwVMuBXc3hEJ2RThHzpUC8eCEZxWcOfB7kQ5XYmXZ hp6F19TgshFiN/QqifsCsc0g/eKlYYxRno1UCJbqcG15SlVJRJIn2OWQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=xrVlhzn9aqAvytXYY/7c6YYYVRGhNM6WvivtbLM07 nw=; b=aN0JG3UjJA56Pt3PMsJFofak4UiP4GBcbYFIt+naPgqfyYg/s4cPGtPyo YnNhdaT7JclRWvreVn2Jf+JudWggWln8T/T3X4sZu0scOCtI1bnTQDIZbJTzS072 7Jl9ntDcFEyKkWfnFP6brtx+WDW7l6MLYG6d1gLckM9r9venKRZj5iz1oBAAE8e5 JBQWDCOYI93f7AvVQxjl+YhqXMySbTs0UbAVy4ARvsmYcHMXTU3mb1XMIYI7vmp2 sWc4XfmI9pVaIgXxuLGMQKk9b40UWuFCbHU4ym6vQNBDaGfDF5Sv2036QrToO+Zl OeJYPtp/VUvb2bnuA5JJ3QfFNqUhA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdekgdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdflihgr gihunhcujggrnhhgfdcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpeefteegkeevfeethffgudehgedvueduvdeifedvvdelhfef heekteefueektdefjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 154A5FA0AA6; Mon, 24 Jan 2022 19:03:53 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4585-ga9d9773056-fm-20220113.001-ga9d97730 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20220120214001.1879469-1-nathan@kernel.org> Date: Tue, 25 Jan 2022 00:03:32 +0000 From: "Jiaxun Yang" To: "Nick Desaulniers" , "Nathan Chancellor" , "Thomas Bogendoerfer" Cc: "Huacai Chen" , "linux-mips@vger.kernel.org" , linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 1/2] MIPS: Loongson64: Clean up use of cc-ifversion Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =E5=9C=A82022=E5=B9=B41=E6=9C=8824=E6=97=A5=E4=B8=80=E6=9C=88 =E4=B8=8B=E5= =8D=888:31=EF=BC=8CNick Desaulniers=E5=86=99=E9=81=93=EF=BC=9A > On Thu, Jan 20, 2022 at 1:40 PM Nathan Chancellor = wrote: >> >> This Makefile checks that GCC is 4.9 or newer, which is redundant aft= er >> commit 76ae847497bc ("Documentation: raise minimum supported version = of >> GCC to 5.1"), so cc-option can be removed. >> >> Clang does not support -march=3Dloongson3a so it needs to continue to= use >> -march=3Dmips64r2, along with binutils less than 2.25, so check that = both >> GCC and binutils 2.25 or newer are being used before using >> -march=3Dloongson3a. These flags do not need to be checked with cc-op= tion >> anymore because all GCC versions support -march=3Dloongson3a and >> -march=3Dmips64r2 and all clang versions support -march=3Dmips64r2. >> >> Signed-off-by: Nathan Chancellor > > Thanks for the patch. I wonder why `_MIPS_ISA` only seems to be set at > all for `-march=3Dloongson3a` AFAICT, though that question is orthogon= al > to this patch. Perhaps the Loongson or MIPS maintainers know more? > Otherwise seems like most uses of _MIPS_ISA can either be deleted or > simplified now. This is because earlier GCC mistakenly set loongson3a to MIPS64 not MIPS= 64R2. But given that it's earlier than the minimal requirement GCC of kernel t= oday, I think it should be safe to just move the whole logic. Thanks. > > Reviewed-by: Nick Desaulniers > >> --- >> arch/mips/loongson64/Platform | 13 +++---------- >> 1 file changed, 3 insertions(+), 10 deletions(-) >> >> diff --git a/arch/mips/loongson64/Platform b/arch/mips/loongson64/Pla= tform >> index 3e660d6d3c2b..981d3abc150e 100644 >> --- a/arch/mips/loongson64/Platform >> +++ b/arch/mips/loongson64/Platform >> @@ -12,17 +12,10 @@ cflags-$(CONFIG_CPU_LOONGSON64) +=3D -Wa,--tr= ap >> # by GAS. The cc-option can't probe for this behaviour so -march=3D= loongson3a >> # can't easily be used safely within the kbuild framework. >> # >> -ifeq ($(call cc-ifversion, -ge, 0409, y), y) >> - ifeq ($(call ld-ifversion, -ge, 22500, y), y) >> - cflags-$(CONFIG_CPU_LOONGSON64) +=3D \ >> - $(call cc-option,-march=3Dloongson3a -U_MIPS_ISA -D_MIPS_ISA=3D= _MIPS_ISA_MIPS64) >> - else >> - cflags-$(CONFIG_CPU_LOONGSON64) +=3D \ >> - $(call cc-option,-march=3Dmips64r2,-mips64r2 -U_MIPS_ISA -D_MI= PS_ISA=3D_MIPS_ISA_MIPS64) >> - endif >> +ifeq ($(CONFIG_CC_IS_GCC)$(call ld-ifversion, -ge, 22500, y), yy) >> + cflags-$(CONFIG_CPU_LOONGSON64) +=3D -march=3Dloongson3a -U_MIPS_I= SA -D_MIPS_ISA=3D_MIPS_ISA_MIPS64 >> else >> - cflags-$(CONFIG_CPU_LOONGSON64) +=3D \ >> - $(call cc-option,-march=3Dmips64r2,-mips64r2 -U_MIPS_ISA -D_MI= PS_ISA=3D_MIPS_ISA_MIPS64) >> + cflags-$(CONFIG_CPU_LOONGSON64) +=3D -march=3Dmips64r2 >> endif >> >> # Some -march=3D flags enable MMI instructions, and GCC complains ab= out that >> >> base-commit: 2c271fe77d52a0555161926c232cd5bc07178b39 >> -- >> 2.34.1 >> > > > --=20 > Thanks, > ~Nick Desaulniers --=20 - Jiaxun