aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-07-26 05:19:06 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-07-28 03:32:04 -0400
commit08a543ad33fc188650801bd36eed4ffe272643e1 (patch)
treecf2b41b922e77190425f999c2268f1558dd52d18 /include/linux/irq.h
parent5fd1a2ed0ec6fb5449c71a988cc15edb8671b3d0 (diff)
irq: add irq_domain translation infrastructure
This patch adds irq_domain infrastructure for translating from hardware irq numbers to linux irqs. This is particularly important for architectures adding device tree support because the current implementation (excluding PowerPC and SPARC) cannot handle translation for more than a single interrupt controller. irq_domain supports device tree translation for any number of interrupt controllers. This patch converts x86, Microblaze, ARM and MIPS to use irq_domain for device tree irq translation. x86 is untested beyond compiling it, irq_domain is enabled for MIPS and Microblaze, but the old behaviour is preserved until the core code is modified to actually register an irq_domain yet. On ARM it works and is required for much of the new ARM device tree board support. PowerPC has /not/ been converted to use this new infrastructure. It is still missing some features before it can replace the virq infrastructure already in powerpc (see documentation on irq_domain_map/unmap for details). Followup patches will add the missing pieces and migrate PowerPC to use irq_domain. SPARC has its own method of managing interrupts from the device tree and is unaffected by this change. Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 5f695041090c..87a06f345bd2 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -108,14 +108,18 @@ enum {
108}; 108};
109 109
110struct msi_desc; 110struct msi_desc;
111struct irq_domain;
111 112
112/** 113/**
113 * struct irq_data - per irq and irq chip data passed down to chip functions 114 * struct irq_data - per irq and irq chip data passed down to chip functions
114 * @irq: interrupt number 115 * @irq: interrupt number
116 * @hwirq: hardware interrupt number, local to the interrupt domain
115 * @node: node index useful for balancing 117 * @node: node index useful for balancing
116 * @state_use_accessors: status information for irq chip functions. 118 * @state_use_accessors: status information for irq chip functions.
117 * Use accessor functions to deal with it 119 * Use accessor functions to deal with it
118 * @chip: low level interrupt hardware access 120 * @chip: low level interrupt hardware access
121 * @domain: Interrupt translation domain; responsible for mapping
122 * between hwirq number and linux irq number.
119 * @handler_data: per-IRQ data for the irq_chip methods 123 * @handler_data: per-IRQ data for the irq_chip methods
120 * @chip_data: platform-specific per-chip private data for the chip 124 * @chip_data: platform-specific per-chip private data for the chip
121 * methods, to allow shared chip implementations 125 * methods, to allow shared chip implementations
@@ -128,9 +132,11 @@ struct msi_desc;
128 */ 132 */
129struct irq_data { 133struct irq_data {
130 unsigned int irq; 134 unsigned int irq;
135 unsigned long hwirq;
131 unsigned int node; 136 unsigned int node;
132 unsigned int state_use_accessors; 137 unsigned int state_use_accessors;
133 struct irq_chip *chip; 138 struct irq_chip *chip;
139 struct irq_domain *domain;
134 void *handler_data; 140 void *handler_data;
135 void *chip_data; 141 void *chip_data;
136 struct msi_desc *msi_desc; 142 struct msi_desc *msi_desc;