[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC v2 16/16] gic: separate ppi processing
From: Andrii Anisov <andrii_anisov@xxxxxxxx> PPI are pcpu private, so their processing is not concurrent and do not need pcpu shared flags and correspondent lockings. So avoid odd bits sets, checks and locks. Signed-off-by: Andrii Anisov <andrii_anisov@xxxxxxxx> --- xen/arch/arm/gic.c | 8 ++++++-- xen/arch/arm/irq.c | 32 ++++++++++++++++++++++++++++++++ xen/include/asm-arm/irq.h | 1 + 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index ecaa3d6..d558059 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -403,8 +403,7 @@ void gic_interrupt(struct cpu_user_regs *regs, int is_fiq) do { /* Reading IRQ will ACK it */ irq = gic_hw_ops->read_irq(); - - if ( likely(irq >= 16 && irq < 1020) ) + if ( likely(irq >= 32 && irq < 1020) ) { isb(); do_IRQ(regs, irq, is_fiq); @@ -422,6 +421,11 @@ void gic_interrupt(struct cpu_user_regs *regs, int is_fiq) { do_sgi(regs, irq); } + else if ( irq < 32 ) + { + isb(); + do_ppi(regs, irq); + } else { local_irq_disable(); diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index c81b490..5884d6c 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -290,6 +290,38 @@ out_no_end: irq_exit(); } +void do_ppi(struct cpu_user_regs *regs, unsigned int irq) +{ + struct irq_desc *desc = irq_to_desc(irq); + struct irqaction *action; + + irq_enter(); + + desc->handler->ack(desc); + + if ( unlikely(!desc->action) ) + { + printk("Unknown %s %#3.3x\n", + "IRQ", irq); + goto out; + } + + if ( test_bit(_IRQ_DISABLED, &desc->status) ) + goto out; + + action = desc->action; + + do + { + action->handler(irq, action->dev_id, regs); + action = action->next; + } while ( action ); + +out: + desc->handler->end(desc); + irq_exit(); +} + void release_irq(unsigned int irq, const void *dev_id) { struct irq_desc *desc; diff --git a/xen/include/asm-arm/irq.h b/xen/include/asm-arm/irq.h index 4f1ef3c..3143468 100644 --- a/xen/include/asm-arm/irq.h +++ b/xen/include/asm-arm/irq.h @@ -62,6 +62,7 @@ struct irq_desc *__irq_to_desc(int irq); #define irq_to_desc(irq) __irq_to_desc(irq) void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, int is_fiq); +void do_ppi(struct cpu_user_regs *regs, unsigned int irq); #ifdef CONFIG_GICV3 static inline bool is_lpi(unsigned int irq) -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |