From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BB43C001DE for ; Wed, 2 Aug 2023 06:55:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230386AbjHBGzt (ORCPT ); Wed, 2 Aug 2023 02:55:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231397AbjHBGzf (ORCPT ); Wed, 2 Aug 2023 02:55:35 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C560C10C1 for ; Tue, 1 Aug 2023 23:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1690959322; x=1722495322; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=hb6CE2J/7siYpXeRApw5gdYJame1jDnCoPajhlfdJug=; b=0ihMGNQ1DUCYrSFP0aC5GImbI2Mnes7RwGvth/UIK394IXdhkn/PP9n2 Yacgm47BZBVrhOj4qTQXg+iOVciPNISbaWyINBDNxEr7xRflVG1LmayTV 9/Kyfj+fou0AsoJoqYIRGWe7pBid+sPA3UjXoBOhwxSW9j3Bz7Pw2Hekn 663b6J0Krg3eIS0yoZyhO5aG0oXsU/rkpJQW4R0ark36MyUEmyFK7gN4q bD1M1tyIHmAyPewJ83eDPntml0MERySOm/PMX+fzv0/C0j6sT3pyWRwIh HE1A+5npUe2OeEO/8GAWWJkgEPvUn62A+uAWrBvz1eQte0GARrUgVizX9 Q==; X-IronPort-AV: E=Sophos;i="6.01,248,1684825200"; d="asc'?scan'208";a="227517169" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Aug 2023 23:55:20 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 1 Aug 2023 23:55:13 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Tue, 1 Aug 2023 23:55:11 -0700 Date: Wed, 2 Aug 2023 07:54:35 +0100 From: Conor Dooley To: Minda Chen CC: Conor Dooley , Jisheng Zhang , Samuel Holland , Dao Lu , Heiko Stuebner , Paul Walmsley , Palmer Dabbelt , Albert Ou , , Subject: Re: [PATCH v1] riscv: Using TOOLCHAIN_HAS_ZIHINTPAUSE marco replace zihintpause Message-ID: <20230802-sharpness-spoon-f9b8804fb66f@wendy> References: <20230802064215.31111-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FVNaThGgTV3kObRx" Content-Disposition: inline In-Reply-To: <20230802064215.31111-1-minda.chen@starfivetech.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --FVNaThGgTV3kObRx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Minda, On Wed, Aug 02, 2023 at 02:42:15PM +0800, Minda Chen wrote: > Actually it is a part of Conor's > commit aae538cd03bc ("riscv: fix detection of toolchain > Zihintpause support"). > It is looks like a merge issue. Yup, spot on. > Samuel's > commit 0b1d60d6dd9e ("riscv: Fix build with > CONFIG_CC_OPTIMIZE_FOR_SIZE=3Dy") do not base on Conor's commit and > revert to __riscv_zihintpause. So this patch can fix it. >=20 > Signed-off-by: Minda Chen Did you actually manage to trigger this, or was this by inspection? clang-15 + binutils 2.35 was, IIRC, how we spotted this because that's what the clang-built-linux CI uses to test the LTS kernels from before LLVM's IAS was supported for RISC-V. Seemingly all that needs to be satisfied there is that zihintpause doesn't appear in -march so this has gone unnoticed. Fixes: 3c349eacc559 ("Merge patch "riscv: Fix build with CONFIG_CC_OPTIMIZE= _FOR_SIZE=3Dy"") Reviewed-by: Conor Dooley Thanks, Conor. > --- > arch/riscv/include/asm/vdso/processor.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/arch/riscv/include/asm/vdso/processor.h b/arch/riscv/include= /asm/vdso/processor.h > index 14f5d27783b8..96b65a5396df 100644 > --- a/arch/riscv/include/asm/vdso/processor.h > +++ b/arch/riscv/include/asm/vdso/processor.h > @@ -14,7 +14,7 @@ static inline void cpu_relax(void) > __asm__ __volatile__ ("div %0, %0, zero" : "=3Dr" (dummy)); > #endif > =20 > -#ifdef __riscv_zihintpause > +#ifdef CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE > /* > * Reduce instruction retirement. > * This assumes the PC changes. > --=20 > 2.17.1 >=20 --FVNaThGgTV3kObRx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZMn9ngAKCRB4tDGHoIJi 0hxdAQDFRoolcE1ZciJySVnzfJ0A7cPaXejOwC5uLjAsT0671AEAmAQgIFMO/NXx QEYAk2a7x7wm2TOTAaDFHFgWbGPK9wQ= =CujL -----END PGP SIGNATURE----- --FVNaThGgTV3kObRx--