From patchwork Wed Aug 2 06:42:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 129646 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp262264vqx; Wed, 2 Aug 2023 00:04:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBh9xQG1A0Xu0gE8+YRNajCJIPpX2dIO/F0CCovcusvE/BbxtUsXT8wK3SOeC2OHmOl9/S X-Received: by 2002:a05:6a20:4285:b0:123:149b:a34f with SMTP id o5-20020a056a20428500b00123149ba34fmr18707360pzj.1.1690959855123; Wed, 02 Aug 2023 00:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690959855; cv=none; d=google.com; s=arc-20160816; b=sfkFK1y2tLf7tPgodzppCp+zkH6wBcYBQfJr0h7y1kpnSFRw5dLPp7mVbXOMp9RjEi cE6YzB9vFezu2jqv9CC4+7fXwO/ljhMBPA9WW7PloDmcvJIuZ45ySwF/RSNbvSeTEOBd GTewR8VU7cX7qCyfenudb7C8/oPZ6/Oa1H6VnSvdhpP/VIOKqgOPHYeJvkBvIuSG3LnO HEswaesNZAjPcqLGMuD0TW5QqSveb00J58jL7p2WI6R8lV5sxdz1rbKBlChexLbi0JJS EZm4oTNbCdteE2gaT9j2IgZR9w/WPVSv8capPi9pTR4YeIkvnUfMJkkLYcS1CXbhBlns 6YOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=UT/9ffBfwC4j/gfIZvyhsFObZW1cCqrSp8exyshJxSo=; fh=SdSl0NANxOLmmdpDs0YhfcYyoG6UCSYN2Ymd1r7Mw2M=; b=bz4jmClNtIOOhNfVQgxoNq8S75bwMa9JymsspCuQ6V/V7lcDttmrQPz+VkVPf+N2Ph kEn9w7fVJozSqjZkN3RfxXcPLuzhTx2Q64uzd2RRmQyQs24Y5ZZSgDcdrTzIIjSnviG4 vv3+vXljXLi3t7+SI16sV37C26JlEYAFekkJZJOXlrs44Wgd99IBGNcF9JbdCicx4HFO 99VdePJH7C0oQu+XBB7MSsJRIBwTn0fK63zEcntzH9J558EYt20e/w8uL1SlUQ9mbZbE hui1F2Kv3DgvjWCYbfi0h9udxvn5Jv5CwVN8UnP5eii7ChkjdYPrCroL2VLKA5U8457u YpbA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x190-20020a6386c7000000b0055ffed90ccasi9998296pgd.459.2023.08.02.00.03.42; Wed, 02 Aug 2023 00:04:15 -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 S232305AbjHBGnV (ORCPT + 99 others); Wed, 2 Aug 2023 02:43:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjHBGnQ (ORCPT ); Wed, 2 Aug 2023 02:43:16 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A579230DD for ; Tue, 1 Aug 2023 23:42:48 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 4745B24E248; Wed, 2 Aug 2023 14:42:17 +0800 (CST) Received: from EXMBX171.cuchost.com (172.16.6.91) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 2 Aug 2023 14:42:17 +0800 Received: from ubuntu.localdomain (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 14:42:16 +0800 From: Minda Chen To: Conor Dooley , Jisheng Zhang , Samuel Holland , Dao Lu , "Heiko Stuebner" , Paul Walmsley , "Palmer Dabbelt" , Albert Ou CC: , , "Minda Chen" Subject: [PATCH v1] riscv: Using TOOLCHAIN_HAS_ZIHINTPAUSE marco replace zihintpause Date: Wed, 2 Aug 2023 14:42:15 +0800 Message-ID: <20230802064215.31111-1-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [183.27.98.54] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773099920804511050 X-GMAIL-MSGID: 1773099920804511050 Actually it is a part of Conor's commit aae538cd03bc ("riscv: fix detection of toolchain Zihintpause support"). It is looks like a merge issue. 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 Reviewed-by: Conor Dooley --- arch/riscv/include/asm/vdso/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" : "=r" (dummy)); #endif -#ifdef __riscv_zihintpause +#ifdef CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE /* * Reduce instruction retirement. * This assumes the PC changes.