diff options
Diffstat (limited to 'include/linux/irqnr.h')
-rw-r--r-- | include/linux/irqnr.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 86af92e9e84c..de66e4e10406 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h | |||
@@ -20,11 +20,18 @@ | |||
20 | 20 | ||
21 | # define for_each_irq_desc_reverse(irq, desc) \ | 21 | # define for_each_irq_desc_reverse(irq, desc) \ |
22 | for (irq = nr_irqs - 1; irq >= 0; irq--) | 22 | for (irq = nr_irqs - 1; irq >= 0; irq--) |
23 | |||
23 | #else /* CONFIG_GENERIC_HARDIRQS */ | 24 | #else /* CONFIG_GENERIC_HARDIRQS */ |
24 | 25 | ||
26 | #include <asm/irq_vectors.h> /* need possible max_nr_irqs() */ | ||
27 | |||
25 | extern int nr_irqs; | 28 | extern int nr_irqs; |
26 | extern struct irq_desc *irq_to_desc(unsigned int irq); | 29 | extern struct irq_desc *irq_to_desc(unsigned int irq); |
27 | 30 | ||
31 | # ifndef max_nr_irqs | ||
32 | # define max_nr_irqs(nr_cpus) NR_IRQS | ||
33 | # endif | ||
34 | |||
28 | # define for_each_irq_desc(irq, desc) \ | 35 | # define for_each_irq_desc(irq, desc) \ |
29 | for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \ | 36 | for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \ |
30 | irq++, desc = irq_to_desc(irq)) \ | 37 | irq++, desc = irq_to_desc(irq)) \ |