Skip to content

Commit 5328666

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
Documentation: Update IRQ-domain.txt to document irq_domain_mapping
irq_domain_mapping is a rather useful tool to understand how IRqs are mapped in irqdomains, and yet it is not documented anywhere. Let's address this. Signed-off-by: Marc Zyngier <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent a97b852 commit 5328666

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

Documentation/IRQ-domain.txt

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,5 +231,42 @@ needs to:
231231
4) No need to implement irq_domain_ops.map and irq_domain_ops.unmap,
232232
they are unused with hierarchy irq_domain.
233233

234-
Hierarchy irq_domain may also be used to support other architectures,
235-
such as ARM, ARM64 etc.
234+
Hierarchy irq_domain is in no way x86 specific, and is heavily used to
235+
support other architectures, such as ARM, ARM64 etc.
236+
237+
=== Debugging ===
238+
239+
If you switch on CONFIG_IRQ_DOMAIN_DEBUG (which depends on
240+
CONFIG_IRQ_DOMAIN and CONFIG_DEBUG_FS), you will find a new file in
241+
your debugfs mount point, called irq_domain_mapping. This file
242+
contains a live snapshot of all the IRQ domains in the system:
243+
244+
name mapped linear-max direct-max devtree-node
245+
pl061 8 8 0 /smb/gpio@e0080000
246+
pl061 8 8 0 /smb/gpio@e1050000
247+
pMSI 0 0 0 /interrupt-controller@e1101000/v2m@e0080000
248+
MSI 37 0 0 /interrupt-controller@e1101000/v2m@e0080000
249+
GICv2m 37 0 0 /interrupt-controller@e1101000/v2m@e0080000
250+
GICv2 448 448 0 /interrupt-controller@e1101000
251+
252+
it also iterates over the interrupts to display their mapping in the
253+
domains, and makes the domain stacking visible:
254+
255+
256+
irq hwirq chip name chip data active type domain
257+
1 0x00019 GICv2 0xffff00000916bfd8 * LINEAR GICv2
258+
2 0x0001d GICv2 0xffff00000916bfd8 LINEAR GICv2
259+
3 0x0001e GICv2 0xffff00000916bfd8 * LINEAR GICv2
260+
4 0x0001b GICv2 0xffff00000916bfd8 * LINEAR GICv2
261+
5 0x0001a GICv2 0xffff00000916bfd8 LINEAR GICv2
262+
[...]
263+
96 0x81808 MSI 0x (null) RADIX MSI
264+
96+ 0x00063 GICv2m 0xffff8003ee116980 RADIX GICv2m
265+
96+ 0x00063 GICv2 0xffff00000916bfd8 LINEAR GICv2
266+
97 0x08800 MSI 0x (null) * RADIX MSI
267+
97+ 0x00064 GICv2m 0xffff8003ee116980 * RADIX GICv2m
268+
97+ 0x00064 GICv2 0xffff00000916bfd8 * LINEAR GICv2
269+
270+
Here, interrupts 1-5 are only using a single domain, while 96 and 97
271+
are build out of a stack of three domain, each level performing a
272+
particular function.

0 commit comments

Comments
 (0)