From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BF7DC3A5A4 for ; Sun, 1 Sep 2019 21:13:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1076B21897 for ; Sun, 1 Sep 2019 21:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567372383; bh=4H5kossJwrnygZ4ZmPfJmU0ernuq6mRKQZmX7hP/K14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=w/eLoeTFcpCLEJwJosk3koJjP0n9w56mFkqjGwn/fXAXpcstapjzkdZSRSgGW/aew 3eI2CARA8z1w6TzLVZSySkom/TWASS+4KzDdhBCELIcVZOxOy+aW47wxMi855m1eIL PPdbjKYRv7h+5Po1ksrCZhWUB+rehcvnu5POIGJ8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729181AbfIAVNC (ORCPT ); Sun, 1 Sep 2019 17:13:02 -0400 Received: from foss.arm.com ([217.140.110.172]:46442 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729173AbfIAVNB (ORCPT ); Sun, 1 Sep 2019 17:13:01 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E29DE15A2; Sun, 1 Sep 2019 14:13:00 -0700 (PDT) Received: from why.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ABBDD3F77D; Sun, 1 Sep 2019 14:12:59 -0700 (PDT) From: Marc Zyngier To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Cc: James Morse , Julien Thierry , Suzuki K Poulose Subject: [PATCH 3/3] arm64: KVM: Kill hyp_alternate_select() Date: Sun, 1 Sep 2019 22:12:37 +0100 Message-Id: <20190901211237.11673-4-maz@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190901211237.11673-1-maz@kernel.org> References: <20190901211237.11673-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org hyp_alternate_select() is now completely unused. Goodbye. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/kvm_hyp.h | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/arch/arm64/include/asm/kvm_hyp.h b/arch/arm64/include/asm/kvm_hyp.h index 86825aa20852..97f21cc66657 100644 --- a/arch/arm64/include/asm/kvm_hyp.h +++ b/arch/arm64/include/asm/kvm_hyp.h @@ -47,30 +47,6 @@ #define read_sysreg_el2(r) read_sysreg_elx(r, _EL2, _EL1) #define write_sysreg_el2(v,r) write_sysreg_elx(v, r, _EL2, _EL1) -/** - * hyp_alternate_select - Generates patchable code sequences that are - * used to switch between two implementations of a function, depending - * on the availability of a feature. - * - * @fname: a symbol name that will be defined as a function returning a - * function pointer whose type will match @orig and @alt - * @orig: A pointer to the default function, as returned by @fname when - * @cond doesn't hold - * @alt: A pointer to the alternate function, as returned by @fname - * when @cond holds - * @cond: a CPU feature (as described in asm/cpufeature.h) - */ -#define hyp_alternate_select(fname, orig, alt, cond) \ -typeof(orig) * __hyp_text fname(void) \ -{ \ - typeof(alt) *val = orig; \ - asm volatile(ALTERNATIVE("nop \n", \ - "mov %0, %1 \n", \ - cond) \ - : "+r" (val) : "r" (alt)); \ - return val; \ -} - int __vgic_v2_perform_cpuif_access(struct kvm_vcpu *vcpu); void __vgic_v3_save_state(struct kvm_vcpu *vcpu); -- 2.20.1