All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: julien.grall@citrix.com, Ian.Campbell@citrix.com,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH v11 02/10] xen/arm: move setting GIC_IRQ_GUEST_QUEUED earlier
Date: Fri, 8 Aug 2014 18:13:45 +0100	[thread overview]
Message-ID: <1407518033-10694-2-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1408081806180.2293@kaball.uk.xensource.com>

It makes the code cleaner, especially with the following patches.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/vgic.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index ebfec83..9947e8c 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -321,13 +321,6 @@ void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int irq)
 
     spin_lock_irqsave(&v->arch.vgic.lock, flags);
 
-    if ( !list_empty(&n->inflight) )
-    {
-        set_bit(GIC_IRQ_GUEST_QUEUED, &n->status);
-        gic_raise_inflight_irq(v, irq);
-        goto out;
-    }
-
     /* vcpu offline */
     if ( test_bit(_VPF_down, &v->pause_flags) )
     {
@@ -335,10 +328,17 @@ void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int irq)
         return;
     }
 
+    set_bit(GIC_IRQ_GUEST_QUEUED, &n->status);
+
+    if ( !list_empty(&n->inflight) )
+    {
+        gic_raise_inflight_irq(v, irq);
+        goto out;
+    }
+
     priority = vgic_byte_read(rank->ipriority[REG_RANK_INDEX(8, irq, DABT_WORD)], 0, irq & 0x3);
 
     n->irq = irq;
-    set_bit(GIC_IRQ_GUEST_QUEUED, &n->status);
     n->priority = priority;
 
     /* the irq is enabled */
-- 
1.7.10.4

  parent reply	other threads:[~2014-08-08 17:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 17:12 [PATCH v11 00/10] gic and vgic fixes and improvements Stefano Stabellini
2014-08-08 17:13 ` [PATCH v11 01/10] xen/arm: observe itargets setting in vgic_enable_irqs and vgic_disable_irqs Stefano Stabellini
2014-08-08 17:13 ` Stefano Stabellini [this message]
2014-08-08 17:13 ` [PATCH v11 03/10] xen/arm: inflight irqs during migration Stefano Stabellini
2014-08-08 17:28   ` Julien Grall
2014-08-11 15:23     ` Stefano Stabellini
2014-08-13 15:35       ` Julien Grall
2014-08-08 17:13 ` [PATCH v11 04/10] xen/arm: support irq delivery to vcpu > 0 Stefano Stabellini
2014-08-08 17:13 ` [PATCH v11 05/10] xen/arm: physical irq follow virtual irq Stefano Stabellini
2014-08-13 15:48   ` Julien Grall
2014-08-08 17:13 ` [PATCH v11 06/10] xen: introduce sched_move_irqs Stefano Stabellini
2014-08-08 17:13 ` [PATCH v11 07/10] xen: remove workaround to inject evtchn_irq on irq enable Stefano Stabellini
2014-08-08 17:13 ` [PATCH v11 08/10] xen/arm: take the rank lock before accessing ipriority Stefano Stabellini
2014-08-08 17:13 ` [PATCH v11 09/10] xen: introduce bit access macros for the IRQ line status flags Stefano Stabellini
2014-08-08 17:13 ` [PATCH v11 10/10] xen/arm: make accesses to desc->status flags atomic Stefano Stabellini

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=1407518033-10694-2-git-send-email-stefano.stabellini@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=xen-devel@lists.xensource.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: 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.