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 CCD90C001DE for ; Wed, 2 Aug 2023 08:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232194AbjHBIdd (ORCPT ); Wed, 2 Aug 2023 04:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231322AbjHBIdc (ORCPT ); Wed, 2 Aug 2023 04:33:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83202171B; Wed, 2 Aug 2023 01:33:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1A11C6184D; Wed, 2 Aug 2023 08:33:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF834C433C7; Wed, 2 Aug 2023 08:33:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1690965210; bh=6L87WFqpRWoyspDs3L6KZduy9PxJ66o4a4lAQyjQVr4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YYxMnfhfp/hn8Iri+SxArk/uuPg4mGzMWdOpzu5oZn5Pl5CNy8ezbaDd8McBJ203o 7uOOUooPxq83PZsOSkVUDxZtrWzX1UDk3HR1+FGCP3YJJKYI8Av65YNjiKhedbM25m jgI2e0TgWX7c+FRdsmJ8yJ6LLy+35xiTC7jd5P4k= Date: Wed, 2 Aug 2023 10:33:27 +0200 From: Greg KH To: Minda Chen Cc: Conor Dooley , Conor Dooley , Jisheng Zhang , Samuel Holland , Dao Lu , Heiko Stuebner , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Mason Huo , stable@vger.kernel.org Subject: Re: [PATCH v1] riscv: Using TOOLCHAIN_HAS_ZIHINTPAUSE marco replace zihintpause Message-ID: <2023080253-headache-moneybags-a833@gregkh> References: <20230802064215.31111-1-minda.chen@starfivetech.com> <20230802-sharpness-spoon-f9b8804fb66f@wendy> <20230802-seismic-gallstone-fca0f4b17076@wendy> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Aug 02, 2023 at 04:17:51PM +0800, Minda Chen wrote: > > > On 2023/8/2 15:48, Conor Dooley wrote: > > On Wed, Aug 02, 2023 at 03:32:15PM +0800, Minda Chen wrote: > >> > >> > >> On 2023/8/2 14:54, Conor Dooley wrote: > >> > 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=y") do not base on Conor's commit and > >> >> revert to __riscv_zihintpause. So this patch can fix it. > >> >> > >> >> 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=y"") > >> > Reviewed-by: Conor Dooley > >> > > >> > Thanks, > >> > Conor. > >> > > >> 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. > > > > 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 backport > > 0b1d60d6dd9e ("riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y") > > 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. 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? thanks, greg k-h