From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 4/5] arm64: kvm: Adopt new alternative assembler macros
Date: Wed, 22 Jul 2015 16:17:39 +0100 [thread overview]
Message-ID: <20150722151739.GM6650@arm.com> (raw)
In-Reply-To: <1437564065-4356-5-git-send-email-daniel.thompson@linaro.org>
Marc, Christoffer,
On Wed, Jul 22, 2015 at 12:21:04PM +0100, Daniel Thompson wrote:
> Convert the dynamic patching for ARM64_HAS_SYSREG_GIC_CPUIF over to
> the newly added alternative assembler macros.
Do you mind if I take this via the arm64 tree? It won't apply in
isolation and I'd expect conflicts to be small/trivial to resolve.
Cheers,
Will
> ---
> 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
> --
> 2.4.3
>
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"patches@linaro.org" <patches@linaro.org>,
"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
John Stultz <john.stultz@linaro.org>,
Sumit Semwal <sumit.semwal@linaro.org>,
Christoffer Dall <christoffer.dall@linaro.org>,
Marc Zyngier <Marc.Zyngier@arm.com>,
Andre Przywara <Andre.Przywara@arm.com>
Subject: Re: [PATCH v3 4/5] arm64: kvm: Adopt new alternative assembler macros
Date: Wed, 22 Jul 2015 16:17:39 +0100 [thread overview]
Message-ID: <20150722151739.GM6650@arm.com> (raw)
In-Reply-To: <1437564065-4356-5-git-send-email-daniel.thompson@linaro.org>
Marc, Christoffer,
On Wed, Jul 22, 2015 at 12:21:04PM +0100, Daniel Thompson wrote:
> Convert the dynamic patching for ARM64_HAS_SYSREG_GIC_CPUIF over to
> the newly added alternative assembler macros.
Do you mind if I take this via the arm64 tree? It won't apply in
isolation and I'd expect conflicts to be small/trivial to resolve.
Cheers,
Will
> ---
> 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
> --
> 2.4.3
>
next prev parent reply other threads:[~2015-07-22 15:17 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 13:48 [PATCH] arm64: alternative: Provide if/else/endif assembler macros Daniel Thompson
2015-07-10 13:48 ` Daniel Thompson
2015-07-16 18:19 ` Will Deacon
2015-07-16 18:19 ` Will Deacon
2015-07-17 10:42 ` Daniel Thompson
2015-07-17 10:42 ` Daniel Thompson
2015-07-20 15:09 ` [PATCH v2 0/5] " Daniel Thompson
2015-07-20 15:09 ` Daniel Thompson
2015-07-20 15:10 ` [PATCH v2 1/5] " Daniel Thompson
2015-07-20 15:10 ` Daniel Thompson
2015-07-20 17:12 ` Will Deacon
2015-07-20 17:12 ` Will Deacon
2015-07-22 11:08 ` Daniel Thompson
2015-07-22 11:08 ` Daniel Thompson
2015-07-20 15:10 ` [PATCH v2 2/5] arm64: mm: Adopt new alternative " Daniel Thompson
2015-07-20 15:10 ` Daniel Thompson
2015-07-20 15:10 ` [PATCH v2 3/5] arm64: kernel: " Daniel Thompson
2015-07-20 15:10 ` Daniel Thompson
2015-07-20 15:10 ` [PATCH v2 4/5] arm64: kvm: " Daniel Thompson
2015-07-20 15:10 ` Daniel Thompson
2015-07-20 15:10 ` [PATCH v2 5/5] arm64: alternative: Remove alternative_insn macro Daniel Thompson
2015-07-20 15:10 ` Daniel Thompson
2015-07-22 11:21 ` [PATCH v3 0/5] arm64: alternative: Provide if/else/endif assembler macros Daniel Thompson
2015-07-22 11:21 ` Daniel Thompson
2015-07-22 11:21 ` [PATCH v3 1/5] " Daniel Thompson
2015-07-22 11:21 ` Daniel Thompson
2015-07-22 11:21 ` [PATCH v3 2/5] arm64: mm: Adopt new alternative " Daniel Thompson
2015-07-22 11:21 ` Daniel Thompson
2015-07-22 11:21 ` [PATCH v3 3/5] arm64: kernel: " Daniel Thompson
2015-07-22 11:21 ` Daniel Thompson
2015-07-22 11:21 ` [PATCH v3 4/5] arm64: kvm: " Daniel Thompson
2015-07-22 11:21 ` Daniel Thompson
2015-07-22 15:17 ` Will Deacon [this message]
2015-07-22 15:17 ` Will Deacon
2015-07-22 15:55 ` Marc Zyngier
2015-07-22 15:55 ` Marc Zyngier
2015-07-22 11:21 ` [PATCH v3 5/5] arm64: alternative: Remove alternative_insn macro Daniel Thompson
2015-07-22 11:21 ` Daniel Thompson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150722151739.GM6650@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.