Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp694474rwo; Wed, 2 Aug 2023 02:40:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlHUPQ9GmbbeGN1sG5L3ho2TuQFc3xr9/rfrax6e1cOs/uVbgz5fo5Gq8zu2k9YL3yIqYrE+ X-Received: by 2002:a05:6a21:3984:b0:13f:2187:c51a with SMTP id ad4-20020a056a21398400b0013f2187c51amr182729pzc.34.1690969202730; Wed, 02 Aug 2023 02:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690969202; cv=none; d=google.com; s=arc-20160816; b=EBhHXP+y+ZQmx/NXHSMy90YBc+vDTtdU6WKU2NtqIHW0vNNESFuBBWLrJubh+NfqMo aLZQs2mVgNs42YwUc1vG41CscfX2om3c9WhKCOKtC+tYXSOATEo2q3hXbkDa9quQ7/oB cK/igvv9YS5POUdnwVAEDzCz9PGIz44K3pw1+F1/yceRgaPt/QWXxkUSlSzpMg1kdzP+ DRsGi2Gohrmp/fHCEzHYB/+iQ5uan7X2M1z3L5mXW3+UBTj5hW14xiYUUpSWRDyz7Qzy 86Lp+CuSTrciTqVdI1RLo9D/2e1AuMKX2Jx+d6jK4WAJtpFP+E2HNnMUvtA008It1JlQ dEew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=AJcqKLkIVf51tz0OHt+MchH/xztsDH6R+HGY65Me8Q4=; fh=4z2HeU8UNXvb3QiWASVZT+fKDnMVIUuMSSLdzQjk9C4=; b=SSDD+qhEIDlhaEGRvH0w8HKS4NTvtnp9FOaLP4RQaXko3CjfQzokjzKnJC+3I8QMaB KA72UzHSIkqlHCrFKK18tGRwfgNw7RVUrlytoTMJrfM7wfIC76VaHg9abgAsatNoKDxI BYrtIZ4pV8r5y1xmJPd6TfUBXkDV89dNdM/qwXqAnvx9YhgnnuvyGNXHtx2YRP65Pb0g jCv2HSVwOmJK3/Yz/T/LZc0iq8w1HaMBm72TaLjYSA4G0lewrBjGdXEvZZyBZ0IDiDgo U3gCAEBvcY1FOft4c+7QanyqJWkLIWIS8xKe/xXsNYYFjXZMGl9IiG0jK/hvqK24MY34 HqGA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s36-20020a63ff64000000b00563df8b135asi6910591pgk.304.2023.08.02.02.39.48; Wed, 02 Aug 2023 02:40:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233880AbjHBISI (ORCPT + 99 others); Wed, 2 Aug 2023 04:18:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233921AbjHBIR6 (ORCPT ); Wed, 2 Aug 2023 04:17:58 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4A37E9; Wed, 2 Aug 2023 01:17:56 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 998FF24E282; Wed, 2 Aug 2023 16:17:53 +0800 (CST) Received: from EXMBX171.cuchost.com (172.16.6.91) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 2 Aug 2023 16:17:53 +0800 Received: from [192.168.125.127] (183.27.98.54) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 2 Aug 2023 16:17:52 +0800 Message-ID: Date: Wed, 2 Aug 2023 16:17:51 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v1] riscv: Using TOOLCHAIN_HAS_ZIHINTPAUSE marco replace zihintpause Content-Language: en-US To: Conor Dooley CC: Conor Dooley , Jisheng Zhang , Samuel Holland , Dao Lu , "Heiko Stuebner" , Paul Walmsley , "Palmer Dabbelt" , Albert Ou , , , Mason Huo , References: <20230802064215.31111-1-minda.chen@starfivetech.com> <20230802-sharpness-spoon-f9b8804fb66f@wendy> <20230802-seismic-gallstone-fca0f4b17076@wendy> From: Minda Chen In-Reply-To: <20230802-seismic-gallstone-fca0f4b17076@wendy> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [183.27.98.54] X-ClientProxiedBy: EXCAS061.cuchost.com (172.16.6.21) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SCC_BODY_URI_ONLY,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 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.