aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2018-01-17 09:26:47 -0500
committerThomas Gleixner <tglx@linutronix.de>2018-01-24 06:32:58 -0500
commitc5baa1be8f559d5f33c412d00cc1c86762a8bbbf (patch)
tree40c8991b05fc7e7bb8ff4d7de0249f5b7de8e259
parent80023aea83532c59e5a75fcc54b4158e44216c4a (diff)
irqdomain: Kill CONFIG_IRQ_DOMAIN_DEBUG
CONFIG_IRQ_DOMAIN_DEBUG is similar to CONFIG_GENERIC_IRQ_DEBUGFS, just with less information. Spring cleanup time. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Yang Shunyong <shunyong.yang@hxt-semitech.com> Link: https://lkml.kernel.org/r/20180117142647.23622-1-marc.zyngier@arm.com
-rw-r--r--Documentation/IRQ-domain.txt36
-rw-r--r--arch/arm/configs/aspeed_g4_defconfig1
-rw-r--r--arch/arm/configs/aspeed_g5_defconfig1
-rw-r--r--arch/arm/configs/hisi_defconfig1
-rw-r--r--arch/arm/configs/multi_v7_defconfig1
-rw-r--r--arch/arm/configs/mvebu_v7_defconfig1
-rw-r--r--arch/arm/configs/pxa_defconfig1
-rw-r--r--arch/arm/configs/sama5_defconfig1
-rw-r--r--arch/arm/configs/tegra_defconfig1
-rw-r--r--arch/arm/configs/vt8500_v6_v7_defconfig1
-rw-r--r--arch/powerpc/configs/fsl-emb-nonhw.config1
-rw-r--r--arch/powerpc/configs/powernv_defconfig1
-rw-r--r--arch/powerpc/configs/ppc64_defconfig1
-rw-r--r--arch/powerpc/configs/pseries_defconfig1
-rw-r--r--arch/xtensa/configs/audio_kc705_defconfig1
-rw-r--r--arch/xtensa/configs/cadence_csp_defconfig1
-rw-r--r--arch/xtensa/configs/generic_kc705_defconfig1
-rw-r--r--arch/xtensa/configs/nommu_kc705_defconfig1
-rw-r--r--arch/xtensa/configs/smp_lx200_defconfig1
-rw-r--r--kernel/irq/Kconfig10
-rw-r--r--kernel/irq/irqdomain.c118
21 files changed, 2 insertions, 180 deletions
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt
index 4a1cd7645d85..507775cce753 100644
--- a/Documentation/IRQ-domain.txt
+++ b/Documentation/IRQ-domain.txt
@@ -265,37 +265,5 @@ support other architectures, such as ARM, ARM64 etc.
265 265
266=== Debugging === 266=== Debugging ===
267 267
268If you switch on CONFIG_IRQ_DOMAIN_DEBUG (which depends on 268Most of the internals of the IRQ subsystem are exposed in debugfs by
269CONFIG_IRQ_DOMAIN and CONFIG_DEBUG_FS), you will find a new file in 269turning CONFIG_GENERIC_IRQ_DEBUGFS on.
270your debugfs mount point, called irq_domain_mapping. This file
271contains a live snapshot of all the IRQ domains in the system:
272
273 name mapped linear-max direct-max devtree-node
274 pl061 8 8 0 /smb/gpio@e0080000
275 pl061 8 8 0 /smb/gpio@e1050000
276 pMSI 0 0 0 /interrupt-controller@e1101000/v2m@e0080000
277 MSI 37 0 0 /interrupt-controller@e1101000/v2m@e0080000
278 GICv2m 37 0 0 /interrupt-controller@e1101000/v2m@e0080000
279 GICv2 448 448 0 /interrupt-controller@e1101000
280
281it also iterates over the interrupts to display their mapping in the
282domains, and makes the domain stacking visible:
283
284
285irq hwirq chip name chip data active type domain
286 1 0x00019 GICv2 0xffff00000916bfd8 * LINEAR GICv2
287 2 0x0001d GICv2 0xffff00000916bfd8 LINEAR GICv2
288 3 0x0001e GICv2 0xffff00000916bfd8 * LINEAR GICv2
289 4 0x0001b GICv2 0xffff00000916bfd8 * LINEAR GICv2
290 5 0x0001a GICv2 0xffff00000916bfd8 LINEAR GICv2
291[...]
292 96 0x81808 MSI 0x (null) RADIX MSI
293 96+ 0x00063 GICv2m 0xffff8003ee116980 RADIX GICv2m
294 96+ 0x00063 GICv2 0xffff00000916bfd8 LINEAR GICv2
295 97 0x08800 MSI 0x (null) * RADIX MSI
296 97+ 0x00064 GICv2m 0xffff8003ee116980 * RADIX GICv2m
297 97+ 0x00064 GICv2 0xffff00000916bfd8 * LINEAR GICv2
298
299Here, interrupts 1-5 are only using a single domain, while 96 and 97
300are build out of a stack of three domain, each level performing a
301particular function.
diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig
index d23b9d56a88b..95946dee9c77 100644
--- a/arch/arm/configs/aspeed_g4_defconfig
+++ b/arch/arm/configs/aspeed_g4_defconfig
@@ -1,7 +1,6 @@
1CONFIG_KERNEL_XZ=y 1CONFIG_KERNEL_XZ=y
2# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_IRQ_DOMAIN_DEBUG=y
5CONFIG_NO_HZ_IDLE=y 4CONFIG_NO_HZ_IDLE=y
6CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
7CONFIG_LOG_BUF_SHIFT=14 6CONFIG_LOG_BUF_SHIFT=14
diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
index c0ad7b82086b..8c7ea033cdc2 100644
--- a/arch/arm/configs/aspeed_g5_defconfig
+++ b/arch/arm/configs/aspeed_g5_defconfig
@@ -1,7 +1,6 @@
1CONFIG_KERNEL_XZ=y 1CONFIG_KERNEL_XZ=y
2# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_IRQ_DOMAIN_DEBUG=y
5CONFIG_NO_HZ_IDLE=y 4CONFIG_NO_HZ_IDLE=y
6CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
7CONFIG_LOG_BUF_SHIFT=14 6CONFIG_LOG_BUF_SHIFT=14
diff --git a/arch/arm/configs/hisi_defconfig b/arch/arm/configs/hisi_defconfig
index b2e340b272ee..74d611e41e02 100644
--- a/arch/arm/configs/hisi_defconfig
+++ b/arch/arm/configs/hisi_defconfig
@@ -1,4 +1,3 @@
1CONFIG_IRQ_DOMAIN_DEBUG=y
2CONFIG_NO_HZ=y 1CONFIG_NO_HZ=y
3CONFIG_HIGH_RES_TIMERS=y 2CONFIG_HIGH_RES_TIMERS=y
4CONFIG_BLK_DEV_INITRD=y 3CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 61509c4b769f..b659244902cd 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -1,6 +1,5 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_FHANDLE=y 2CONFIG_FHANDLE=y
3CONFIG_IRQ_DOMAIN_DEBUG=y
4CONFIG_NO_HZ=y 3CONFIG_NO_HZ=y
5CONFIG_HIGH_RES_TIMERS=y 4CONFIG_HIGH_RES_TIMERS=y
6CONFIG_CGROUPS=y 5CONFIG_CGROUPS=y
diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index 69553704f2dc..ee61be093633 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -1,6 +1,5 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_FHANDLE=y 2CONFIG_FHANDLE=y
3CONFIG_IRQ_DOMAIN_DEBUG=y
4CONFIG_HIGH_RES_TIMERS=y 3CONFIG_HIGH_RES_TIMERS=y
5CONFIG_LOG_BUF_SHIFT=14 4CONFIG_LOG_BUF_SHIFT=14
6CONFIG_BLK_DEV_INITRD=y 5CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig
index 830e817a028a..837d0c9c8b0e 100644
--- a/arch/arm/configs/pxa_defconfig
+++ b/arch/arm/configs/pxa_defconfig
@@ -1,7 +1,6 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_POSIX_MQUEUE=y 2CONFIG_POSIX_MQUEUE=y
3CONFIG_FHANDLE=y 3CONFIG_FHANDLE=y
4CONFIG_IRQ_DOMAIN_DEBUG=y
5CONFIG_NO_HZ=y 4CONFIG_NO_HZ=y
6CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
7CONFIG_BSD_PROCESS_ACCT=y 6CONFIG_BSD_PROCESS_ACCT=y
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index 6529cb43e0fd..2080025556b5 100644
--- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig
@@ -2,7 +2,6 @@
2# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_FHANDLE=y 4CONFIG_FHANDLE=y
5CONFIG_IRQ_DOMAIN_DEBUG=y
6CONFIG_NO_HZ_IDLE=y 5CONFIG_NO_HZ_IDLE=y
7CONFIG_HIGH_RES_TIMERS=y 6CONFIG_HIGH_RES_TIMERS=y
8CONFIG_LOG_BUF_SHIFT=14 7CONFIG_LOG_BUF_SHIFT=14
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig
index 6678f2929356..c819be04187e 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -1,5 +1,4 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_IRQ_DOMAIN_DEBUG=y
3CONFIG_NO_HZ=y 2CONFIG_NO_HZ=y
4CONFIG_HIGH_RES_TIMERS=y 3CONFIG_HIGH_RES_TIMERS=y
5CONFIG_IKCONFIG=y 4CONFIG_IKCONFIG=y
diff --git a/arch/arm/configs/vt8500_v6_v7_defconfig b/arch/arm/configs/vt8500_v6_v7_defconfig
index 1bfaa7bfc392..9b85326ba287 100644
--- a/arch/arm/configs/vt8500_v6_v7_defconfig
+++ b/arch/arm/configs/vt8500_v6_v7_defconfig
@@ -1,4 +1,3 @@
1CONFIG_IRQ_DOMAIN_DEBUG=y
2CONFIG_NO_HZ=y 1CONFIG_NO_HZ=y
3CONFIG_HIGH_RES_TIMERS=y 2CONFIG_HIGH_RES_TIMERS=y
4CONFIG_BLK_DEV_INITRD=y 3CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/fsl-emb-nonhw.config b/arch/powerpc/configs/fsl-emb-nonhw.config
index cc49c95494da..e0567dc41968 100644
--- a/arch/powerpc/configs/fsl-emb-nonhw.config
+++ b/arch/powerpc/configs/fsl-emb-nonhw.config
@@ -71,7 +71,6 @@ CONFIG_IP_ROUTE_MULTIPATH=y
71CONFIG_IP_ROUTE_VERBOSE=y 71CONFIG_IP_ROUTE_VERBOSE=y
72CONFIG_IP_SCTP=m 72CONFIG_IP_SCTP=m
73CONFIG_IPV6=y 73CONFIG_IPV6=y
74CONFIG_IRQ_DOMAIN_DEBUG=y
75CONFIG_ISO9660_FS=m 74CONFIG_ISO9660_FS=m
76CONFIG_JFFS2_FS_DEBUG=1 75CONFIG_JFFS2_FS_DEBUG=1
77CONFIG_JFFS2_FS=y 76CONFIG_JFFS2_FS=y
diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig
index 4891bbed6258..73dab7a37386 100644
--- a/arch/powerpc/configs/powernv_defconfig
+++ b/arch/powerpc/configs/powernv_defconfig
@@ -4,7 +4,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y
4CONFIG_SYSVIPC=y 4CONFIG_SYSVIPC=y
5CONFIG_POSIX_MQUEUE=y 5CONFIG_POSIX_MQUEUE=y
6CONFIG_AUDIT=y 6CONFIG_AUDIT=y
7CONFIG_IRQ_DOMAIN_DEBUG=y
8CONFIG_NO_HZ=y 7CONFIG_NO_HZ=y
9CONFIG_HIGH_RES_TIMERS=y 8CONFIG_HIGH_RES_TIMERS=y
10CONFIG_TASKSTATS=y 9CONFIG_TASKSTATS=y
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 6ddca80c52c3..5033e630afea 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -1,7 +1,6 @@
1CONFIG_PPC64=y 1CONFIG_PPC64=y
2CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
3CONFIG_POSIX_MQUEUE=y 3CONFIG_POSIX_MQUEUE=y
4CONFIG_IRQ_DOMAIN_DEBUG=y
5CONFIG_NO_HZ=y 4CONFIG_NO_HZ=y
6CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
7CONFIG_TASKSTATS=y 6CONFIG_TASKSTATS=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index bde2cd1005a2..0dd5cf7b566d 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -3,7 +3,6 @@ CONFIG_NR_CPUS=2048
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_POSIX_MQUEUE=y 4CONFIG_POSIX_MQUEUE=y
5CONFIG_AUDIT=y 5CONFIG_AUDIT=y
6CONFIG_IRQ_DOMAIN_DEBUG=y
7CONFIG_NO_HZ=y 6CONFIG_NO_HZ=y
8CONFIG_HIGH_RES_TIMERS=y 7CONFIG_HIGH_RES_TIMERS=y
9CONFIG_TASKSTATS=y 8CONFIG_TASKSTATS=y
diff --git a/arch/xtensa/configs/audio_kc705_defconfig b/arch/xtensa/configs/audio_kc705_defconfig
index 8d16925765cb..2bf964df37ba 100644
--- a/arch/xtensa/configs/audio_kc705_defconfig
+++ b/arch/xtensa/configs/audio_kc705_defconfig
@@ -1,7 +1,6 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_POSIX_MQUEUE=y 2CONFIG_POSIX_MQUEUE=y
3CONFIG_FHANDLE=y 3CONFIG_FHANDLE=y
4CONFIG_IRQ_DOMAIN_DEBUG=y
5CONFIG_NO_HZ_IDLE=y 4CONFIG_NO_HZ_IDLE=y
6CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
7CONFIG_IRQ_TIME_ACCOUNTING=y 6CONFIG_IRQ_TIME_ACCOUNTING=y
diff --git a/arch/xtensa/configs/cadence_csp_defconfig b/arch/xtensa/configs/cadence_csp_defconfig
index f2d3094aa1d1..3221b7053fa3 100644
--- a/arch/xtensa/configs/cadence_csp_defconfig
+++ b/arch/xtensa/configs/cadence_csp_defconfig
@@ -1,7 +1,6 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_POSIX_MQUEUE=y 2CONFIG_POSIX_MQUEUE=y
3CONFIG_USELIB=y 3CONFIG_USELIB=y
4CONFIG_IRQ_DOMAIN_DEBUG=y
5CONFIG_NO_HZ_IDLE=y 4CONFIG_NO_HZ_IDLE=y
6CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
7CONFIG_IRQ_TIME_ACCOUNTING=y 6CONFIG_IRQ_TIME_ACCOUNTING=y
diff --git a/arch/xtensa/configs/generic_kc705_defconfig b/arch/xtensa/configs/generic_kc705_defconfig
index 744adeaf2945..985fa8546e4e 100644
--- a/arch/xtensa/configs/generic_kc705_defconfig
+++ b/arch/xtensa/configs/generic_kc705_defconfig
@@ -1,7 +1,6 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_POSIX_MQUEUE=y 2CONFIG_POSIX_MQUEUE=y
3CONFIG_FHANDLE=y 3CONFIG_FHANDLE=y
4CONFIG_IRQ_DOMAIN_DEBUG=y
5CONFIG_NO_HZ_IDLE=y 4CONFIG_NO_HZ_IDLE=y
6CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
7CONFIG_IRQ_TIME_ACCOUNTING=y 6CONFIG_IRQ_TIME_ACCOUNTING=y
diff --git a/arch/xtensa/configs/nommu_kc705_defconfig b/arch/xtensa/configs/nommu_kc705_defconfig
index 78c2529d0459..624f9b3a3878 100644
--- a/arch/xtensa/configs/nommu_kc705_defconfig
+++ b/arch/xtensa/configs/nommu_kc705_defconfig
@@ -1,7 +1,6 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_POSIX_MQUEUE=y 2CONFIG_POSIX_MQUEUE=y
3CONFIG_FHANDLE=y 3CONFIG_FHANDLE=y
4CONFIG_IRQ_DOMAIN_DEBUG=y
5CONFIG_NO_HZ_IDLE=y 4CONFIG_NO_HZ_IDLE=y
6CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
7CONFIG_IRQ_TIME_ACCOUNTING=y 6CONFIG_IRQ_TIME_ACCOUNTING=y
diff --git a/arch/xtensa/configs/smp_lx200_defconfig b/arch/xtensa/configs/smp_lx200_defconfig
index 14e3ca353ac8..11fed6c06a7c 100644
--- a/arch/xtensa/configs/smp_lx200_defconfig
+++ b/arch/xtensa/configs/smp_lx200_defconfig
@@ -1,7 +1,6 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_POSIX_MQUEUE=y 2CONFIG_POSIX_MQUEUE=y
3CONFIG_FHANDLE=y 3CONFIG_FHANDLE=y
4CONFIG_IRQ_DOMAIN_DEBUG=y
5CONFIG_NO_HZ_IDLE=y 4CONFIG_NO_HZ_IDLE=y
6CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
7CONFIG_IRQ_TIME_ACCOUNTING=y 6CONFIG_IRQ_TIME_ACCOUNTING=y
diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig
index 89e355866450..6fc87ccda1d7 100644
--- a/kernel/irq/Kconfig
+++ b/kernel/irq/Kconfig
@@ -103,16 +103,6 @@ config GENERIC_IRQ_MATRIX_ALLOCATOR
103config GENERIC_IRQ_RESERVATION_MODE 103config GENERIC_IRQ_RESERVATION_MODE
104 bool 104 bool
105 105
106config IRQ_DOMAIN_DEBUG
107 bool "Expose hardware/virtual IRQ mapping via debugfs"
108 depends on IRQ_DOMAIN && DEBUG_FS
109 help
110 This option will show the mapping relationship between hardware irq
111 numbers and Linux irq numbers. The mapping is exposed via debugfs
112 in the file "irq_domain_mapping".
113
114 If you don't know what this means you don't need it.
115
116# Support forced irq threading 106# Support forced irq threading
117config IRQ_FORCED_THREADING 107config IRQ_FORCED_THREADING
118 bool 108 bool
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 62068ad46930..e6a9c36470ee 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -897,124 +897,6 @@ unsigned int irq_find_mapping(struct irq_domain *domain,
897} 897}
898EXPORT_SYMBOL_GPL(irq_find_mapping); 898EXPORT_SYMBOL_GPL(irq_find_mapping);
899 899
900#ifdef CONFIG_IRQ_DOMAIN_DEBUG
901static void virq_debug_show_one(struct seq_file *m, struct irq_desc *desc)
902{
903 struct irq_domain *domain;
904 struct irq_data *data;
905
906 domain = desc->irq_data.domain;
907 data = &desc->irq_data;
908
909 while (domain) {
910 unsigned int irq = data->irq;
911 unsigned long hwirq = data->hwirq;
912 struct irq_chip *chip;
913 bool direct;
914
915 if (data == &desc->irq_data)
916 seq_printf(m, "%5d ", irq);
917 else
918 seq_printf(m, "%5d+ ", irq);
919 seq_printf(m, "0x%05lx ", hwirq);
920
921 chip = irq_data_get_irq_chip(data);
922 seq_printf(m, "%-15s ", (chip && chip->name) ? chip->name : "none");
923
924 seq_printf(m, "0x%p ", irq_data_get_irq_chip_data(data));
925
926 seq_printf(m, " %c ", (desc->action && desc->action->handler) ? '*' : ' ');
927 direct = (irq == hwirq) && (irq < domain->revmap_direct_max_irq);
928 seq_printf(m, "%6s%-8s ",
929 (hwirq < domain->revmap_size) ? "LINEAR" : "RADIX",
930 direct ? "(DIRECT)" : "");
931 seq_printf(m, "%s\n", domain->name);
932#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
933 domain = domain->parent;
934 data = data->parent_data;
935#else
936 domain = NULL;
937#endif
938 }
939}
940
941static int virq_debug_show(struct seq_file *m, void *private)
942{
943 unsigned long flags;
944 struct irq_desc *desc;
945 struct irq_domain *domain;
946 struct radix_tree_iter iter;
947 void __rcu **slot;
948 int i;
949
950 seq_printf(m, " %-16s %-6s %-10s %-10s %s\n",
951 "name", "mapped", "linear-max", "direct-max", "devtree-node");
952 mutex_lock(&irq_domain_mutex);
953 list_for_each_entry(domain, &irq_domain_list, link) {
954 struct device_node *of_node;
955 const char *name;
956
957 int count = 0;
958
959 of_node = irq_domain_get_of_node(domain);
960 if (of_node)
961 name = of_node_full_name(of_node);
962 else if (is_fwnode_irqchip(domain->fwnode))
963 name = container_of(domain->fwnode, struct irqchip_fwid,
964 fwnode)->name;
965 else
966 name = "";
967
968 radix_tree_for_each_slot(slot, &domain->revmap_tree, &iter, 0)
969 count++;
970 seq_printf(m, "%c%-16s %6u %10u %10u %s\n",
971 domain == irq_default_domain ? '*' : ' ', domain->name,
972 domain->revmap_size + count, domain->revmap_size,
973 domain->revmap_direct_max_irq,
974 name);
975 }
976 mutex_unlock(&irq_domain_mutex);
977
978 seq_printf(m, "%-5s %-7s %-15s %-*s %6s %-14s %s\n", "irq", "hwirq",
979 "chip name", (int)(2 * sizeof(void *) + 2), "chip data",
980 "active", "type", "domain");
981
982 for (i = 1; i < nr_irqs; i++) {
983 desc = irq_to_desc(i);
984 if (!desc)
985 continue;
986
987 raw_spin_lock_irqsave(&desc->lock, flags);
988 virq_debug_show_one(m, desc);
989 raw_spin_unlock_irqrestore(&desc->lock, flags);
990 }
991
992 return 0;
993}
994
995static int virq_debug_open(struct inode *inode, struct file *file)
996{
997 return single_open(file, virq_debug_show, inode->i_private);
998}
999
1000static const struct file_operations virq_debug_fops = {
1001 .open = virq_debug_open,
1002 .read = seq_read,
1003 .llseek = seq_lseek,
1004 .release = single_release,
1005};
1006
1007static int __init irq_debugfs_init(void)
1008{
1009 if (debugfs_create_file("irq_domain_mapping", S_IRUGO, NULL,
1010 NULL, &virq_debug_fops) == NULL)
1011 return -ENOMEM;
1012
1013 return 0;
1014}
1015__initcall(irq_debugfs_init);
1016#endif /* CONFIG_IRQ_DOMAIN_DEBUG */
1017
1018/** 900/**
1019 * irq_domain_xlate_onecell() - Generic xlate for direct one cell bindings 901 * irq_domain_xlate_onecell() - Generic xlate for direct one cell bindings
1020 * 902 *