Skip to content

Commit 092b2fb

Browse files
committed
irqdomain: Remove powerpc dependency from debugfs file
The debugfs code is really generic for all platforms. This patch removes the powerpc-specific directory reference and makes it available to all architectures. Signed-off-by: Grant Likely <[email protected]>
1 parent b5174fa commit 092b2fb

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

arch/powerpc/Kconfig.debug

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,6 @@ config DEBUGGER
114114
depends on KGDB || XMON
115115
default y
116116

117-
config VIRQ_DEBUG
118-
bool "Expose hardware/virtual IRQ mapping via debugfs"
119-
depends on DEBUG_FS
120-
help
121-
This option will show the mapping relationship between hardware irq
122-
numbers and virtual irq numbers. The mapping is exposed via debugfs
123-
in the file powerpc/virq_mapping.
124-
125-
If you don't know what this means you don't need it.
126-
127117
config BDI_SWITCH
128118
bool "Include BDI-2000 user context switcher"
129119
depends on DEBUG_KERNEL && PPC32

kernel/irq/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ config GENERIC_IRQ_CHIP
5656
config IRQ_DOMAIN
5757
bool
5858

59+
config IRQ_DOMAIN_DEBUG
60+
bool "Expose hardware/virtual IRQ mapping via debugfs"
61+
depends on IRQ_DOMAIN && DEBUG_FS
62+
help
63+
This option will show the mapping relationship between hardware irq
64+
numbers and Linux irq numbers. The mapping is exposed via debugfs
65+
in the file "virq_mapping".
66+
67+
If you don't know what this means you don't need it.
68+
5969
# Support forced irq threading
6070
config IRQ_FORCED_THREADING
6171
bool

kernel/irq/irqdomain.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ unsigned int irq_linear_revmap(struct irq_domain *domain,
632632
return revmap[hwirq];
633633
}
634634

635-
#ifdef CONFIG_VIRQ_DEBUG
635+
#ifdef CONFIG_IRQ_DOMAIN_DEBUG
636636
static int virq_debug_show(struct seq_file *m, void *private)
637637
{
638638
unsigned long flags;
@@ -668,7 +668,7 @@ static int virq_debug_show(struct seq_file *m, void *private)
668668
data = irq_desc_get_chip_data(desc);
669669
seq_printf(m, "0x%16p ", data);
670670

671-
if (desc->irq_data.domain->of_node)
671+
if (desc->irq_data.domain && desc->irq_data.domain->of_node)
672672
p = desc->irq_data.domain->of_node->full_name;
673673
else
674674
p = none;
@@ -695,14 +695,14 @@ static const struct file_operations virq_debug_fops = {
695695

696696
static int __init irq_debugfs_init(void)
697697
{
698-
if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
698+
if (debugfs_create_file("irq_domain_mapping", S_IRUGO, NULL,
699699
NULL, &virq_debug_fops) == NULL)
700700
return -ENOMEM;
701701

702702
return 0;
703703
}
704704
__initcall(irq_debugfs_init);
705-
#endif /* CONFIG_VIRQ_DEBUG */
705+
#endif /* CONFIG_IRQ_DOMAIN_DEBUG */
706706

707707
int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
708708
irq_hw_number_t hwirq)

0 commit comments

Comments
 (0)