diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-10-16 14:19:04 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 16:53:30 +0200 |
commit | 10e580842ec8e53dddf62e1ab1871f4906477376 (patch) | |
tree | 5793b45755f21f578ff4b06a3a3546b3de5eb8f4 /drivers/xen | |
parent | 2be3b52a5785a6a5c5349fbd315f57595f7074be (diff) | |
download | op-kernel-dev-10e580842ec8e53dddf62e1ab1871f4906477376.zip op-kernel-dev-10e580842ec8e53dddf62e1ab1871f4906477376.tar.gz |
genirq: use iterators for irq_desc loops
Use for_each_irq_desc[_reverse] for all the iteration loops.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/events.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index e6d47e8..9ce1ab6 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -137,14 +137,12 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) static void init_evtchn_cpu_bindings(void) { #ifdef CONFIG_SMP + struct irq_desc *desc; int i; + /* By default all event channels notify CPU#0. */ - for (i = 0; i < nr_irqs; i++) { - struct irq_desc *desc = irq_to_desc(i); - if (!desc) - continue; + for_each_irq_desc(i, desc) desc->affinity = cpumask_of_cpu(0); - } #endif memset(cpu_evtchn, 0, sizeof(cpu_evtchn)); @@ -233,7 +231,7 @@ static int find_unbound_irq(void) int irq; /* Only allocate from dynirq range */ - for (irq = 0; irq < nr_irqs; irq++) + for_each_irq_nr(irq) if (irq_bindcount[irq] == 0) break; @@ -794,7 +792,7 @@ void xen_irq_resume(void) mask_evtchn(evtchn); /* No IRQ <-> event-channel mappings. */ - for (irq = 0; irq < nr_irqs; irq++) + for_each_irq_nr(irq) irq_info[irq].evtchn = 0; /* zap event-channel binding */ for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++) @@ -826,7 +824,7 @@ void __init xen_init_IRQ(void) mask_evtchn(i); /* Dynamic IRQ space is currently unbound. Zero the refcnts. */ - for (i = 0; i < nr_irqs; i++) + for_each_irq_nr(i) irq_bindcount[i] = 0; irq_ctx_init(smp_processor_id()); |