aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-03-29 16:10:30 -0400
committerGrant Likely <grant.likely@secretlab.ca>2012-03-29 16:31:02 -0400
commit092b2fb0766e7a0bf2e50d9cdd7d3b6bb5d12e19 (patch)
treedafeb26d9e12262c602469a2bc7e5484ab1ce188
parentb5174fa3a7f4f8f150bfa3b917c92608953dfa0f (diff)
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 <grant.likely@secretlab.ca>
-rw-r--r--arch/powerpc/Kconfig.debug10
-rw-r--r--kernel/irq/Kconfig10
-rw-r--r--kernel/irq/irqdomain.c8
3 files changed, 14 insertions, 14 deletions
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 72d55dbc6119..e5f26890a69e 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -114,16 +114,6 @@ config DEBUGGER
114 depends on KGDB || XMON 114 depends on KGDB || XMON
115 default y 115 default y
116 116
117config 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
127config BDI_SWITCH 117config BDI_SWITCH
128 bool "Include BDI-2000 user context switcher" 118 bool "Include BDI-2000 user context switcher"
129 depends on DEBUG_KERNEL && PPC32 119 depends on DEBUG_KERNEL && PPC32
diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig
index 5a38bf4de641..d8e323d12496 100644
--- a/kernel/irq/Kconfig
+++ b/kernel/irq/Kconfig
@@ -56,6 +56,16 @@ config GENERIC_IRQ_CHIP
56config IRQ_DOMAIN 56config IRQ_DOMAIN
57 bool 57 bool
58 58
59config 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
59# Support forced irq threading 69# Support forced irq threading
60config IRQ_FORCED_THREADING 70config IRQ_FORCED_THREADING
61 bool 71 bool
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index af48e59bc2ff..3601f3fbf67c 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -632,7 +632,7 @@ unsigned int irq_linear_revmap(struct irq_domain *domain,
632 return revmap[hwirq]; 632 return revmap[hwirq];
633} 633}
634 634
635#ifdef CONFIG_VIRQ_DEBUG 635#ifdef CONFIG_IRQ_DOMAIN_DEBUG
636static int virq_debug_show(struct seq_file *m, void *private) 636static int virq_debug_show(struct seq_file *m, void *private)
637{ 637{
638 unsigned long flags; 638 unsigned long flags;
@@ -668,7 +668,7 @@ static int virq_debug_show(struct seq_file *m, void *private)
668 data = irq_desc_get_chip_data(desc); 668 data = irq_desc_get_chip_data(desc);
669 seq_printf(m, "0x%16p ", data); 669 seq_printf(m, "0x%16p ", data);
670 670
671 if (desc->irq_data.domain->of_node) 671 if (desc->irq_data.domain && desc->irq_data.domain->of_node)
672 p = desc->irq_data.domain->of_node->full_name; 672 p = desc->irq_data.domain->of_node->full_name;
673 else 673 else
674 p = none; 674 p = none;
@@ -695,14 +695,14 @@ static const struct file_operations virq_debug_fops = {
695 695
696static int __init irq_debugfs_init(void) 696static int __init irq_debugfs_init(void)
697{ 697{
698 if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root, 698 if (debugfs_create_file("irq_domain_mapping", S_IRUGO, NULL,
699 NULL, &virq_debug_fops) == NULL) 699 NULL, &virq_debug_fops) == NULL)
700 return -ENOMEM; 700 return -ENOMEM;
701 701
702 return 0; 702 return 0;
703} 703}
704__initcall(irq_debugfs_init); 704__initcall(irq_debugfs_init);
705#endif /* CONFIG_VIRQ_DEBUG */ 705#endif /* CONFIG_IRQ_DOMAIN_DEBUG */
706 706
707int irq_domain_simple_map(struct irq_domain *d, unsigned int irq, 707int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
708 irq_hw_number_t hwirq) 708 irq_hw_number_t hwirq)