diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-08-19 20:50:12 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 16:52:33 +0200 |
commit | c7fb03a475bd80c642c1345d85c7c550f63514b8 (patch) | |
tree | 575978fa259a52209f00d5bfaacb4d162caef0d3 /include/linux/interrupt.h | |
parent | 2c6927a38f65b53b62f86158fba29a068c4e8b6a (diff) | |
download | op-kernel-dev-c7fb03a475bd80c642c1345d85c7c550f63514b8.zip op-kernel-dev-c7fb03a475bd80c642c1345d85c7c550f63514b8.tar.gz |
irq, fs/proc: replace loop with nr_irqs for proc/stat
Replace another nr_irqs loop to avoid the allocation of all sparse
irq entries - use for_each_irq_desc instead.
v2: make sure arch without GENERIC_HARDIRQS works too
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r-- | include/linux/interrupt.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5118038..d4039a0 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -17,6 +17,11 @@ extern int nr_irqs; +#ifndef CONFIG_GENERIC_HARDIRQS +#define for_each_irq_desc(irq, desc) \ + for (irq = 0; irq < nr_irqs; irq++) +#endif + /* * These correspond to the IORESOURCE_IRQ_* defines in * linux/ioport.h to select the interrupt line behaviour. When |