[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/9] x86/IRQ: desc->affinity should strictly represent the requested value
On Mon, Apr 29, 2019 at 05:24:39AM -0600, Jan Beulich wrote: > desc->arch.cpu_mask reflects the actual set of target CPUs. Don't ever > fiddle with desc->affinity itself, except to store caller requested > values. > > This renders both set_native_irq_info() uses (which weren't using proper > locking anyway) redundant - drop the function altogether. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> > > --- a/xen/arch/x86/io_apic.c > +++ b/xen/arch/x86/io_apic.c > @@ -1042,7 +1042,6 @@ static void __init setup_IO_APIC_irqs(vo > SET_DEST(entry, logical, cpu_mask_to_apicid(TARGET_CPUS)); > spin_lock_irqsave(&ioapic_lock, flags); > __ioapic_write_entry(apic, pin, 0, entry); > - set_native_irq_info(irq, TARGET_CPUS); > spin_unlock_irqrestore(&ioapic_lock, flags); > } > } > @@ -2251,7 +2250,6 @@ int io_apic_set_pci_routing (int ioapic, > > spin_lock_irqsave(&ioapic_lock, flags); > __ioapic_write_entry(ioapic, pin, 0, entry); > - set_native_irq_info(irq, TARGET_CPUS); > spin_unlock(&ioapic_lock); > > spin_lock(&desc->lock); > --- a/xen/arch/x86/irq.c > +++ b/xen/arch/x86/irq.c > @@ -572,11 +572,16 @@ int assign_irq_vector(int irq, const cpu > > spin_lock_irqsave(&vector_lock, flags); > ret = __assign_irq_vector(irq, desc, mask ?: TARGET_CPUS); > - if (!ret) { > + if ( !ret ) > + { > ret = desc->arch.vector; > - cpumask_copy(desc->affinity, desc->arch.cpu_mask); > + if ( mask ) > + cpumask_copy(desc->affinity, mask); > + else > + cpumask_setall(desc->affinity); I guess it's fine to use setall instead of copying the cpu online map here? AFAICT __assign_irq_vector already filters offline CPUs from the passed mask. Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |