[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: IRQ Introduce irq_get_domain
commit 229a9df3f216554ce5ec717b9f468ab539716efc Author: Julien Grall <julien.grall@xxxxxxxxxx> AuthorDate: Tue Apr 22 13:58:41 2014 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Fri May 2 13:14:09 2014 +0100 xen/arm: IRQ Introduce irq_get_domain This function retrieves a domain from an IRQ. It will be used in several places (such as do_IRQ) to avoid duplicated code when multiple action will be supported. Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/arch/arm/irq.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index f3a30bd..26574ca 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -98,6 +98,18 @@ void __cpuinit init_secondary_IRQ(void) BUG_ON(init_local_irq_data() < 0); } +static inline struct domain *irq_get_domain(struct irq_desc *desc) +{ + ASSERT(spin_is_locked(&desc->lock)); + + if ( !(desc->status & IRQ_GUEST) ) + return dom_xen; + + ASSERT(desc->action != NULL); + + return desc->action->dev_id; +} + int request_dt_irq(const struct dt_irq *irq, void (*handler)(int, void *, struct cpu_user_regs *), const char *devname, void *dev_id) @@ -156,7 +168,7 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, int is_fiq) if ( desc->status & IRQ_GUEST ) { - struct domain *d = action->dev_id; + struct domain *d = irq_get_domain(desc); desc->handler->end(desc); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |