From patchwork Wed Jul 22 11:21:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 51342 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 667DD20323 for ; Wed, 22 Jul 2015 11:21:27 +0000 (UTC) Received: by lbbvz8 with SMTP id vz8sf56247433lbb.2 for ; Wed, 22 Jul 2015 04:21:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=HRQjlJ/JJGdliYFblpUO6Hn/NYRsqH4CwsW0Osyumww=; b=aZO8Oi7tybMQ0tsleV0X1gvzZBk3/mPYOG1fqwwC/QprsG4FxzKgvoolUfqsJ8q6yx +h1pCJJOuR3Y7bx+OtJkT6CAiTnxG3/gGyshzoCpAET5v3FucWNVM/wm+q/pt/+YfEjb KM8eSRdNphvdksFzlzux1oxPfv7taOpG+UA7xn5ql7OEzTIpY0Zm/KaRl7hwqlE5RHRj QtFw6NI7B6jVDICWHSIz2ALMU4ta08QVfNEpwvEgi76SpwXN4yMVUYeuBFvTFL0rSwyO b9VfCDRGoxp+R/nTLcAKtrsyCoCKJeBOEUsMuLEjHJPXB0SpeJnRPDBET44IyFI7N1cx U4Og== X-Gm-Message-State: ALoCoQno0SEBu5jm/7Vt9JDK3F/4EMSpjBp3/FJ2+mxtjsAJxvaNdVYozcrckwxMBraNFJhxGrxl X-Received: by 10.180.186.36 with SMTP id fh4mr1433788wic.7.1437564086291; Wed, 22 Jul 2015 04:21:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.65 with SMTP id r1ls68692lag.61.gmail; Wed, 22 Jul 2015 04:21:26 -0700 (PDT) X-Received: by 10.112.50.230 with SMTP id f6mr1844005lbo.17.1437564086134; Wed, 22 Jul 2015 04:21:26 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id l1si911082lbj.175.2015.07.22.04.21.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 04:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by laah7 with SMTP id h7so4529578laa.0 for ; Wed, 22 Jul 2015 04:21:26 -0700 (PDT) X-Received: by 10.112.55.207 with SMTP id u15mr1858608lbp.88.1437564086060; Wed, 22 Jul 2015 04:21:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.7.198 with SMTP id l6csp2046601lba; Wed, 22 Jul 2015 04:21:25 -0700 (PDT) X-Received: by 10.180.105.165 with SMTP id gn5mr39556158wib.20.1437564081795; Wed, 22 Jul 2015 04:21:21 -0700 (PDT) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com. [209.85.212.175]) by mx.google.com with ESMTPS id it9si24213749wid.64.2015.07.22.04.21.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 04:21:21 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.212.175 as permitted sender) client-ip=209.85.212.175; Received: by wibxm9 with SMTP id xm9so158616680wib.0 for ; Wed, 22 Jul 2015 04:21:21 -0700 (PDT) X-Received: by 10.194.178.201 with SMTP id da9mr3957191wjc.139.1437564081510; Wed, 22 Jul 2015 04:21:21 -0700 (PDT) Received: from wychelm.lan (cpc4-aztw19-0-0-cust71.18-1.cable.virginm.net. [82.33.25.72]) by smtp.gmail.com with ESMTPSA id j7sm1901235wjz.11.2015.07.22.04.21.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 04:21:20 -0700 (PDT) From: Daniel Thompson To: Catalin Marinas , Will Deacon Cc: Daniel Thompson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, John Stultz , Sumit Semwal , Christoffer Dall , Marc Zyngier , Andre Przywara Subject: [PATCH v3 4/5] arm64: kvm: Adopt new alternative assembler macros Date: Wed, 22 Jul 2015 12:21:04 +0100 Message-Id: <1437564065-4356-5-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1437564065-4356-1-git-send-email-daniel.thompson@linaro.org> References: <1436536130-31438-1-git-send-email-daniel.thompson@linaro.org> <1437564065-4356-1-git-send-email-daniel.thompson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Convert the dynamic patching for ARM64_HAS_SYSREG_GIC_CPUIF over to the newly added alternative assembler macros. Signed-off-by: Daniel Thompson --- arch/arm64/kvm/hyp.S | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index 17a8fb14f428..10915aaf0b01 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -810,7 +810,11 @@ * Call into the vgic backend for state saving */ .macro save_vgic_state - alternative_insn "bl __save_vgic_v2_state", "bl __save_vgic_v3_state", ARM64_HAS_SYSREG_GIC_CPUIF +alternative_if_not ARM64_HAS_SYSREG_GIC_CPUIF + bl __save_vgic_v2_state +alternative_else + bl __save_vgic_v3_state +alternative_endif mrs x24, hcr_el2 mov x25, #HCR_INT_OVERRIDE neg x25, x25 @@ -827,7 +831,11 @@ orr x24, x24, #HCR_INT_OVERRIDE orr x24, x24, x25 msr hcr_el2, x24 - alternative_insn "bl __restore_vgic_v2_state", "bl __restore_vgic_v3_state", ARM64_HAS_SYSREG_GIC_CPUIF +alternative_if_not ARM64_HAS_SYSREG_GIC_CPUIF + bl __restore_vgic_v2_state +alternative_else + bl __restore_vgic_v3_state +alternative_endif .endm .macro save_timer_state