Lines Matching +full:interrupt +full:- +full:map
2 The irq_domain interrupt number mapping library
7 This is simple when there is only one interrupt controller, but in
8 systems with multiple interrupt controllers the kernel must ensure
9 that each one gets assigned non-overlapping allocations of Linux
12 The number of interrupt controllers registered as unique irqchips
15 mechanisms as the IRQ core system by modelling their interrupt
16 handlers as irqchips, i.e. in effect cascading interrupt controllers.
18 Here the interrupt number loose all kind of correspondence to
19 hardware interrupt numbers: whereas in the past, IRQ numbers could
21 interrupt controller (i.e. the component actually fireing the
22 interrupt line to the CPU) nowadays this number is just a number.
24 For this reason we need a mechanism to separate controller-local
25 interrupt numbers, called hardware irq's, from Linux IRQ numbers.
29 the controller-local IRQ (hwirq) number into the Linux IRQ number
34 preferred over interrupt controller drivers open coding their own
44 An interrupt controller driver creates and registers an irq_domain by
55 the hwirq, and call the .map() callback so the driver can perform any
58 When an interrupt is received, irq_find_mapping() function should
67 callbacks) then it can be directly obtained from irq_data->hwirq.
74 Which reverse map type should be used depends on the use case. Each
75 of the reverse map types are described below:
78 ------
85 The linear reverse map maintains a fixed size table indexed by the
89 The Linear map is a good choice when the maximum number of hwirqs is
91 map are fixed time lookup for IRQ numbers, and irq_descs are only
92 allocated for in-use IRQs. The disadvantage is that the table must be
96 equivalent, except for the first argument is different - the former
100 The majority of drivers should use the linear map.
103 ----
110 The irq_domain maintains a radix tree map from hwirq numbers to Linux
114 The tree map is a good choice if the hwirq number can be very large
120 equivalent, except for the first argument is different - the former
126 No Map
127 ------
133 The No Map mapping is to be used when the hwirq number is
137 IRQ number and call the .map() callback so that driver can program the
143 ------
159 The legacy map assumes a contiguous range of IRQ numbers has already
162 visa-versa. The disadvantage is that it requires the interrupt
166 The legacy map should only be used if fixed IRQ mappings must be
167 supported. For example, ISA controllers would use the legacy map for
168 mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ
175 descriptors will be allocated on-the-fly for it, and if no range is
189 --------------------
191 On some architectures, there may be multiple interrupt controllers
192 involved in delivering an interrupt from the device to the target CPU.
193 Let's look at a typical interrupt delivering path on x86 platforms::
195 Device --> IOAPIC -> Interrupt remapping Controller -> Local APIC -> CPU
197 There are three interrupt controllers involved:
200 2) Interrupt remapping controller
205 interrupt controller and those irq_domains are organized into hierarchy.
213 Interrupt Remapping irq_domain (manage irq_remapping entries)
220 1) irq_domain_alloc_irqs(): allocate IRQ descriptors and interrupt
222 2) irq_domain_free_irqs(): free IRQ descriptors and interrupt controller
224 3) irq_domain_activate_irq(): activate interrupt controller hardware to
225 deliver the interrupt.
226 4) irq_domain_deactivate_irq(): deactivate interrupt controller hardware
227 to stop delivering the interrupt.
240 irq_domain structure is built for each interrupt controller, and an
247 With stacked irq_chip, interrupt controller driver only needs to deal
252 For an interrupt controller driver to support hierarchy irq_domain, it
258 3) Optionally implement an irq_chip to manage the interrupt controller
260 4) No need to implement irq_domain_ops.map and irq_domain_ops.unmap,