[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch V3 06/35] powerpc/pseries/msi: Use PCI device properties
- To: LKML <linux-kernel@xxxxxxxxxxxxxxx>
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Fri, 10 Dec 2021 23:18:52 +0100 (CET)
- Cc: Bjorn Helgaas <helgaas@xxxxxxxxxx>, Marc Zygnier <maz@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxxxx>, Megha Dey <megha.dey@xxxxxxxxx>, Ashok Raj <ashok.raj@xxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, Cedric Le Goater <clg@xxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Arnd Bergmann <arnd@xxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Stuart Yoder <stuyoder@xxxxxxxxx>, Laurentiu Tudor <laurentiu.tudor@xxxxxxx>, Nishanth Menon <nm@xxxxxx>, Tero Kristo <kristo@xxxxxxxxxx>, Santosh Shilimkar <ssantosh@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Vinod Koul <vkoul@xxxxxxxxxx>, dmaengine@xxxxxxxxxxxxxxx, Mark Rutland <mark.rutland@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, Jassi Brar <jassisinghbrar@xxxxxxxxx>, Peter Ujfalusi <peter.ujfalusi@xxxxxxxxx>, Sinan Kaya <okaya@xxxxxxxxxx>
- Delivery-date: Fri, 10 Dec 2021 22:18:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
instead of fiddling with MSI descriptors.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
---
V3: Use pci_dev->msix_enabled - Jason
---
arch/powerpc/platforms/pseries/msi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -448,8 +448,7 @@ static int pseries_msi_ops_prepare(struc
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);
}
|