From: Christoffer Dall <christoffer.dall@linaro.org> To: "Paolo Bonzini" <pbonzini@redhat.com>, "Radim Krčmář" <rkrcmar@redhat.com> Cc: Marc Zyngier <marc.zyngier@arm.com>, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PULL 48/50] ARM: gic-v3: Work around definition of gic_write_bpr1 Date: Tue, 27 Sep 2016 20:05:56 +0200 [thread overview] Message-ID: <20160927180558.14699-49-christoffer.dall@linaro.org> (raw) In-Reply-To: <20160927180558.14699-1-christoffer.dall@linaro.org> From: Marc Zyngier <marc.zyngier@arm.com> A new accessor for gic_write_bpr1 is added to arch_gicv3.h in 4.9, whilst the CP15 accessors are redifined in a separate branch. This leads to a horrible clash, where the new accessor ends up with a crap "asm volatile" definition. Work around this by carrying our own definition of gic_write_bpr1, creating a small conflict which will be obvious to resolve. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> --- arch/arm/include/asm/arch_gicv3.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/include/asm/arch_gicv3.h b/arch/arm/include/asm/arch_gicv3.h index 996848e..1fee657 100644 --- a/arch/arm/include/asm/arch_gicv3.h +++ b/arch/arm/include/asm/arch_gicv3.h @@ -216,6 +216,15 @@ static inline void gic_write_sre(u32 val) isb(); } +static inline void gic_write_bpr1(u32 val) +{ +#if defined(__write_sysreg) && defined(ICC_BPR1) + write_sysreg(val, ICC_BPR1); +#else + asm volatile("mcr " __stringify(ICC_BPR1) : : "r" (val)); +#endif +} + /* * Even in 32bit systems that use LPAE, there is no guarantee that the I/O * interface provides true 64bit atomic accesses, so using strd/ldrd doesn't -- 2.9.0
WARNING: multiple messages have this Message-ID (diff)
From: christoffer.dall@linaro.org (Christoffer Dall) To: linux-arm-kernel@lists.infradead.org Subject: [PULL 48/50] ARM: gic-v3: Work around definition of gic_write_bpr1 Date: Tue, 27 Sep 2016 20:05:56 +0200 [thread overview] Message-ID: <20160927180558.14699-49-christoffer.dall@linaro.org> (raw) In-Reply-To: <20160927180558.14699-1-christoffer.dall@linaro.org> From: Marc Zyngier <marc.zyngier@arm.com> A new accessor for gic_write_bpr1 is added to arch_gicv3.h in 4.9, whilst the CP15 accessors are redifined in a separate branch. This leads to a horrible clash, where the new accessor ends up with a crap "asm volatile" definition. Work around this by carrying our own definition of gic_write_bpr1, creating a small conflict which will be obvious to resolve. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> --- arch/arm/include/asm/arch_gicv3.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/include/asm/arch_gicv3.h b/arch/arm/include/asm/arch_gicv3.h index 996848e..1fee657 100644 --- a/arch/arm/include/asm/arch_gicv3.h +++ b/arch/arm/include/asm/arch_gicv3.h @@ -216,6 +216,15 @@ static inline void gic_write_sre(u32 val) isb(); } +static inline void gic_write_bpr1(u32 val) +{ +#if defined(__write_sysreg) && defined(ICC_BPR1) + write_sysreg(val, ICC_BPR1); +#else + asm volatile("mcr " __stringify(ICC_BPR1) : : "r" (val)); +#endif +} + /* * Even in 32bit systems that use LPAE, there is no guarantee that the I/O * interface provides true 64bit atomic accesses, so using strd/ldrd doesn't -- 2.9.0
next prev parent reply other threads:[~2016-09-27 18:05 UTC|newest] Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-27 18:05 [PULL 00/50] KVM/ARM Changes for v4.9 Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 01/50] KVM: arm/arm64: Add VGICv3 save/restore API documentation Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 02/50] KVM: arm/arm64: Factor out vgic_attr_regs_access functionality Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 03/50] KVM: arm/arm64: Rename vgic_attr_regs_access to vgic_attr_regs_access_v2 Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 04/50] arm64: KVM: Optimize __guest_enter/exit() to save a few instructions Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 05/50] KVM: arm: vgic: Drop build compatibility hack for older kernel versions Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 06/50] arm/kvm: excise redundant cache maintenance Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 07/50] arm64/kvm: remove unused stub functions Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 08/50] KVM: arm/arm64: Get rid of exported aliases to static functions Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 09/50] arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2 Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 10/50] arm64: KVM: Move kvm_vcpu_get_condition out of emulate.c Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 11/50] arm64: KVM: Move the AArch32 conditional execution to common code Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 12/50] arm: KVM: Use common AArch32 conditional execution code Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 13/50] arm64: KVM: Make kvm_skip_instr32 available to HYP Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 14/50] arm64: KVM: vgic-v2: Add the GICV emulation infrastructure Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 15/50] arm64: KVM: vgic-v2: Add GICV access from HYP Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 16/50] arm64: KVM: vgic-v2: Enable GICV access from HYP if access from guest is unsafe Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 17/50] arm64: KVM: Rename HCR_VA to HCR_VSE Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 18/50] arm64: KVM: Preserve pending vSError in world switch Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 19/50] arm64: KVM: Add Virtual Abort injection helper Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 20/50] arm64: KVM: Add exception code to report EL1 asynchronous aborts Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 21/50] arm64: KVM: Add EL1 async abort handler Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 22/50] arm64: KVM: Route asynchronous aborts Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 23/50] arm64: KVM: Allow an exit code to be tagged with an SError Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 24/50] arm64: KVM: Inject a Virtual SError if it was pending Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 25/50] arm64: KVM: Handle async aborts delivered while at EL2 Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 26/50] arm: KVM: Preserve pending Virtual Abort in world switch Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 27/50] arm: KVM: Add Virtual Abort injection helper Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 28/50] arm: KVM: Add HYP async abort handler Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 29/50] arm: KVM: Allow an exit code to be tagged with a Virtual Abort Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 30/50] arm: KVM: Handle async aborts delivered while at HYP Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 31/50] arm: KVM: Inject a Virtual Abort if it was pending Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 32/50] arm: KVM: Drop unreachable HYP abort handlers Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 33/50] arm/arm64: KVM: Inject virtual abort when guest exits on external abort Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 34/50] arm/arm64: KVM: Remove external abort test from MMIO handling Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 35/50] arm64: KVM: Inject a vSerror if detecting a bad GICV access at EL2 Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 36/50] KVM: ARM: cleanup kvm_timer_hyp_init Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 37/50] arm64: KVM: Use static keys for selecting the GIC backend Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 38/50] arm64: KVM: Move GIC accessors to arch_gicv3.h Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 39/50] arm64: KVM: Move vgic-v3 save/restore to virt/kvm/arm/hyp Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 40/50] KVM: arm64: vgic-its: Introduce config option to guard ITS specific code Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 41/50] KVM: arm: vgic: Fix compiler warnings when built for 32-bit Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 42/50] KVM: arm: vgic: Support 64-bit data manipulation on 32-bit host systems Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 43/50] ARM: Introduce MPIDR_LEVEL_SHIFT macro Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 44/50] ARM: Move system register accessors to asm/cp15.h Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 45/50] ARM: gic-v3: Introduce 32-to-64-bit mappings for GICv3 cpu registers Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 46/50] ARM: KVM: Support vgic-v3 Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 47/50] arm64: KVM: Remove duplicating init code for setting VMID Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall [this message] 2016-09-27 18:05 ` [PULL 48/50] ARM: gic-v3: Work around definition of gic_write_bpr1 Christoffer Dall 2016-09-27 18:05 ` [PULL 49/50] KVM: arm64: Require in-kernel irqchip for PMU support Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-27 18:05 ` [PULL 50/50] KVM: arm/arm64: vgic: Don't flush/sync without a working vgic Christoffer Dall 2016-09-27 18:05 ` Christoffer Dall 2016-09-29 14:46 ` [PULL 00/50] KVM/ARM Changes for v4.9 Radim Krčmář 2016-09-29 14:46 ` Radim Krčmář
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=20160927180558.14699-49-christoffer.dall@linaro.org \ --to=christoffer.dall@linaro.org \ --cc=kvm@vger.kernel.org \ --cc=kvmarm@lists.cs.columbia.edu \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=marc.zyngier@arm.com \ --cc=pbonzini@redhat.com \ --cc=rkrcmar@redhat.com \ /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: linkBe 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.