From: Thomas Gleixner Date: Fri, 10 Dec 2021 22:18:52 +0000 (+0100) Subject: powerpc/pseries/msi: Use PCI device properties X-Git-Tag: v6.1-rc5~2226^2~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed1533b5810141aceed2c2a3f13a17736f40e7fa;p=platform%2Fkernel%2Flinux-starfive.git powerpc/pseries/msi: Use PCI device properties instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20211210221813.556202506@linutronix.de --- diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 8e28720..dc8cf36 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c @@ -448,8 +448,7 @@ static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *dev int nvec, msi_alloc_info_t *arg) { struct pci_dev *pdev = to_pci_dev(dev); - struct msi_desc *desc = first_pci_msi_entry(pdev); - int type = desc->pci.msi_attrib.is_msix ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI; + int type = pdev->msix_enabled ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI; return rtas_prepare_msi_irqs(pdev, nvec, type, arg); }