diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2015-06-01 16:05:10 +0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-06-12 16:54:21 +0200 |
commit | 7bbf1dd24b17b9ec4f47c43ce4e05bf190745553 (patch) | |
tree | 1d3d28e47c6ce5a8e0ea9f66ac816e40a7ed7c36 /include/linux/irqdesc.h | |
parent | 0a4377de305684c883bf90ad21e3cbdeead70f5c (diff) | |
download | linux-stable-7bbf1dd24b17b9ec4f47c43ce4e05bf190745553.tar.gz linux-stable-7bbf1dd24b17b9ec4f47c43ce4e05bf190745553.tar.bz2 linux-stable-7bbf1dd24b17b9ec4f47c43ce4e05bf190745553.zip |
genirq: Enhance irq_data_to_desc() to support hierarchy irqdomain
For irq associated with hierarchy irqdomains, there will be multiple
irq_datas for one irq_desc. So enhance irq_data_to_desc() to support
hierarchy irqdomain. Also export irq_data_to_desc() as an inline
function for later reuse.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1433145945-789-2-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irqdesc.h')
-rw-r--r-- | include/linux/irqdesc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index dd1109fb241e..a113a8dc7438 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -93,6 +93,15 @@ struct irq_desc { extern struct irq_desc irq_desc[NR_IRQS]; #endif +static inline struct irq_desc *irq_data_to_desc(struct irq_data *data) +{ +#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY + return irq_to_desc(data->irq); +#else + return container_of(data, struct irq_desc, irq_data); +#endif +} + static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) { return &desc->irq_data; |