[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211206210438.967630948@linutronix.de>
Date: Mon, 6 Dec 2021 23:39:34 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Bjorn Helgaas <helgaas@...nel.org>, Marc Zygnier <maz@...nel.org>,
Alex Williamson <alex.williamson@...hat.com>,
Kevin Tian <kevin.tian@...el.com>,
Jason Gunthorpe <jgg@...dia.com>,
Megha Dey <megha.dey@...el.com>,
Ashok Raj <ashok.raj@...el.com>, linux-pci@...r.kernel.org,
Cedric Le Goater <clg@...d.org>,
xen-devel@...ts.xenproject.org, Juergen Gross <jgross@...e.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Will Deacon <will@...nel.org>,
Santosh Shilimkar <ssantosh@...nel.org>,
iommu@...ts.linux-foundation.org, dmaengine@...r.kernel.org,
Stuart Yoder <stuyoder@...il.com>,
Laurentiu Tudor <laurentiu.tudor@....com>,
Nishanth Menon <nm@...com>, Tero Kristo <kristo@...nel.org>,
linux-arm-kernel@...ts.infradead.org,
Vinod Koul <vkoul@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Robin Murphy <robin.murphy@....com>,
Sinan Kaya <okaya@...nel.org>
Subject: [patch V2 24/36] powerpc/pseries/msi: Use MSI device properties
instead of fiddling with MSI descriptors.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
---
arch/powerpc/platforms/pseries/msi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -447,9 +447,9 @@ static int rtas_prepare_msi_irqs(struct
static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *dev,
int nvec, msi_alloc_info_t *arg)
{
+ bool is_msix = msi_device_has_property(dev, MSI_PROP_PCI_MSIX);
+ int type = is_msix ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI;
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;
return rtas_prepare_msi_irqs(pdev, nvec, type, arg);
}
Powered by blists - more mailing lists