Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp577228rwb; Thu, 6 Oct 2022 01:10:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM447VK7fLQmGQAAwD8RpY/fORwTqcP/6hIFX8JXxIdYD6UrMozUcvFyKgLcUXk110GtYULi X-Received: by 2002:a17:902:e812:b0:17f:7fe9:8f49 with SMTP id u18-20020a170902e81200b0017f7fe98f49mr3628722plg.26.1665043830750; Thu, 06 Oct 2022 01:10:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665043830; cv=none; d=google.com; s=arc-20160816; b=Qmh2+sNdyhEFHCiM9ai9RgiYXzXDNK9V11kDaxdLL7gjaC6ytvddDFO10ICYlXoIgd kM88K/UBomAiApO2XGD9HSZjK1Genm2pBVclRZvr8hc5DNwQa9nzDcJy2cT9lZiKUbNs /jMW1f6vVWLe1qzksKGdlrFiTQpEbfzC1yaICi3C83dIL5ZuVaEWqqMFGa+smhbe+hwp /upquQagDOjX8yxfWQ+o3m9Ux+fUb88C3MZB7cKzEnIq+4RHQQB0VOUE4Nn6kN30/3ss fopkTnM+ZLa6hjaSneGSbzvwx4Ii+UpigjGaQPdCogyvfaCfj+slje/n3SK+6KMKxmwJ QXRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zyyFKkOkt5VaAQW2V4h1I4YIPvyssIhbmuwOiUwSfrc=; b=pbspC1Pj6xzgZM4+M/8Dnog/cynoIUwX1MYIaADuUo1wiNMBUe1lGx4xp3gst1UJaY kcvg+JYpyTFDH+eahHJuC2NoE70OKEvIJtikRqRCh0g4vvh5IlDggHyKfFw8IzUW1Isj 0lPwod4zvlqnT8wt2QRWAWdeJLZTt0CjfsOr//BveTTO8KchIw7VItM8D8zY1OP1Ew6h RL04+fINLo54+9+gGpT0ubj0DP8gP10vkVjOnxx6BnyA8L0Gh6Ldv7Kfws7LsgQeBav2 3jQA/cY/JJd1LcX8soBb//9vk+f+5BZVtqKxprfKyTzsI3PRbzqSEj9CXm5F+CMgFA21 m1Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G9qkS9oN; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a170902ab8900b00172ded6ff02si17173668plr.382.2022.10.06.01.10.19; Thu, 06 Oct 2022 01:10:30 -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=@kernel.org header.s=k20201202 header.b=G9qkS9oN; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230255AbiJFHS2 (ORCPT + 99 others); Thu, 6 Oct 2022 03:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230271AbiJFHSV (ORCPT ); Thu, 6 Oct 2022 03:18:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28E728D0E7 for ; Thu, 6 Oct 2022 00:18:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CE26C61840 for ; Thu, 6 Oct 2022 07:18:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 212D4C433D6; Thu, 6 Oct 2022 07:17:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665040681; bh=q1P6JOc4LZgqnbSMLMvIBMsGeHNZHYmP6JQftBlIGdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G9qkS9oNbnmHmAddKCyn+luppCnBMsmL1peXa0hNrUrrp6gMtETjSsdVjD8LkwKM9 seG1/vliubyojeyCrHIj1oDAyiIbGcohZo67HvIRdaTzJWwmaIff+aZ4vzUGf3dfGQ 1ATQu1DgnElg89SQK+CPYMOhlu8wT/0k+3049yXeozFcY0XKU3B4w2TXRI0yH6KNx2 RM/JO+iX0MfhF29pI25yE/osiZZE49Qq8JVsqxeiMO/cUcdJTYmmbAjgOyd2NWQVbS QaWUeqbBQNfVW8p//s9t1MxLzxWgzABSZ4tfwrfw0Q+EC02YZ/X90yypP4JOlueCKN mtwyzZNypWTjw== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/8] riscv: cpu_relax: switch to riscv_has_extension_likely() Date: Thu, 6 Oct 2022 15:08:17 +0800 Message-Id: <20221006070818.3616-8-jszhang@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221006070818.3616-1-jszhang@kernel.org> References: <20221006070818.3616-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Switch cpu_relax() from statich branch to the new helper riscv_has_extension_likely() Signed-off-by: Jisheng Zhang --- 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 1e4f8b4aef79..fb30480f36a0 100644 --- a/arch/riscv/include/asm/vdso/processor.h +++ b/arch/riscv/include/asm/vdso/processor.h @@ -10,7 +10,7 @@ static inline void cpu_relax(void) { - if (!static_branch_likely(&riscv_isa_ext_keys[RISCV_ISA_EXT_KEY_ZIHINTPAUSE])) { + if (!riscv_has_extension_likely(RISCV_ISA_EXT_ZIHINTPAUSE)) { #ifdef __riscv_muldiv int dummy; /* In lieu of a halt instruction, induce a long-latency stall. */ -- 2.37.2