xref: /linux/Documentation/core-api/irq/irq-domain.rst (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1e00b0ab8SMauro Carvalho Chehab===============================================
2e00b0ab8SMauro Carvalho ChehabThe irq_domain interrupt number mapping library
3e00b0ab8SMauro Carvalho Chehab===============================================
4e00b0ab8SMauro Carvalho Chehab
5e00b0ab8SMauro Carvalho ChehabThe current design of the Linux kernel uses a single large number
6e00b0ab8SMauro Carvalho Chehabspace where each separate IRQ source is assigned a different number.
7e00b0ab8SMauro Carvalho ChehabThis is simple when there is only one interrupt controller, but in
8e00b0ab8SMauro Carvalho Chehabsystems with multiple interrupt controllers the kernel must ensure
9e00b0ab8SMauro Carvalho Chehabthat each one gets assigned non-overlapping allocations of Linux
10e00b0ab8SMauro Carvalho ChehabIRQ numbers.
11e00b0ab8SMauro Carvalho Chehab
12e00b0ab8SMauro Carvalho ChehabThe number of interrupt controllers registered as unique irqchips
13e00b0ab8SMauro Carvalho Chehabshow a rising tendency: for example subdrivers of different kinds
14e00b0ab8SMauro Carvalho Chehabsuch as GPIO controllers avoid reimplementing identical callback
15e00b0ab8SMauro Carvalho Chehabmechanisms as the IRQ core system by modelling their interrupt
16e00b0ab8SMauro Carvalho Chehabhandlers as irqchips, i.e. in effect cascading interrupt controllers.
17e00b0ab8SMauro Carvalho Chehab
18e00b0ab8SMauro Carvalho ChehabHere the interrupt number loose all kind of correspondence to
19e00b0ab8SMauro Carvalho Chehabhardware interrupt numbers: whereas in the past, IRQ numbers could
20e00b0ab8SMauro Carvalho Chehabbe chosen so they matched the hardware IRQ line into the root
21e00b0ab8SMauro Carvalho Chehabinterrupt controller (i.e. the component actually fireing the
22e00b0ab8SMauro Carvalho Chehabinterrupt line to the CPU) nowadays this number is just a number.
23e00b0ab8SMauro Carvalho Chehab
24e00b0ab8SMauro Carvalho ChehabFor this reason we need a mechanism to separate controller-local
25e00b0ab8SMauro Carvalho Chehabinterrupt numbers, called hardware irq's, from Linux IRQ numbers.
26e00b0ab8SMauro Carvalho Chehab
27e00b0ab8SMauro Carvalho ChehabThe irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of
28e00b0ab8SMauro Carvalho Chehabirq numbers, but they don't provide any support for reverse mapping of
29e00b0ab8SMauro Carvalho Chehabthe controller-local IRQ (hwirq) number into the Linux IRQ number
30e00b0ab8SMauro Carvalho Chehabspace.
31e00b0ab8SMauro Carvalho Chehab
32e00b0ab8SMauro Carvalho ChehabThe irq_domain library adds mapping between hwirq and IRQ numbers on
33e00b0ab8SMauro Carvalho Chehabtop of the irq_alloc_desc*() API.  An irq_domain to manage mapping is
34e00b0ab8SMauro Carvalho Chehabpreferred over interrupt controller drivers open coding their own
35e00b0ab8SMauro Carvalho Chehabreverse mapping scheme.
36e00b0ab8SMauro Carvalho Chehab
37e00b0ab8SMauro Carvalho Chehabirq_domain also implements translation from an abstract irq_fwspec
38e00b0ab8SMauro Carvalho Chehabstructure to hwirq numbers (Device Tree and ACPI GSI so far), and can
39e00b0ab8SMauro Carvalho Chehabbe easily extended to support other IRQ topology data sources.
40e00b0ab8SMauro Carvalho Chehab
41e00b0ab8SMauro Carvalho Chehabirq_domain usage
42e00b0ab8SMauro Carvalho Chehab================
43e00b0ab8SMauro Carvalho Chehab
44e00b0ab8SMauro Carvalho ChehabAn interrupt controller driver creates and registers an irq_domain by
4567196feaSAndy Shevchenkocalling one of the irq_domain_add_*() or irq_domain_create_*() functions
4667196feaSAndy Shevchenko(each mapping method has a different allocator function, more on that later).
4767196feaSAndy ShevchenkoThe function will return a pointer to the irq_domain on success. The caller
4867196feaSAndy Shevchenkomust provide the allocator function with an irq_domain_ops structure.
49e00b0ab8SMauro Carvalho Chehab
50e00b0ab8SMauro Carvalho ChehabIn most cases, the irq_domain will begin empty without any mappings
51e00b0ab8SMauro Carvalho Chehabbetween hwirq and IRQ numbers.  Mappings are added to the irq_domain
52e00b0ab8SMauro Carvalho Chehabby calling irq_create_mapping() which accepts the irq_domain and a
53e00b0ab8SMauro Carvalho Chehabhwirq number as arguments.  If a mapping for the hwirq doesn't already
54e00b0ab8SMauro Carvalho Chehabexist then it will allocate a new Linux irq_desc, associate it with
55e00b0ab8SMauro Carvalho Chehabthe hwirq, and call the .map() callback so the driver can perform any
56e00b0ab8SMauro Carvalho Chehabrequired hardware setup.
57e00b0ab8SMauro Carvalho Chehab
58991007baSMarc ZyngierOnce a mapping has been established, it can be retrieved or used via a
59991007baSMarc Zyngiervariety of methods:
60991007baSMarc Zyngier
61991007baSMarc Zyngier- irq_resolve_mapping() returns a pointer to the irq_desc structure
62991007baSMarc Zyngier  for a given domain and hwirq number, and NULL if there was no
63991007baSMarc Zyngier  mapping.
64991007baSMarc Zyngier- irq_find_mapping() returns a Linux IRQ number for a given domain and
65991007baSMarc Zyngier  hwirq number, and 0 if there was no mapping
66991007baSMarc Zyngier- irq_linear_revmap() is now identical to irq_find_mapping(), and is
67991007baSMarc Zyngier  deprecated
68991007baSMarc Zyngier- generic_handle_domain_irq() handles an interrupt described by a
69991007baSMarc Zyngier  domain and a hwirq number
70991007baSMarc Zyngier
71991007baSMarc ZyngierNote that irq domain lookups must happen in contexts that are
72991007baSMarc Zyngiercompatible with a RCU read-side critical section.
73e00b0ab8SMauro Carvalho Chehab
74e00b0ab8SMauro Carvalho ChehabThe irq_create_mapping() function must be called *at least once*
75e00b0ab8SMauro Carvalho Chehabbefore any call to irq_find_mapping(), lest the descriptor will not
76e00b0ab8SMauro Carvalho Chehabbe allocated.
77e00b0ab8SMauro Carvalho Chehab
78e00b0ab8SMauro Carvalho ChehabIf the driver has the Linux IRQ number or the irq_data pointer, and
79e00b0ab8SMauro Carvalho Chehabneeds to know the associated hwirq number (such as in the irq_chip
80e00b0ab8SMauro Carvalho Chehabcallbacks) then it can be directly obtained from irq_data->hwirq.
81e00b0ab8SMauro Carvalho Chehab
82e00b0ab8SMauro Carvalho ChehabTypes of irq_domain mappings
83e00b0ab8SMauro Carvalho Chehab============================
84e00b0ab8SMauro Carvalho Chehab
85e00b0ab8SMauro Carvalho ChehabThere are several mechanisms available for reverse mapping from hwirq
86e00b0ab8SMauro Carvalho Chehabto Linux irq, and each mechanism uses a different allocation function.
87e00b0ab8SMauro Carvalho ChehabWhich reverse map type should be used depends on the use case.  Each
88e00b0ab8SMauro Carvalho Chehabof the reverse map types are described below:
89e00b0ab8SMauro Carvalho Chehab
90e00b0ab8SMauro Carvalho ChehabLinear
91e00b0ab8SMauro Carvalho Chehab------
92e00b0ab8SMauro Carvalho Chehab
93e00b0ab8SMauro Carvalho Chehab::
94e00b0ab8SMauro Carvalho Chehab
95e00b0ab8SMauro Carvalho Chehab	irq_domain_add_linear()
96e00b0ab8SMauro Carvalho Chehab	irq_domain_create_linear()
97e00b0ab8SMauro Carvalho Chehab
98e00b0ab8SMauro Carvalho ChehabThe linear reverse map maintains a fixed size table indexed by the
99e00b0ab8SMauro Carvalho Chehabhwirq number.  When a hwirq is mapped, an irq_desc is allocated for
100e00b0ab8SMauro Carvalho Chehabthe hwirq, and the IRQ number is stored in the table.
101e00b0ab8SMauro Carvalho Chehab
102e00b0ab8SMauro Carvalho ChehabThe Linear map is a good choice when the maximum number of hwirqs is
103e00b0ab8SMauro Carvalho Chehabfixed and a relatively small number (~ < 256).  The advantages of this
104e00b0ab8SMauro Carvalho Chehabmap are fixed time lookup for IRQ numbers, and irq_descs are only
105e00b0ab8SMauro Carvalho Chehaballocated for in-use IRQs.  The disadvantage is that the table must be
106e00b0ab8SMauro Carvalho Chehabas large as the largest possible hwirq number.
107e00b0ab8SMauro Carvalho Chehab
108e00b0ab8SMauro Carvalho Chehabirq_domain_add_linear() and irq_domain_create_linear() are functionally
109e00b0ab8SMauro Carvalho Chehabequivalent, except for the first argument is different - the former
110e00b0ab8SMauro Carvalho Chehabaccepts an Open Firmware specific 'struct device_node', while the latter
111e00b0ab8SMauro Carvalho Chehabaccepts a more general abstraction 'struct fwnode_handle'.
112e00b0ab8SMauro Carvalho Chehab
113e00b0ab8SMauro Carvalho ChehabThe majority of drivers should use the linear map.
114e00b0ab8SMauro Carvalho Chehab
115e00b0ab8SMauro Carvalho ChehabTree
116e00b0ab8SMauro Carvalho Chehab----
117e00b0ab8SMauro Carvalho Chehab
118e00b0ab8SMauro Carvalho Chehab::
119e00b0ab8SMauro Carvalho Chehab
120e00b0ab8SMauro Carvalho Chehab	irq_domain_add_tree()
121e00b0ab8SMauro Carvalho Chehab	irq_domain_create_tree()
122e00b0ab8SMauro Carvalho Chehab
123e00b0ab8SMauro Carvalho ChehabThe irq_domain maintains a radix tree map from hwirq numbers to Linux
124e00b0ab8SMauro Carvalho ChehabIRQs.  When an hwirq is mapped, an irq_desc is allocated and the
125e00b0ab8SMauro Carvalho Chehabhwirq is used as the lookup key for the radix tree.
126e00b0ab8SMauro Carvalho Chehab
127e00b0ab8SMauro Carvalho ChehabThe tree map is a good choice if the hwirq number can be very large
128e00b0ab8SMauro Carvalho Chehabsince it doesn't need to allocate a table as large as the largest
129e00b0ab8SMauro Carvalho Chehabhwirq number.  The disadvantage is that hwirq to IRQ number lookup is
130e00b0ab8SMauro Carvalho Chehabdependent on how many entries are in the table.
131e00b0ab8SMauro Carvalho Chehab
132e00b0ab8SMauro Carvalho Chehabirq_domain_add_tree() and irq_domain_create_tree() are functionally
133e00b0ab8SMauro Carvalho Chehabequivalent, except for the first argument is different - the former
134e00b0ab8SMauro Carvalho Chehabaccepts an Open Firmware specific 'struct device_node', while the latter
135e00b0ab8SMauro Carvalho Chehabaccepts a more general abstraction 'struct fwnode_handle'.
136e00b0ab8SMauro Carvalho Chehab
137e00b0ab8SMauro Carvalho ChehabVery few drivers should need this mapping.
138e00b0ab8SMauro Carvalho Chehab
139e00b0ab8SMauro Carvalho ChehabNo Map
140e00b0ab8SMauro Carvalho Chehab------
141e00b0ab8SMauro Carvalho Chehab
142e00b0ab8SMauro Carvalho Chehab::
143e00b0ab8SMauro Carvalho Chehab
144e00b0ab8SMauro Carvalho Chehab	irq_domain_add_nomap()
145e00b0ab8SMauro Carvalho Chehab
146e00b0ab8SMauro Carvalho ChehabThe No Map mapping is to be used when the hwirq number is
147e00b0ab8SMauro Carvalho Chehabprogrammable in the hardware.  In this case it is best to program the
148e00b0ab8SMauro Carvalho ChehabLinux IRQ number into the hardware itself so that no mapping is
149e00b0ab8SMauro Carvalho Chehabrequired.  Calling irq_create_direct_mapping() will allocate a Linux
150e00b0ab8SMauro Carvalho ChehabIRQ number and call the .map() callback so that driver can program the
151e00b0ab8SMauro Carvalho ChehabLinux IRQ number into the hardware.
152e00b0ab8SMauro Carvalho Chehab
153991007baSMarc ZyngierMost drivers cannot use this mapping, and it is now gated on the
154991007baSMarc ZyngierCONFIG_IRQ_DOMAIN_NOMAP option. Please refrain from introducing new
155991007baSMarc Zyngierusers of this API.
156e00b0ab8SMauro Carvalho Chehab
157e00b0ab8SMauro Carvalho ChehabLegacy
158e00b0ab8SMauro Carvalho Chehab------
159e00b0ab8SMauro Carvalho Chehab
160e00b0ab8SMauro Carvalho Chehab::
161e00b0ab8SMauro Carvalho Chehab
162e00b0ab8SMauro Carvalho Chehab	irq_domain_add_simple()
163e00b0ab8SMauro Carvalho Chehab	irq_domain_add_legacy()
16467196feaSAndy Shevchenko	irq_domain_create_simple()
165b6e95788SAndy Shevchenko	irq_domain_create_legacy()
166e00b0ab8SMauro Carvalho Chehab
167e00b0ab8SMauro Carvalho ChehabThe Legacy mapping is a special case for drivers that already have a
168e00b0ab8SMauro Carvalho Chehabrange of irq_descs allocated for the hwirqs.  It is used when the
169e00b0ab8SMauro Carvalho Chehabdriver cannot be immediately converted to use the linear mapping.  For
170e00b0ab8SMauro Carvalho Chehabexample, many embedded system board support files use a set of #defines
171e00b0ab8SMauro Carvalho Chehabfor IRQ numbers that are passed to struct device registrations.  In that
172e00b0ab8SMauro Carvalho Chehabcase the Linux IRQ numbers cannot be dynamically assigned and the legacy
173e00b0ab8SMauro Carvalho Chehabmapping should be used.
174e00b0ab8SMauro Carvalho Chehab
175*0ddc5e55SMarc ZyngierAs the name implies, the \*_legacy() functions are deprecated and only
176991007baSMarc Zyngierexist to ease the support of ancient platforms. No new users should be
177*0ddc5e55SMarc Zyngieradded. Same goes for the \*_simple() functions when their use results
178*0ddc5e55SMarc Zyngierin the legacy behaviour.
179991007baSMarc Zyngier
180e00b0ab8SMauro Carvalho ChehabThe legacy map assumes a contiguous range of IRQ numbers has already
181e00b0ab8SMauro Carvalho Chehabbeen allocated for the controller and that the IRQ number can be
182e00b0ab8SMauro Carvalho Chehabcalculated by adding a fixed offset to the hwirq number, and
183e00b0ab8SMauro Carvalho Chehabvisa-versa.  The disadvantage is that it requires the interrupt
184e00b0ab8SMauro Carvalho Chehabcontroller to manage IRQ allocations and it requires an irq_desc to be
185e00b0ab8SMauro Carvalho Chehaballocated for every hwirq, even if it is unused.
186e00b0ab8SMauro Carvalho Chehab
187e00b0ab8SMauro Carvalho ChehabThe legacy map should only be used if fixed IRQ mappings must be
188e00b0ab8SMauro Carvalho Chehabsupported.  For example, ISA controllers would use the legacy map for
189e00b0ab8SMauro Carvalho Chehabmapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ
190e00b0ab8SMauro Carvalho Chehabnumbers.
191e00b0ab8SMauro Carvalho Chehab
19267196feaSAndy ShevchenkoMost users of legacy mappings should use irq_domain_add_simple() or
19367196feaSAndy Shevchenkoirq_domain_create_simple() which will use a legacy domain only if an IRQ range
19467196feaSAndy Shevchenkois supplied by the system and will otherwise use a linear domain mapping.
19567196feaSAndy ShevchenkoThe semantics of this call are such that if an IRQ range is specified then
196e00b0ab8SMauro Carvalho Chehabdescriptors will be allocated on-the-fly for it, and if no range is
19767196feaSAndy Shevchenkospecified it will fall through to irq_domain_add_linear() or
19867196feaSAndy Shevchenkoirq_domain_create_linear() which means *no* irq descriptors will be allocated.
199e00b0ab8SMauro Carvalho Chehab
200e00b0ab8SMauro Carvalho ChehabA typical use case for simple domains is where an irqchip provider
201e00b0ab8SMauro Carvalho Chehabis supporting both dynamic and static IRQ assignments.
202e00b0ab8SMauro Carvalho Chehab
203e00b0ab8SMauro Carvalho ChehabIn order to avoid ending up in a situation where a linear domain is
204e00b0ab8SMauro Carvalho Chehabused and no descriptor gets allocated it is very important to make sure
205e00b0ab8SMauro Carvalho Chehabthat the driver using the simple domain call irq_create_mapping()
206e00b0ab8SMauro Carvalho Chehabbefore any irq_find_mapping() since the latter will actually work
207e00b0ab8SMauro Carvalho Chehabfor the static IRQ assignment case.
208e00b0ab8SMauro Carvalho Chehab
20967196feaSAndy Shevchenkoirq_domain_add_simple() and irq_domain_create_simple() as well as
210b6e95788SAndy Shevchenkoirq_domain_add_legacy() and irq_domain_create_legacy() are functionally
211b6e95788SAndy Shevchenkoequivalent, except for the first argument is different - the former
212b6e95788SAndy Shevchenkoaccepts an Open Firmware specific 'struct device_node', while the latter
213b6e95788SAndy Shevchenkoaccepts a more general abstraction 'struct fwnode_handle'.
214b6e95788SAndy Shevchenko
215e00b0ab8SMauro Carvalho ChehabHierarchy IRQ domain
216e00b0ab8SMauro Carvalho Chehab--------------------
217e00b0ab8SMauro Carvalho Chehab
218e00b0ab8SMauro Carvalho ChehabOn some architectures, there may be multiple interrupt controllers
219e00b0ab8SMauro Carvalho Chehabinvolved in delivering an interrupt from the device to the target CPU.
220e00b0ab8SMauro Carvalho ChehabLet's look at a typical interrupt delivering path on x86 platforms::
221e00b0ab8SMauro Carvalho Chehab
222e00b0ab8SMauro Carvalho Chehab  Device --> IOAPIC -> Interrupt remapping Controller -> Local APIC -> CPU
223e00b0ab8SMauro Carvalho Chehab
224e00b0ab8SMauro Carvalho ChehabThere are three interrupt controllers involved:
225e00b0ab8SMauro Carvalho Chehab
226e00b0ab8SMauro Carvalho Chehab1) IOAPIC controller
227e00b0ab8SMauro Carvalho Chehab2) Interrupt remapping controller
228e00b0ab8SMauro Carvalho Chehab3) Local APIC controller
229e00b0ab8SMauro Carvalho Chehab
230e00b0ab8SMauro Carvalho ChehabTo support such a hardware topology and make software architecture match
231e00b0ab8SMauro Carvalho Chehabhardware architecture, an irq_domain data structure is built for each
232e00b0ab8SMauro Carvalho Chehabinterrupt controller and those irq_domains are organized into hierarchy.
233e00b0ab8SMauro Carvalho ChehabWhen building irq_domain hierarchy, the irq_domain near to the device is
234e00b0ab8SMauro Carvalho Chehabchild and the irq_domain near to CPU is parent. So a hierarchy structure
235e00b0ab8SMauro Carvalho Chehabas below will be built for the example above::
236e00b0ab8SMauro Carvalho Chehab
237e00b0ab8SMauro Carvalho Chehab	CPU Vector irq_domain (root irq_domain to manage CPU vectors)
238e00b0ab8SMauro Carvalho Chehab		^
239e00b0ab8SMauro Carvalho Chehab		|
240e00b0ab8SMauro Carvalho Chehab	Interrupt Remapping irq_domain (manage irq_remapping entries)
241e00b0ab8SMauro Carvalho Chehab		^
242e00b0ab8SMauro Carvalho Chehab		|
243e00b0ab8SMauro Carvalho Chehab	IOAPIC irq_domain (manage IOAPIC delivery entries/pins)
244e00b0ab8SMauro Carvalho Chehab
245e00b0ab8SMauro Carvalho ChehabThere are four major interfaces to use hierarchy irq_domain:
246e00b0ab8SMauro Carvalho Chehab
247e00b0ab8SMauro Carvalho Chehab1) irq_domain_alloc_irqs(): allocate IRQ descriptors and interrupt
248e00b0ab8SMauro Carvalho Chehab   controller related resources to deliver these interrupts.
249e00b0ab8SMauro Carvalho Chehab2) irq_domain_free_irqs(): free IRQ descriptors and interrupt controller
250e00b0ab8SMauro Carvalho Chehab   related resources associated with these interrupts.
251e00b0ab8SMauro Carvalho Chehab3) irq_domain_activate_irq(): activate interrupt controller hardware to
252e00b0ab8SMauro Carvalho Chehab   deliver the interrupt.
253e00b0ab8SMauro Carvalho Chehab4) irq_domain_deactivate_irq(): deactivate interrupt controller hardware
254e00b0ab8SMauro Carvalho Chehab   to stop delivering the interrupt.
255e00b0ab8SMauro Carvalho Chehab
256e00b0ab8SMauro Carvalho ChehabFollowing changes are needed to support hierarchy irq_domain:
257e00b0ab8SMauro Carvalho Chehab
258e00b0ab8SMauro Carvalho Chehab1) a new field 'parent' is added to struct irq_domain; it's used to
259e00b0ab8SMauro Carvalho Chehab   maintain irq_domain hierarchy information.
260e00b0ab8SMauro Carvalho Chehab2) a new field 'parent_data' is added to struct irq_data; it's used to
261e00b0ab8SMauro Carvalho Chehab   build hierarchy irq_data to match hierarchy irq_domains. The irq_data
262e00b0ab8SMauro Carvalho Chehab   is used to store irq_domain pointer and hardware irq number.
263e00b0ab8SMauro Carvalho Chehab3) new callbacks are added to struct irq_domain_ops to support hierarchy
264e00b0ab8SMauro Carvalho Chehab   irq_domain operations.
265e00b0ab8SMauro Carvalho Chehab
266e00b0ab8SMauro Carvalho ChehabWith support of hierarchy irq_domain and hierarchy irq_data ready, an
267e00b0ab8SMauro Carvalho Chehabirq_domain structure is built for each interrupt controller, and an
268e00b0ab8SMauro Carvalho Chehabirq_data structure is allocated for each irq_domain associated with an
269e00b0ab8SMauro Carvalho ChehabIRQ. Now we could go one step further to support stacked(hierarchy)
270e00b0ab8SMauro Carvalho Chehabirq_chip. That is, an irq_chip is associated with each irq_data along
271e00b0ab8SMauro Carvalho Chehabthe hierarchy. A child irq_chip may implement a required action by
272e00b0ab8SMauro Carvalho Chehabitself or by cooperating with its parent irq_chip.
273e00b0ab8SMauro Carvalho Chehab
274e00b0ab8SMauro Carvalho ChehabWith stacked irq_chip, interrupt controller driver only needs to deal
275e00b0ab8SMauro Carvalho Chehabwith the hardware managed by itself and may ask for services from its
276e00b0ab8SMauro Carvalho Chehabparent irq_chip when needed. So we could achieve a much cleaner
277e00b0ab8SMauro Carvalho Chehabsoftware architecture.
278e00b0ab8SMauro Carvalho Chehab
279e00b0ab8SMauro Carvalho ChehabFor an interrupt controller driver to support hierarchy irq_domain, it
280e00b0ab8SMauro Carvalho Chehabneeds to:
281e00b0ab8SMauro Carvalho Chehab
282e00b0ab8SMauro Carvalho Chehab1) Implement irq_domain_ops.alloc and irq_domain_ops.free
283e00b0ab8SMauro Carvalho Chehab2) Optionally implement irq_domain_ops.activate and
284e00b0ab8SMauro Carvalho Chehab   irq_domain_ops.deactivate.
285e00b0ab8SMauro Carvalho Chehab3) Optionally implement an irq_chip to manage the interrupt controller
286e00b0ab8SMauro Carvalho Chehab   hardware.
287e00b0ab8SMauro Carvalho Chehab4) No need to implement irq_domain_ops.map and irq_domain_ops.unmap,
288e00b0ab8SMauro Carvalho Chehab   they are unused with hierarchy irq_domain.
289e00b0ab8SMauro Carvalho Chehab
290e00b0ab8SMauro Carvalho ChehabHierarchy irq_domain is in no way x86 specific, and is heavily used to
291e00b0ab8SMauro Carvalho Chehabsupport other architectures, such as ARM, ARM64 etc.
292e00b0ab8SMauro Carvalho Chehab
293e00b0ab8SMauro Carvalho ChehabDebugging
294e00b0ab8SMauro Carvalho Chehab=========
295e00b0ab8SMauro Carvalho Chehab
296e00b0ab8SMauro Carvalho ChehabMost of the internals of the IRQ subsystem are exposed in debugfs by
297e00b0ab8SMauro Carvalho Chehabturning CONFIG_GENERIC_IRQ_DEBUGFS on.
298