Skip to content

Commit 4e6b26d

Browse files
committed
PCI/MSI: Remove obsolete sanity checks for multiple interrupt sets
Multiple interrupt sets for affinity spreading are now handled in the core code and the number of sets and their size is recalculated via a driver supplied callback. That avoids the requirement to invoke pci_alloc_irq_vectors_affinity() with the arguments minvecs and maxvecs set to the same value and the callsite handling the ENOSPC situation. Remove the now obsolete sanity checks and the related comments. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Bjorn Helgaas <helgaas@kernel.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: linux-block@vger.kernel.org Cc: Sagi Grimberg <sagi@grimberg.me> Cc: linux-nvme@lists.infradead.org Cc: linux-pci@vger.kernel.org Cc: Keith Busch <keith.busch@intel.com> Cc: Sumit Saxena <sumit.saxena@broadcom.com> Cc: Kashyap Desai <kashyap.desai@broadcom.com> Cc: Shivasharan Srikanteshwara <shivasharan.srikanteshwara@broadcom.com> Link: https://lkml.kernel.org/r/20190216172228.778630549@linutronix.de
1 parent a6a309e commit 4e6b26d

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

‎drivers/pci/msi.c‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,13 +1035,6 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
10351035
if (maxvec < minvec)
10361036
return -ERANGE;
10371037

1038-
/*
1039-
* If the caller is passing in sets, we can't support a range of
1040-
* vectors. The caller needs to handle that.
1041-
*/
1042-
if (affd && affd->nr_sets && minvec != maxvec)
1043-
return -EINVAL;
1044-
10451038
if (WARN_ON_ONCE(dev->msi_enabled))
10461039
return -EINVAL;
10471040

@@ -1093,13 +1086,6 @@ static int __pci_enable_msix_range(struct pci_dev *dev,
10931086
if (maxvec < minvec)
10941087
return -ERANGE;
10951088

1096-
/*
1097-
* If the caller is passing in sets, we can't support a range of
1098-
* supported vectors. The caller needs to handle that.
1099-
*/
1100-
if (affd && affd->nr_sets && minvec != maxvec)
1101-
return -EINVAL;
1102-
11031089
if (WARN_ON_ONCE(dev->msix_enabled))
11041090
return -EINVAL;
11051091

0 commit comments

Comments
 (0)