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 4DE86C61DA4 for ; Sat, 28 Jan 2023 17:40:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234945AbjA1Rkk (ORCPT ); Sat, 28 Jan 2023 12:40:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234881AbjA1Rkg (ORCPT ); Sat, 28 Jan 2023 12:40:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBA6A2BEEF; Sat, 28 Jan 2023 09:39:58 -0800 (PST) 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 D7EC360C33; Sat, 28 Jan 2023 17:39:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93349C4339E; Sat, 28 Jan 2023 17:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674927596; bh=s7J/q6ens2rvlMJbJ7trLTcT6RXo2JnK5jMkTSfRtMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=or6Q1P3qk1ryFUh6y0FImUlHZcfNXCDeY0rpPap7KVTCY2YjEI5DTFaw3nKtOE4cH tg6i1O2ma3ObRI6jH0W7/2azYCUb0Zzf6O24dHKXNszSqhNFUUjouRpYG1dP3HTOhh OTOg9ws0qfqJrtnaZa8PVgRITgwDuU1kPDBvwkIHjkRfq+aYt1qgntuq9OIEV4Nh6i 1QaLn13sJEbaWGPJHICadre4zBDftCNStlB1iNRx255xVmixR2mYYAhCHL+FTJz+II yd6QE44US6JUVA6jmsrWI0/zrQa09GFfhI/+4j477sRVjYAoBIesbPGKEH+sk+HHsQ CbAF2PWb+KwCA== From: Jisheng Zhang To: Palmer Dabbelt , Paul Walmsley , Albert Ou , Anup Patel , Atish Patra , Heiko Stuebner , Andrew Jones , Conor Dooley Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Guo Ren Subject: [PATCH v5 11/13] riscv: cpu_relax: switch to riscv_has_extension_likely() Date: Sun, 29 Jan 2023 01:28:54 +0800 Message-Id: <20230128172856.3814-12-jszhang@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230128172856.3814-1-jszhang@kernel.org> References: <20230128172856.3814-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch cpu_relax() from static branch to the new helper riscv_has_extension_likely() Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Jones Reviewed-by: Heiko Stuebner Reviewed-by: Guo Ren 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 fa70cfe507aa..edf0e25e43d1 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.38.1