[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch V3 06/35] powerpc/pseries/msi: Use PCI device properties
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- From: Jason Gunthorpe <jgg@xxxxxxxxxx>
- Date: Mon, 13 Dec 2021 10:04:27 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sFR2qCBgO35DCCzARlo9F87PegthBCAuSA/4C+N7+3I=; b=NfL72K7eN36HpcftECMCu7TLOZyDq4ev/lJSPxStofkbT1H614pn9t3ODoGu2+lN7dUetVhTVt+214RqxtkR+txv5Lu115zYcq1rKfl0W2PK3/gyXFKTeGPP1jiBTyJVzhsK9lLS8Q1xk3LYazgGGxPYZtIY68oWDw0rggdRlQzbg/dercs36OIqCfMEx8a1s/B1Mooq+rMI3hzGG86Trui2YYnNN+Ae/75FaH9nRQ8LYVmKNOrqKBHQ5e6/ISonKo717FAkHWR/XaRka7eRDxi6i7N2zpnDUdxhna+KPkoJte8p2EfLDHiteQc9BAQ3KuomJgZ1eMDyVXU2aUZ2yw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UJeMf0AdzWz10t5c2AvMM1Qy1mBzi7y6w9yF6YR7W9s7OqoioCPOiOG/F9x6k3Y8D/IJWlvR6o7kfCUdV6BZnXMubc/kgRosZgWRtpEZAJs3SBQFt6Rl1OVSnFM5jPUNgBfdrhywBW9wBYk85cfVWO3B9JLSxNrJqy3lBRqKzAGPL31J74o2HPT3P2oLJiGuIp9YiNA55QzC81zbiesTZvibz3F5tBH+VV0W9U2jsRGvPjEKTu8YMIEKZpMniLnw6bKRDecw/jMYKxrgTJM6m2tETTeQixcolHFBeBEONnDbtUQL4nDk3bORQVC2An9kCB8U+LlwQv+UQT5rQC4V0A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com;
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, Bjorn Helgaas <helgaas@xxxxxxxxxx>, Marc Zygnier <maz@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, 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: Mon, 13 Dec 2021 14:04:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Dec 10, 2021 at 11:18:52PM +0100, Thomas Gleixner wrote:
> 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(-)
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> --- 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;
Long term it probably makes sense to change the msi_domain_ops so that
it has PCI versions of the ops to use in places like this that hard
assume PCI is the only kind of MSI at all.
If the non-PCI op isn't provided then things like IMS would be denied
- and the PCI op can directly pass in a pci_dev * so we don't have all
these to_pci_devs() in drivers.
Jason
|