diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-08-19 23:50:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:52:33 -0400 |
commit | 2c6927a38f65b53b62f86158fba29a068c4e8b6a (patch) | |
tree | 4f23cf5689c8fbaed771219b4afd3f785d8048bc /arch/x86/kernel/io_apic_64.c | |
parent | 9059d8fa4a3a9153da53da890039f7f956cc9d19 (diff) |
irq: replace loop with nr_irqs with for_each_irq_desc
There are a handful of loops that go from 0 to nr_irqs and use
get_irq_desc() on them. These would allocate all the irq_desc
entries, regardless of the need for them.
Use the smarter for_each_irq_desc() iterator that will only iterate
over the present ones.
v2: make sure arch without GENERIC_HARDIRQS work too
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic_64.c')
-rw-r--r-- | arch/x86/kernel/io_apic_64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 51ef7eb75f2e..708be9724daf 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -1871,10 +1871,10 @@ unmask: | |||
1871 | 1871 | ||
1872 | static void ir_irq_migration(struct work_struct *work) | 1872 | static void ir_irq_migration(struct work_struct *work) |
1873 | { | 1873 | { |
1874 | int irq; | 1874 | unsigned int irq; |
1875 | struct irq_desc *desc; | ||
1875 | 1876 | ||
1876 | for (irq = 0; irq < nr_irqs; irq++) { | 1877 | for_each_irq_desc(irq, desc) { |
1877 | struct irq_desc *desc = irq_to_desc(irq); | ||
1878 | if (desc->status & IRQ_MOVE_PENDING) { | 1878 | if (desc->status & IRQ_MOVE_PENDING) { |
1879 | unsigned long flags; | 1879 | unsigned long flags; |
1880 | 1880 | ||