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 E58A6C27C76 for ; Sat, 28 Jan 2023 17:40:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235019AbjA1Rkv (ORCPT ); Sat, 28 Jan 2023 12:40:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234897AbjA1Rkg (ORCPT ); Sat, 28 Jan 2023 12:40:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 730B52C64A; Sat, 28 Jan 2023 09:40:00 -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 0F35A60C3D; Sat, 28 Jan 2023 17:40:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBECCC4339B; Sat, 28 Jan 2023 17:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674927599; bh=KzJQY36H8UTRdV4GA4A94Tvlfy8MJf2bQK7pvin0bDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z+0DG6iMUNd/aSmKM3xHy7dAo/bKB3CVzLXFN3QjB/TYRPjxzcStllfQrOorWTdZJ ToqptEGflygaNaZSkU3wJp8JTh+PDzdo+gqCShT1ppZul7j8xcghsFjwkhbqIvDAi+ jHLmm4EBtDmQgzdJmJimFkuRJMWf5rRgeMn5ylir11CPQa94F9vApetIInxmZnHli5 DoB3+FckRyOSNezDo0qWlex10Oym97tbCNrdMTVL+aan269VJ+uGJvFmJf5M3mXtU9 Y6unIz2hyFURp2zxYICWWwg66f7t6ydh5HMYaN1VEwHP7wEL3shcGdaioLZ2jleD5G 5Jt0aZWrdkLtA== 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 12/13] riscv: KVM: Switch has_svinval() to riscv_has_extension_unlikely() Date: Sun, 29 Jan 2023 01:28:55 +0800 Message-Id: <20230128172856.3814-13-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 From: Andrew Jones Switch has_svinval() from static branch to the new helper riscv_has_extension_unlikely(). Signed-off-by: Andrew Jones Reviewed-by: Guo Ren Acked-by: Anup Patel --- arch/riscv/kvm/tlb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/riscv/kvm/tlb.c b/arch/riscv/kvm/tlb.c index 309d79b3e5cd..aa3da18ad873 100644 --- a/arch/riscv/kvm/tlb.c +++ b/arch/riscv/kvm/tlb.c @@ -15,8 +15,7 @@ #include #include -#define has_svinval() \ - static_branch_unlikely(&riscv_isa_ext_keys[RISCV_ISA_EXT_KEY_SVINVAL]) +#define has_svinval() riscv_has_extension_unlikely(RISCV_ISA_EXT_SVINVAL) void kvm_riscv_local_hfence_gvma_vmid_gpa(unsigned long vmid, gpa_t gpa, gpa_t gpsz, -- 2.38.1