Now we already support hierarchy irq_datas, so introduce several helpers to support stacked irq_chips. Signed-off-by: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx> --- include/linux/irq.h | 5 +++++ kernel/irq/chip.c | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/include/linux/irq.h b/include/linux/irq.h index 4b74565690ce..bfa027f6814a 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -433,6 +433,11 @@ extern void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc); extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); extern void handle_nested_irq(unsigned int irq); +#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY +extern void irq_chip_ack_parent(struct irq_data *data); +extern int irq_chip_retrigger_hierarchy(struct irq_data *data); +#endif + /* Handling of unhandled and spurious interrupts: */ extern void note_interrupt(unsigned int irq, struct irq_desc *desc, irqreturn_t action_ret); diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 46bd5e2190c3..b8ee27efde73 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -821,3 +821,21 @@ void irq_cpu_offline(void) raw_spin_unlock_irqrestore(&desc->lock, flags); } } + +#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY +void irq_chip_ack_parent(struct irq_data *data) +{ + data = data->parent_data; + if (data && data->chip && data->chip->irq_ack) + data->chip->irq_ack(data); +} + +int irq_chip_retrigger_hierarchy(struct irq_data *data) +{ + for (data = data->parent_data; data; data = data->parent_data) + if (data->chip && data->chip->irq_retrigger) + return data->chip->irq_retrigger(data); + + return -ENOSYS; +} +#endif -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html