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@eu.citrix.com
Subject: [PATCH v3 4/6] xen/arm: implement gic_irq_enable and gic_irq_disable
Date: Tue, 10 Dec 2013 18:50:54 +0000 [thread overview]
Message-ID: <1386701456-20307-4-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1312101849060.7093@kaball.uk.xensource.com>
Rename gic_irq_startup to gic_irq_enable.
Rename gic_irq_shutdown to gic_irq_disable.
Implement gic_irq_startup and gic_irq_shutdown calling gic_irq_enable
and gic_irq_disable.
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>
Changes in v2:
- no need to read the current GICD_ISENABLER before writing it.
---
xen/arch/arm/gic.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index d736a30..5e60c5a 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -129,19 +129,15 @@ void gic_restore_state(struct vcpu *v)
gic_restore_pending_irqs(v);
}
-static unsigned int gic_irq_startup(struct irq_desc *desc)
+static void gic_irq_enable(struct irq_desc *desc)
{
- uint32_t enabler;
int irq = desc->irq;
/* Enable routing */
- enabler = GICD[GICD_ISENABLER + irq / 32];
- GICD[GICD_ISENABLER + irq / 32] = enabler | (1u << (irq % 32));
-
- return 0;
+ GICD[GICD_ISENABLER + irq / 32] = (1u << (irq % 32));
}
-static void gic_irq_shutdown(struct irq_desc *desc)
+static void gic_irq_disable(struct irq_desc *desc)
{
int irq = desc->irq;
@@ -149,14 +145,15 @@ static void gic_irq_shutdown(struct irq_desc *desc)
GICD[GICD_ICENABLER + irq / 32] = (1u << (irq % 32));
}
-static void gic_irq_enable(struct irq_desc *desc)
+static unsigned int gic_irq_startup(struct irq_desc *desc)
{
-
+ gic_irq_enable(desc);
+ return 0;
}
-static void gic_irq_disable(struct irq_desc *desc)
+static void gic_irq_shutdown(struct irq_desc *desc)
{
-
+ gic_irq_disable(desc);
}
static void gic_irq_ack(struct irq_desc *desc)
--
1.7.10.4
next prev parent reply other threads:[~2013-12-10 18:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 18:49 [PATCH v3 0/6] interrupt handling fixes Stefano Stabellini
2013-12-10 18:50 ` [PATCH v3 1/6] xen/arm: Physical IRQ is not always equal to virtual IRQ Stefano Stabellini
2013-12-10 18:50 ` [PATCH v3 2/6] xen/arm: track the state of guest IRQs Stefano Stabellini
2013-12-11 14:38 ` Ian Campbell
2013-12-11 19:00 ` Stefano Stabellini
2013-12-12 11:55 ` Ian Campbell
2013-12-12 14:55 ` Stefano Stabellini
2013-12-10 18:50 ` [PATCH v3 3/6] xen/arm: do not add a second irq to the LRs if one is already present Stefano Stabellini
2013-12-10 22:06 ` Julien Grall
2013-12-10 18:50 ` Stefano Stabellini [this message]
2013-12-10 21:30 ` [PATCH v3 4/6] xen/arm: implement gic_irq_enable and gic_irq_disable Julien Grall
2013-12-10 18:50 ` [PATCH v3 5/6] xen/arm: Only enable physical IRQs when the guest asks Stefano Stabellini
2013-12-10 21:11 ` Julien Grall
2013-12-11 12:50 ` Stefano Stabellini
2013-12-11 13:34 ` Julien Grall
2013-12-11 13:38 ` Julien Grall
2013-12-11 17:25 ` Stefano Stabellini
2013-12-10 18:50 ` [PATCH v3 6/6] xen/arm: disable a physical IRQ when the guest disables the corresponding IRQ Stefano Stabellini
2013-12-10 22:05 ` Julien Grall
2013-12-10 22:09 ` [PATCH v3 0/6] interrupt handling fixes Julien Grall
2013-12-11 14:19 ` Ian Campbell
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=1386701456-20307-4-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).