4 #include <uapi/linux/irqnr.h>
7 #ifndef CONFIG_GENERIC_HARDIRQS
11 * Wrappers for non-genirq architectures:
13 #define nr_irqs NR_IRQS
14 #define irq_to_desc(irq) (&irq_desc[irq])
16 # define for_each_irq_desc(irq, desc) \
17 for (irq = 0; irq < nr_irqs; irq++)
19 # define for_each_irq_desc_reverse(irq, desc) \
20 for (irq = nr_irqs - 1; irq >= 0; irq--)
22 #else /* CONFIG_GENERIC_HARDIRQS */
25 extern struct irq_desc
*irq_to_desc(unsigned int irq
);
26 unsigned int irq_get_next_irq(unsigned int offset
);
28 # define for_each_irq_desc(irq, desc) \
29 for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
30 irq++, desc = irq_to_desc(irq)) \
36 # define for_each_irq_desc_reverse(irq, desc) \
37 for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \
38 irq--, desc = irq_to_desc(irq)) \
44 #define irq_node(irq) (irq_get_irq_data(irq)->node)
46 #define irq_node(irq) 0
49 # define for_each_active_irq(irq) \
50 for (irq = irq_get_next_irq(0); irq < nr_irqs; \
51 irq = irq_get_next_irq(irq + 1))
53 #endif /* CONFIG_GENERIC_HARDIRQS */
55 #define for_each_irq_nr(irq) \
56 for (irq = 0; irq < nr_irqs; irq++)