aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2014-11-06 09:20:14 -0500
committerThomas Gleixner <tglx@linutronix.de>2014-11-23 07:01:45 -0500
commitf8264e34965aaf43203912ed8f7b543c00c8d70f (patch)
tree1b037da27ec42cd9a2120f0f6dfb645731fb89ec /include/linux/irq.h
parentd31eb342409b24e3d2e1989c775f3361e93acc08 (diff)
irqdomain: Introduce new interfaces to support hierarchy irqdomains
We plan to use hierarchy irqdomain to suppport CPU vector assignment, interrupt remapping controller, IO-APIC controller, MSI interrupt and hypertransport interrupt etc on x86 platforms. So extend irqdomain interfaces to support hierarchy irqdomain. There are already many clients of current irqdomain interfaces. To minimize the changes, we choose to introduce new version 2 interfaces to support hierarchy instead of extending existing irqdomain interfaces. According to Thomas's suggestion, the most important design decision is to build hierarchy struct irq_data to support hierarchy irqdomain, so hierarchy irqdomain related data could be saved in struct irq_data. With support of hierarchy irq_data, we could also support stacked irq_chips. This is most useful in case of set_affinity(). The new hierarchy irqdomain introduces following interfaces: 1) irq_domain_alloc_irqs()/irq_domain_free_irqs(): allocate/release IRQ and related resources. 2) __irq_domain_alloc_irqs(): a special version to support legacy IRQs. 3) irq_domain_activate_irq()/irq_domain_deactivate_irq(): program interrupt controllers to activate/deactivate interrupt. There are also several help functions to ease irqdomain implemenations: 1) irq_domain_get_irq_data(): get irq_data associated with a specific irqdomain. 2) irq_domain_set_hwirq_and_chip(): save irqdomain specific data into irq_data. 3) irq_domain_alloc_irqs_parent()/irq_domain_free_irqs_parent(): invoke parent irqdomain's alloc/free callbacks. We also changed irq_startup()/irq_shutdown() to invoke irq_domain_activate_irq()/irq_domain_deactivate_irq() to program interrupt controller when start/stop interrupts. [ tglx: Folded parts of the later patch series in ] Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Yingjoe Chen <yingjoe.chen@mediatek.com> Cc: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 03f48d936f66..13ba412ce3a0 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -133,6 +133,8 @@ struct irq_domain;
133 * @chip: low level interrupt hardware access 133 * @chip: low level interrupt hardware access
134 * @domain: Interrupt translation domain; responsible for mapping 134 * @domain: Interrupt translation domain; responsible for mapping
135 * between hwirq number and linux irq number. 135 * between hwirq number and linux irq number.
136 * @parent_data: pointer to parent struct irq_data to support hierarchy
137 * irq_domain
136 * @handler_data: per-IRQ data for the irq_chip methods 138 * @handler_data: per-IRQ data for the irq_chip methods
137 * @chip_data: platform-specific per-chip private data for the chip 139 * @chip_data: platform-specific per-chip private data for the chip
138 * methods, to allow shared chip implementations 140 * methods, to allow shared chip implementations
@@ -151,6 +153,9 @@ struct irq_data {
151 unsigned int state_use_accessors; 153 unsigned int state_use_accessors;
152 struct irq_chip *chip; 154 struct irq_chip *chip;
153 struct irq_domain *domain; 155 struct irq_domain *domain;
156#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
157 struct irq_data *parent_data;
158#endif
154 void *handler_data; 159 void *handler_data;
155 void *chip_data; 160 void *chip_data;
156 struct msi_desc *msi_desc; 161 struct msi_desc *msi_desc;