Much like the rest of the fields that relate to the current or old CPU target, the pending_mask can be converted into an integer field.
No functional change intended. Signed-off-by: Roger Pau Monné <[email protected]> --- xen/arch/x86/include/asm/irq.h | 2 +- xen/arch/x86/irq.c | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/include/asm/irq.h b/xen/arch/x86/include/asm/irq.h index bc59ce7c3ffb..55047772eb46 100644 --- a/xen/arch/x86/include/asm/irq.h +++ b/xen/arch/x86/include/asm/irq.h @@ -73,7 +73,7 @@ struct arch_irq_desc { #define CPU_INVALID ~0U unsigned int cpu; /* Target CPU of the interrupt. */ unsigned int old_cpu; - cpumask_var_t pending_mask; + unsigned int pending_cpu; vmask_t *used_vectors; bool move_cleanup : 1; bool move_in_progress : 1; diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 680f190da065..8d7947116e33 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -387,11 +387,9 @@ int irq_to_vector(int irq) int arch_init_one_irq_desc(struct irq_desc *desc) { - if ( !alloc_cpumask_var(&desc->arch.pending_mask) ) - return -ENOMEM; - desc->arch.cpu = CPU_INVALID; desc->arch.old_cpu = CPU_INVALID; + desc->arch.pending_cpu = CPU_INVALID; desc->arch.vector = IRQ_VECTOR_UNASSIGNED; desc->arch.old_vector = IRQ_VECTOR_UNASSIGNED; desc->arch.creator_domid = DOMID_INVALID; @@ -760,8 +758,6 @@ void setup_vector_irq(unsigned int cpu) void move_masked_irq(struct irq_desc *desc) { - cpumask_t *pending_mask = desc->arch.pending_mask; - if (likely(!(desc->status & IRQ_MOVE_PENDING))) return; @@ -779,10 +775,10 @@ void move_masked_irq(struct irq_desc *desc) * * For correct operation this depends on the caller masking the irqs. */ - if ( likely(cpumask_intersects(pending_mask, &cpu_online_map)) ) - desc->handler->set_affinity(desc, pending_mask); + if ( likely(cpu_online(desc->arch.pending_cpu)) ) + desc->handler->set_affinity(desc, cpumask_of(desc->arch.pending_cpu)); - cpumask_clear(pending_mask); + desc->arch.pending_cpu = CPU_INVALID; } void move_native_irq(struct irq_desc *desc) @@ -926,7 +922,7 @@ void irq_set_affinity(struct irq_desc *desc, unsigned int cpu) ASSERT(spin_is_locked(&desc->lock)); desc->status &= ~IRQ_MOVE_PENDING; smp_wmb(); - cpumask_copy(desc->arch.pending_mask, cpumask_of(cpu)); + desc->arch.pending_cpu = cpu; smp_wmb(); desc->status |= IRQ_MOVE_PENDING; } -- 2.51.0
