diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-08-19 23:49:57 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:52:07 -0400 |
commit | 5a15d7e85582fa84cbd01c6dcc5d927b43fddff4 (patch) | |
tree | bf06f61efe01f476f513865e65c5d1383fa73d6d /drivers/xen/events.c | |
parent | da27c118eb4f87f27ae8da2635b916daedf7264f (diff) |
drivers/xen: use nr_irqs
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r-- | drivers/xen/events.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index c3290bc186a0..ed8235187dc0 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -139,7 +139,7 @@ static void init_evtchn_cpu_bindings(void) | |||
139 | #ifdef CONFIG_SMP | 139 | #ifdef CONFIG_SMP |
140 | int i; | 140 | int i; |
141 | /* By default all event channels notify CPU#0. */ | 141 | /* By default all event channels notify CPU#0. */ |
142 | for (i = 0; i < NR_IRQS; i++) | 142 | for (i = 0; i < nr_irqs; i++) |
143 | irq_desc[i].affinity = cpumask_of_cpu(0); | 143 | irq_desc[i].affinity = cpumask_of_cpu(0); |
144 | #endif | 144 | #endif |
145 | 145 | ||
@@ -229,12 +229,12 @@ static int find_unbound_irq(void) | |||
229 | int irq; | 229 | int irq; |
230 | 230 | ||
231 | /* Only allocate from dynirq range */ | 231 | /* Only allocate from dynirq range */ |
232 | for (irq = 0; irq < NR_IRQS; irq++) | 232 | for (irq = 0; irq < nr_irqs; irq++) |
233 | if (irq_bindcount[irq] == 0) | 233 | if (irq_bindcount[irq] == 0) |
234 | break; | 234 | break; |
235 | 235 | ||
236 | if (irq == NR_IRQS) | 236 | if (irq == nr_irqs) |
237 | panic("No available IRQ to bind to: increase NR_IRQS!\n"); | 237 | panic("No available IRQ to bind to: increase nr_irqs!\n"); |
238 | 238 | ||
239 | return irq; | 239 | return irq; |
240 | } | 240 | } |
@@ -790,7 +790,7 @@ void xen_irq_resume(void) | |||
790 | mask_evtchn(evtchn); | 790 | mask_evtchn(evtchn); |
791 | 791 | ||
792 | /* No IRQ <-> event-channel mappings. */ | 792 | /* No IRQ <-> event-channel mappings. */ |
793 | for (irq = 0; irq < NR_IRQS; irq++) | 793 | for (irq = 0; irq < nr_irqs; irq++) |
794 | irq_info[irq].evtchn = 0; /* zap event-channel binding */ | 794 | irq_info[irq].evtchn = 0; /* zap event-channel binding */ |
795 | 795 | ||
796 | for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++) | 796 | for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++) |
@@ -822,7 +822,7 @@ void __init xen_init_IRQ(void) | |||
822 | mask_evtchn(i); | 822 | mask_evtchn(i); |
823 | 823 | ||
824 | /* Dynamic IRQ space is currently unbound. Zero the refcnts. */ | 824 | /* Dynamic IRQ space is currently unbound. Zero the refcnts. */ |
825 | for (i = 0; i < NR_IRQS; i++) | 825 | for (i = 0; i < nr_irqs; i++) |
826 | irq_bindcount[i] = 0; | 826 | irq_bindcount[i] = 0; |
827 | 827 | ||
828 | irq_ctx_init(smp_processor_id()); | 828 | irq_ctx_init(smp_processor_id()); |