[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211126230525.137299282@linutronix.de>
Date: Sat, 27 Nov 2021 02:20:39 +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,
Greg Kroah-Hartman <gregkh@...uxfoundation.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, x86@...nel.org,
Vinod Koul <vkoul@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Will Deacon <will@...nel.org>, Sinan Kaya <okaya@...nel.org>
Subject: [patch 20/37] PCI/MSI: Store properties in device::msi::data
Store the properties which are interesting for various places so the MSI
descriptor fiddling can be removed.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
drivers/pci/msi/msi.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -244,6 +244,8 @@ static void free_msi_irqs(struct pci_dev
iounmap(dev->msix_base);
dev->msix_base = NULL;
}
+
+ dev->dev.msi.data->properties = 0;
}
static void pci_intx_for_msi(struct pci_dev *dev, int enable)
@@ -372,6 +374,9 @@ msi_setup_entry(struct pci_dev *dev, int
if (entry->pci.msi_attrib.can_mask)
pci_read_config_dword(dev, entry->pci.mask_pos, &entry->pci.msi_mask);
+ dev->dev.msi.data->properties = MSI_PROP_PCI_MSI;
+ if (entry->pci.msi_attrib.is_64)
+ dev->dev.msi.data->properties |= MSI_PROP_64BIT;
out:
kfree(masks);
return entry;
@@ -514,6 +519,7 @@ static int msix_setup_entries(struct pci
if (masks)
curmsk++;
}
+ dev->dev.msi.data->properties = MSI_PROP_PCI_MSIX | MSI_PROP_64BIT;
ret = 0;
out:
kfree(masks);
Powered by blists - more mailing lists