diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/interrupt.h | 1 | ||||
-rw-r--r-- | include/linux/irq.h | 20 | ||||
-rw-r--r-- | include/linux/irqnr.h | 24 |
3 files changed, 26 insertions, 19 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 58ff4e74b2f3..72fcfcff5637 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/preempt.h> | 8 | #include <linux/preempt.h> |
9 | #include <linux/cpumask.h> | 9 | #include <linux/cpumask.h> |
10 | #include <linux/irqreturn.h> | 10 | #include <linux/irqreturn.h> |
11 | #include <linux/irqnr.h> | ||
11 | #include <linux/hardirq.h> | 12 | #include <linux/hardirq.h> |
12 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
13 | #include <linux/irqflags.h> | 14 | #include <linux/irqflags.h> |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 0618fb362cb4..d058c57be02d 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -11,25 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
13 | 13 | ||
14 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
15 | # define nr_irqs NR_IRQS | ||
16 | |||
17 | # define for_each_irq_desc(irq, desc) \ | ||
18 | for (irq = 0; irq < nr_irqs; irq++) | ||
19 | #else | ||
20 | extern int nr_irqs; | ||
21 | |||
22 | # define for_each_irq_desc(irq, desc) \ | ||
23 | for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++) | ||
24 | |||
25 | # define for_each_irq_desc_reverse(irq, desc) \ | ||
26 | for (irq = nr_irqs -1, desc = irq_desc + (nr_irqs -1 ); \ | ||
27 | irq > 0; irq--, desc--) | ||
28 | #endif | ||
29 | |||
30 | #define for_each_irq_nr(irq) \ | ||
31 | for (irq = 0; irq < nr_irqs; irq++) | ||
32 | |||
33 | #ifndef CONFIG_S390 | 14 | #ifndef CONFIG_S390 |
34 | 15 | ||
35 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
@@ -37,6 +18,7 @@ extern int nr_irqs; | |||
37 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
38 | #include <linux/cpumask.h> | 19 | #include <linux/cpumask.h> |
39 | #include <linux/irqreturn.h> | 20 | #include <linux/irqreturn.h> |
21 | #include <linux/irqnr.h> | ||
40 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
41 | 23 | ||
42 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h new file mode 100644 index 000000000000..3171ddc3b39d --- /dev/null +++ b/include/linux/irqnr.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #ifndef _LINUX_IRQNR_H | ||
2 | #define _LINUX_IRQNR_H | ||
3 | |||
4 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
5 | #include <asm/irq.h> | ||
6 | # define nr_irqs NR_IRQS | ||
7 | |||
8 | # define for_each_irq_desc(irq, desc) \ | ||
9 | for (irq = 0; irq < nr_irqs; irq++) | ||
10 | #else | ||
11 | extern int nr_irqs; | ||
12 | |||
13 | # define for_each_irq_desc(irq, desc) \ | ||
14 | for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++) | ||
15 | |||
16 | # define for_each_irq_desc_reverse(irq, desc) \ | ||
17 | for (irq = nr_irqs -1, desc = irq_desc + (nr_irqs -1 ); \ | ||
18 | irq > 0; irq--, desc--) | ||
19 | #endif | ||
20 | |||
21 | #define for_each_irq_nr(irq) \ | ||
22 | for (irq = 0; irq < nr_irqs; irq++) | ||
23 | |||
24 | #endif | ||