5 * Generic irq_desc iterators:
9 #ifndef CONFIG_GENERIC_HARDIRQS
13 * Wrappers for non-genirq architectures:
15 #define nr_irqs NR_IRQS
16 #define irq_to_desc(irq) (&irq_desc[irq])
18 # define for_each_irq_desc(irq, desc) \
19 for (irq = 0; irq < nr_irqs; irq++)
21 # define for_each_irq_desc_reverse(irq, desc) \
22 for (irq = nr_irqs - 1; irq >= 0; irq--)
24 #else /* CONFIG_GENERIC_HARDIRQS */
27 extern struct irq_desc *irq_to_desc(unsigned int irq);
29 # define for_each_irq_desc(irq, desc) \
30 for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
31 irq++, desc = irq_to_desc(irq)) \
37 # define for_each_irq_desc_reverse(irq, desc) \
38 for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \
39 irq--, desc = irq_to_desc(irq)) \
44 #endif /* CONFIG_GENERIC_HARDIRQS */
46 #define for_each_irq_nr(irq) \
47 for (irq = 0; irq < nr_irqs; irq++)
49 #endif /* __KERNEL__ */