]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
irqdomain: Remove powerpc dependency from debugfs file
authorGrant Likely <grant.likely@secretlab.ca>
Thu, 29 Mar 2012 20:10:30 +0000 (14:10 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 29 Mar 2012 20:31:02 +0000 (14:31 -0600)
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>
arch/powerpc/Kconfig.debug
kernel/irq/Kconfig
kernel/irq/irqdomain.c

index 72d55dbc6119d6b4370d6b79df8b223799934b70..e5f26890a69e01e5a5f1c4a3008f9abb49060879 100644 (file)
@@ -114,16 +114,6 @@ config DEBUGGER
        depends on KGDB || XMON
        default y
 
-config VIRQ_DEBUG
-       bool "Expose hardware/virtual IRQ mapping via debugfs"
-       depends on DEBUG_FS
-       help
-         This option will show the mapping relationship between hardware irq
-         numbers and virtual irq numbers. The mapping is exposed via debugfs
-         in the file powerpc/virq_mapping.
-
-         If you don't know what this means you don't need it.
-
 config BDI_SWITCH
        bool "Include BDI-2000 user context switcher"
        depends on DEBUG_KERNEL && PPC32
index 5a38bf4de641d249ddc590d4397e6b96e8fbfbef..d8e323d12496c558065d42b356454fa0e4f55eba 100644 (file)
@@ -56,6 +56,16 @@ config GENERIC_IRQ_CHIP
 config IRQ_DOMAIN
        bool
 
+config IRQ_DOMAIN_DEBUG
+       bool "Expose hardware/virtual IRQ mapping via debugfs"
+       depends on IRQ_DOMAIN && DEBUG_FS
+       help
+         This option will show the mapping relationship between hardware irq
+         numbers and Linux irq numbers. The mapping is exposed via debugfs
+         in the file "virq_mapping".
+
+         If you don't know what this means you don't need it.
+
 # Support forced irq threading
 config IRQ_FORCED_THREADING
        bool
index af48e59bc2ff4ebd46b08bc9898e328540039cc2..3601f3fbf67c8808cb0223206713b1d1aeeb31bb 100644 (file)
@@ -632,7 +632,7 @@ unsigned int irq_linear_revmap(struct irq_domain *domain,
        return revmap[hwirq];
 }
 
-#ifdef CONFIG_VIRQ_DEBUG
+#ifdef CONFIG_IRQ_DOMAIN_DEBUG
 static int virq_debug_show(struct seq_file *m, void *private)
 {
        unsigned long flags;
@@ -668,7 +668,7 @@ static int virq_debug_show(struct seq_file *m, void *private)
                        data = irq_desc_get_chip_data(desc);
                        seq_printf(m, "0x%16p  ", data);
 
-                       if (desc->irq_data.domain->of_node)
+                       if (desc->irq_data.domain && desc->irq_data.domain->of_node)
                                p = desc->irq_data.domain->of_node->full_name;
                        else
                                p = none;
@@ -695,14 +695,14 @@ static const struct file_operations virq_debug_fops = {
 
 static int __init irq_debugfs_init(void)
 {
-       if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
+       if (debugfs_create_file("irq_domain_mapping", S_IRUGO, NULL,
                                 NULL, &virq_debug_fops) == NULL)
                return -ENOMEM;
 
        return 0;
 }
 __initcall(irq_debugfs_init);
-#endif /* CONFIG_VIRQ_DEBUG */
+#endif /* CONFIG_IRQ_DOMAIN_DEBUG */
 
 int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
                          irq_hw_number_t hwirq)