5 * Generic irq_desc iterators:
9 #ifndef CONFIG_GENERIC_HARDIRQS
11 # define nr_irqs NR_IRQS
13 # define for_each_irq_desc(irq, desc) \
14 for (irq = 0; irq < nr_irqs; irq++)
16 # define for_each_irq_desc_reverse(irq, desc) \
17 for (irq = nr_irqs - 1; irq >= 0; irq--)
18 #else /* CONFIG_GENERIC_HARDIRQS */
21 extern struct irq_desc *irq_to_desc(unsigned int irq);
23 # define for_each_irq_desc(irq, desc) \
24 for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
25 irq++, desc = irq_to_desc(irq)) \
29 # define for_each_irq_desc_reverse(irq, desc) \
30 for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \
31 irq--, desc = irq_to_desc(irq)) \
34 #endif /* CONFIG_GENERIC_HARDIRQS */
36 #define for_each_irq_nr(irq) \
37 for (irq = 0; irq < nr_irqs; irq++)
39 #endif /* __KERNEL__ */