diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-09-18 00:24:37 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-09-18 00:24:37 +0100 |
commit | a71eeb324fcc21bb2789917601326a2dfc220704 (patch) | |
tree | 5a7a8dd18c9663490af6c74b53705fc378fba6d7 /xen/arch/x86/irq.c | |
parent | 6ac9f9c55cce7e94445120ee8751a165dfe2d9d3 (diff) | |
download | xen-a71eeb324fcc21bb2789917601326a2dfc220704.tar.gz xen-a71eeb324fcc21bb2789917601326a2dfc220704.tar.bz2 xen-a71eeb324fcc21bb2789917601326a2dfc220704.zip |
pass struct irq_desc * to set_affinity() IRQ accessors
This is because the descriptor is generally more useful (with the IRQ
number being accessible in it if necessary) and going forward will
hopefully allow to remove all direct accesses to the IRQ descriptor
array, in turn making it possible to make this some other, more
efficient data structure.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/arch/x86/irq.c')
-rw-r--r-- | xen/arch/x86/irq.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 922ee6bf4c..2a0d2cd492 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -558,10 +558,8 @@ void __setup_vector_irq(int cpu) } } -void move_masked_irq(int irq) +void move_masked_irq(struct irq_desc *desc) { - struct irq_desc *desc = irq_to_desc(irq); - if (likely(!(desc->status & IRQ_MOVE_PENDING))) return; @@ -583,7 +581,7 @@ void move_masked_irq(int irq) * For correct operation this depends on the caller masking the irqs. */ if (likely(cpus_intersects(desc->pending_mask, cpu_online_map))) - desc->handler->set_affinity(irq, &desc->pending_mask); + desc->handler->set_affinity(desc, &desc->pending_mask); cpus_clear(desc->pending_mask); } @@ -599,7 +597,7 @@ void move_native_irq(int irq) return; desc->handler->disable(irq); - move_masked_irq(irq); + move_masked_irq(desc); desc->handler->enable(irq); } @@ -1410,7 +1408,7 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share) /* Attempt to bind the interrupt target to the correct CPU. */ cpu_set(v->processor, cpumask); if ( !opt_noirqbalance && (desc->handler->set_affinity != NULL) ) - desc->handler->set_affinity(irq, &cpumask); + desc->handler->set_affinity(desc, &cpumask); } else if ( !will_share || !action->shareable ) { @@ -1964,7 +1962,7 @@ void fixup_irqs(void) desc->handler->disable(irq); if ( desc->handler->set_affinity ) - desc->handler->set_affinity(irq, &affinity); + desc->handler->set_affinity(desc, &affinity); else if ( !(warned++) ) set_affinity = 0; |