]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/irq.h
fat: split include/msdos_fs.h
[linux-2.6-omap-h63xx.git] / include / linux / irq.h
index 2445d2b3d5dc21638c8c57de6ff6f54cdb8a0bb0..d058c57be02d3508e27382e63980bfb593658649 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/spinlock.h>
 #include <linux/cpumask.h>
 #include <linux/irqreturn.h>
+#include <linux/irqnr.h>
 #include <linux/errno.h>
 
 #include <asm/irq.h>
@@ -127,8 +128,6 @@ struct irq_chip {
        const char      *typename;
 };
 
-struct timer_rand_state;
-struct irq_2_iommu;
 /**
  * struct irq_desc - interrupt descriptor
  *
@@ -155,18 +154,6 @@ struct irq_2_iommu;
  */
 struct irq_desc {
        unsigned int            irq;
-#ifdef CONFIG_HAVE_SPARSE_IRQ
-       struct irq_desc         *next;
-       struct timer_rand_state *timer_rand_state;
-#endif
-#ifdef CONFIG_HAVE_DYN_ARRAY
-       unsigned int            *kstat_irqs;
-#else
-       unsigned int            kstat_irqs[NR_CPUS];
-#endif
-#if defined(CONFIG_INTR_REMAP) && defined(CONFIG_HAVE_SPARSE_IRQ)
-       struct irq_2_iommu      *irq_2_iommu;
-#endif
        irq_flow_handler_t      handle_irq;
        struct irq_chip         *chip;
        struct msi_desc         *msi_desc;
@@ -194,33 +181,13 @@ struct irq_desc {
        const char              *name;
 } ____cacheline_internodealigned_in_smp;
 
-extern struct irq_desc *irq_to_desc(unsigned int irq);
-extern struct irq_desc *irq_to_desc_alloc(unsigned int irq);
-
-#ifndef CONFIG_HAVE_SPARSE_IRQ
 
-#ifndef CONFIG_HAVE_DYN_ARRAY
-/* could be removed if we get rid of all irq_desc reference */
 extern struct irq_desc irq_desc[NR_IRQS];
-#else
-extern struct irq_desc *irq_desc;
-#endif
 
-#ifdef CONFIG_GENERIC_HARDIRQS
-#define for_each_irq_desc(irq, desc)           \
-       for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc = &irq_desc[irq])
-#endif
-
-#else
-
-extern struct irq_desc *sparse_irqs;
-#define for_each_irq_desc(irqX, desc)          \
-       for (desc = sparse_irqs, irqX = desc->irq; desc; desc = desc->next, irqX = desc ? desc->irq : -1U)
-
-#endif
-
-#define kstat_irqs_this_cpu(DESC) \
-       ((DESC)->kstat_irqs[smp_processor_id()])
+static inline struct irq_desc *irq_to_desc(unsigned int irq)
+{
+       return (irq < nr_irqs) ? irq_desc + irq : NULL;
+}
 
 /*
  * Migration helpers for obsolete names, they will go away: