]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/linux/irqnr.h
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))
26 # define for_each_irq_desc_reverse(irq, desc) \
27 for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \
28 irq--, desc = irq_to_desc(irq))
30 #endif /* CONFIG_GENERIC_HARDIRQS */
32 #define for_each_irq_nr(irq) \
33 for (irq = 0; irq < nr_irqs; irq++)
35 #endif /* __KERNEL__ */