[PATCH 21/37] iommu/riscv: Replace pci_alloc_irq_vectors() with pcim_alloc_irq_vectors()

Shawn Lin shawn.lin at rock-chips.com
Mon Feb 23 07:53:31 PST 2026


pcim_enable_device() no longer automatically manages IRQ vectors via devres.
Drivers must now manually call pci_free_irq_vectors() for cleanup. Alternatively,
pcim_alloc_irq_vectors() should be used.

To: Tomasz Jeznach <tjeznach at rivosinc.com>
To: Will Deacon <will at kernel.org>
To: Joerg Roedel <joro at 8bytes.org>
Cc: iommu at lists.linux.dev
Cc: linux-riscv at lists.infradead.org
Cc: Bjorn Helgaas <bhelgaas at google.com>
Cc: Philipp Stanner <phasta at kernel.org>
Cc: linux-pci at vger.kernel.org
Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
---

 drivers/iommu/riscv/iommu-pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/riscv/iommu-pci.c b/drivers/iommu/riscv/iommu-pci.c
index d82d2b0..c5bb926 100644
--- a/drivers/iommu/riscv/iommu-pci.c
+++ b/drivers/iommu/riscv/iommu-pci.c
@@ -75,8 +75,8 @@ static int riscv_iommu_pci_probe(struct pci_dev *pdev, const struct pci_device_i
 	}
 
 	/* Allocate and assign IRQ vectors for the various events */
-	rc = pci_alloc_irq_vectors(pdev, 1, RISCV_IOMMU_INTR_COUNT,
-				   PCI_IRQ_MSIX | PCI_IRQ_MSI);
+	rc = pcim_alloc_irq_vectors(pdev, 1, RISCV_IOMMU_INTR_COUNT,
+				    PCI_IRQ_MSIX | PCI_IRQ_MSI);
 	if (rc <= 0)
 		return dev_err_probe(dev, -ENODEV,
 				     "unable to allocate irq vectors\n");
-- 
2.7.4




More information about the linux-riscv mailing list