From: Marc Zyngier <marc.zyngier@arm.com>
To: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Christoffer Dall <cdall@linaro.org>,
kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org
Subject: Re: [PATCH v4 1/7] KVM: arm/arm64: Remove redundant preemptible checks
Date: Tue, 10 Oct 2017 11:06:10 +0100 [thread overview]
Message-ID: <87sheruxkd.fsf@on-the-bus.cambridge.arm.com> (raw)
In-Reply-To: <1505513994-77939-2-git-send-email-christoffer.dall@linaro.org> (Christoffer Dall's message of "Fri, 15 Sep 2017 15:19:48 -0700")
On Fri, Sep 15 2017 at 3:19:48 pm BST, Christoffer Dall <christoffer.dall@linaro.org> wrote:
> From: Christoffer Dall <cdall@linaro.org>
>
> The __this_cpu_read() and __this_cpu_write() functions already implement
> checks for the required preemption levels when using
> CONFIG_DEBUG_PREEMPT which gives you nice error messages and such.
> Therefore there is no need to explicitly check this using a BUG_ON() in
> the code (which we don't do for other uses of per cpu variables either).
>
> Signed-off-by: Christoffer Dall <cdall@linaro.org>
> ---
> virt/kvm/arm/arm.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
> index a39a1e1..04313a2 100644
> --- a/virt/kvm/arm/arm.c
> +++ b/virt/kvm/arm/arm.c
> @@ -69,7 +69,6 @@ static DEFINE_PER_CPU(unsigned char, kvm_arm_hardware_enabled);
>
> static void kvm_arm_set_running_vcpu(struct kvm_vcpu *vcpu)
> {
> - BUG_ON(preemptible());
> __this_cpu_write(kvm_arm_running_vcpu, vcpu);
> }
>
> @@ -79,7 +78,6 @@ static void kvm_arm_set_running_vcpu(struct kvm_vcpu *vcpu)
> */
> struct kvm_vcpu *kvm_arm_get_running_vcpu(void)
> {
> - BUG_ON(preemptible());
> return __this_cpu_read(kvm_arm_running_vcpu);
> }
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
M.
--
Jazz is not dead, it just smell funny.
next prev parent reply other threads:[~2017-10-10 10:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 22:19 [PATCH v4 0/7] Handle forwarded level-triggered interrupts Christoffer Dall
2017-09-15 22:19 ` [PATCH v4 1/7] KVM: arm/arm64: Remove redundant preemptible checks Christoffer Dall
2017-10-10 10:06 ` Marc Zyngier [this message]
2017-09-15 22:19 ` [PATCH v4 2/7] KVM: arm/arm64: Factor out functionality to get vgic mmio requester_vcpu Christoffer Dall
2017-10-10 10:27 ` Marc Zyngier
2017-09-15 22:19 ` [PATCH v4 3/7] KVM: arm/arm64: Don't cache the timer IRQ level Christoffer Dall
2017-10-10 10:39 ` Marc Zyngier
2017-10-19 13:05 ` Christoffer Dall
2017-09-15 22:19 ` [PATCH v4 4/7] KVM: arm/arm64: vgic: restructure kvm_vgic_(un)map_phys_irq Christoffer Dall
2017-09-15 22:19 ` [PATCH v4 5/7] KVM: arm/arm64: vgic: Support level-triggered mapped interrupts Christoffer Dall
2017-09-15 22:19 ` [PATCH v4 6/7] KVM: arm/arm64: Provide a vgic interrupt line level sample function Christoffer Dall
2017-09-15 22:19 ` [PATCH v4 7/7] KVM: arm/arm64: Support VGIC dist pend/active changes for mapped IRQs Christoffer Dall
2017-10-10 10:49 ` Marc Zyngier
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=87sheruxkd.fsf@on-the-bus.cambridge.arm.com \
--to=marc.zyngier@arm.com \
--cc=cdall@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox