Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp677410rwo; Wed, 2 Aug 2023 02:16:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlH5TMiFq4c8PcZWN920TAEztWP9KnsR6zC7dZsuvyEFtuGpKpnZ3B9ycrE8dPZax+IQrsU3 X-Received: by 2002:a17:90a:a798:b0:267:f094:afcf with SMTP id f24-20020a17090aa79800b00267f094afcfmr13125928pjq.12.1690967801607; Wed, 02 Aug 2023 02:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690967801; cv=none; d=google.com; s=arc-20160816; b=drVLzpXdhyBcQvljC4TKtP5K+Ytn1fT7l4xDTIgye6fwKQv3xgppHcFbHkzoiHLlv5 AIrAr/rKJ3hOzTHFZ57hiY8V8J6vlWWd8MrKUZoV21stiZLlLIK2gZ35vFcaedZCJV6j /Fl6ulttVTUu+iNPA37ZrW25l1Dl2l7qoJ19q1eWZx8rnACt42Fp92X1XWKca7aMsAiS WkaAtfCdw1zVNCzsMvSC2M1eUPGEOG2c/BUu79OZOQOWskCLvwTSuWgZqNbnN5bwPD0l kOXPqL9ETJJrxbfsfoPZriKm3l0d/S0+ctdb318jdCj+l6iaE5GdUMb9Mks7JGWW0t8n wUbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x001JWmMHMxiQAY2qb7/1iniGtbeO/bpst922D3aKBg=; fh=OfLsAvNcibT3sjbsU8b2u/t76bvWm1NS4MMCkGhlS+k=; b=A4bOUGqQ3nVBOUkHkGxNyMWK3V7EmMYZw3g1hGxkFqmXth+O3xbCdRYBu7shpuYmyp ffyrZF4syovSypENppht3b22i/iQWCzFJZ6hv7VFUnzbccmp3nLolW+tVjUMRPt+NHTe DswXHL43+IPgIL7MAwpkHR8sXhr4a+4TmerpXawIeuNf/rUOOgu5SxU0dM/eTebUWgh4 z3VfO/11mN3SXs9V+fWtgO+KVrEez0K6cwoT6Gr+iESX1tTFoZCDvEqcgdYXuueFminu 731NhNW8E7wF2WIngmcek4ranPKh9+kyHalVQ0B8mi9lHjPzfdYwityNN28HdOKjpfGe sxFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=AMpzeVkT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u186-20020a6379c3000000b0055bdf89c9d8si9089391pgc.436.2023.08.02.02.16.28; Wed, 02 Aug 2023 02:16:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=AMpzeVkT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233126AbjHBIxm (ORCPT + 99 others); Wed, 2 Aug 2023 04:53:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232767AbjHBIxh (ORCPT ); Wed, 2 Aug 2023 04:53:37 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 832052706; Wed, 2 Aug 2023 01:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1690966413; x=1722502413; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Tv4M0P+a0kjE58sJhnwrk9HUNB9uEWwAlkNuhiNh6pg=; b=AMpzeVkTfOSUBg1vn4AoJA6fls7pmuo1Tn+7DAjCZyLCCg+GdO1SmidJ 8C2O0RHeOxYQre9s6TTqa0z66ns40ZTrpHFj3THfmM6sV5BLB4SbHsITJ dQwfZkuRrxYQv/r1utXVGbBgXvK0mQp5egt9jyF9IJ0l1G+MFV/1fDlK6 HSoeSTyl2FEPBI6/q02W2+IPmEI8MpPSZO9tlv9f7knEkQH1PBhJWF+KB nQiJNv3r15B4p/pnDyfwLES+ZdihK6wIqw8HBpySrefgxrfJgenbmgEKC grH4ffnxLR+SVA/OMFZQGhmkeMF268XLAGlWtcrIrDbpT/XUSD3cv//a3 A==; X-IronPort-AV: E=Sophos;i="6.01,248,1684825200"; d="asc'?scan'208";a="223448015" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 02 Aug 2023 01:53:32 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) 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; Wed, 2 Aug 2023 01:53:23 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Wed, 2 Aug 2023 01:53:21 -0700 Date: Wed, 2 Aug 2023 09:52:45 +0100 From: Conor Dooley To: Greg KH CC: Minda Chen , Conor Dooley , Jisheng Zhang , Samuel Holland , Dao Lu , Heiko Stuebner , Paul Walmsley , Palmer Dabbelt , Albert Ou , , , Mason Huo , Subject: Re: [PATCH v1] riscv: Using TOOLCHAIN_HAS_ZIHINTPAUSE marco replace zihintpause Message-ID: <20230802-decibel-unshaved-fde1cfba2d20@wendy> References: <20230802064215.31111-1-minda.chen@starfivetech.com> <20230802-sharpness-spoon-f9b8804fb66f@wendy> <20230802-seismic-gallstone-fca0f4b17076@wendy> <2023080253-headache-moneybags-a833@gregkh> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FW1Kj+nV7cDQRX/N" Content-Disposition: inline In-Reply-To: <2023080253-headache-moneybags-a833@gregkh> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --FW1Kj+nV7cDQRX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 02, 2023 at 10:33:27AM +0200, Greg KH wrote: > On Wed, Aug 02, 2023 at 04:17:51PM +0800, Minda Chen wrote: > >=20 > >=20 > > On 2023/8/2 15:48, Conor Dooley wrote: > > > On Wed, Aug 02, 2023 at 03:32:15PM +0800, Minda Chen wrote: > > >>=20 > > >>=20 > > >> On 2023/8/2 14:54, Conor Dooley wrote: > > >> > Hey Minda, > > >> >=20 > > >> > 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. > > >> >=20 > > >> > Yup, spot on. > > >> >=20 > > >> >> Samuel's > > >> >> commit 0b1d60d6dd9e ("riscv: Fix build with > > >> >> CONFIG_CC_OPTIMIZE_FOR_SIZE=3Dy") do not base on Conor's commit a= nd > > >> >> revert to __riscv_zihintpause. So this patch can fix it. > > >> >>=20 > > >> >> Signed-off-by: Minda Chen > > >> >=20 > > >> > Did you actually manage to trigger this, or was this by inspection? > > >> > clang-15 + binutils 2.35 was, IIRC, how we spotted this because th= at's > > >> > what the clang-built-linux CI uses to test the LTS kernels from be= fore > > >> > 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 th= is has > > >> > gone unnoticed. > > >> >=20 > > >> > Fixes: 3c349eacc559 ("Merge patch "riscv: Fix build with CONFIG_CC= _OPTIMIZE_FOR_SIZE=3Dy"") > > >> > Reviewed-by: Conor Dooley > > >> >=20 > > >> > Thanks, > > >> > Conor. > > >> >=20 > > >> Thanks, Conor. I found this just by inspection. I found a issue that= vdso.so call cpu_relax > > >> cause application core dump in kernel 6.1.31. I need Samuel'patch to= fix this. And I search the log > > >> of processor.h found this issue. > > >=20 > > > That doesn't look like it is fixed in later stable kernels (we are at > > > 6.1.42-rcN right now I think). It sounds we should ask Greg to backpo= rt > > > 0b1d60d6dd9e ("riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=3Dy") > > > to 6.1. Does that make sense to you? > > Yes. 6.1 is lts kernel. Starfive will use this kernel for a long time. = Thanks. >=20 > What is preventing you from moving to a newer kernel version? All of > your kernel changes are already properly merged into Linus's tree, > right? Regardless of their reasons, "vdso.so call cpu_relax cause application core dump" is something that we should fix in stable kernels, no? --FW1Kj+nV7cDQRX/N Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZMoZXQAKCRB4tDGHoIJi 0oRWAP9BTGH3q07+XeBW8yRULD9PA1MB/TiLZFZTyMSVwZ+k7gEAkN5bfTlTj2Bu 4J2aZnx6QsteTBSDwjAzsIcBaqYmGQU= =deFA -----END PGP SIGNATURE----- --FW1Kj+nV7cDQRX/N--