2020-06-09 09:17:34

by Piotr Stankiewicz

[permalink] [raw]
Subject: [PATCH v3 00/15] Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity()

The primary objective of this patch series is to change the behaviour
of pci_alloc_irq_vectors_affinity() such that it forwards the MSI-X enable
error code when appropriate. In the process, though, it was pointed out
that there are multiple places in the kernel which check/ask for message
signalled interrupts (MSI or MSI-X), which spawned the first patch adding
PCI_IRQ_MSI_TYPES. Finally the rest of the chain converts all users to
take advantage of PCI_IRQ_MSI_TYPES or PCI_IRQ_ALL_TYPES, as
appropriate.

Piotr Stankiewicz (15):
PCI/MSI: Forward MSI-X vector enable error code in
pci_alloc_irq_vectors_affinity()
PCI: Add macro for message signalled interrupt types
PCI: Use PCI_IRQ_MSI_TYPES where appropriate
ahci: Use PCI_IRQ_MSI_TYPES where appropriate
crypto: inside-secure - Use PCI_IRQ_MSI_TYPES where appropriate
dmaengine: dw-edma: Use PCI_IRQ_MSI_TYPES where appropriate
drm/amdgpu: Use PCI_IRQ_MSI_TYPES where appropriate
IB/qib: Use PCI_IRQ_MSI_TYPES where appropriate
media: ddbridge: Use PCI_IRQ_MSI_TYPES where appropriate
vmw_vmci: Use PCI_IRQ_ALL_TYPES where appropriate
mmc: sdhci: Use PCI_IRQ_MSI_TYPES where appropriate
amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate
aquantia: atlantic: Use PCI_IRQ_ALL_TYPES where appropriate
net: hns3: Use PCI_IRQ_MSI_TYPES where appropriate
scsi: Use PCI_IRQ_MSI_TYPES and PCI_IRQ_ALL_TYPES where appropriate

Documentation/PCI/msi-howto.rst | 5 +++--
drivers/ata/ahci.c | 2 +-
drivers/crypto/inside-secure/safexcel.c | 2 +-
drivers/dma/dw-edma/dw-edma-pcie.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 11 +---------
drivers/infiniband/hw/qib/qib_pcie.c | 6 +++--
drivers/media/pci/ddbridge/ddbridge-main.c | 2 +-
drivers/misc/vmw_vmci/vmci_guest.c | 3 +--
drivers/mmc/host/sdhci-pci-gli.c | 3 +--
drivers/mmc/host/sdhci-pci-o2micro.c | 3 +--
drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 +-
.../ethernet/aquantia/atlantic/aq_pci_func.c | 4 +---
.../hisilicon/hns3/hns3pf/hclge_main.c | 3 +--
.../hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +--
drivers/pci/msi.c | 22 ++++++++-----------
drivers/pci/pcie/portdrv_core.c | 4 ++--
drivers/pci/switch/switchtec.c | 3 +--
drivers/scsi/ipr.c | 5 +++--
drivers/scsi/vmw_pvscsi.c | 2 +-
include/linux/pci.h | 4 ++--
20 files changed, 37 insertions(+), 54 deletions(-)

--
2.17.2


2020-06-09 09:18:56

by Piotr Stankiewicz

[permalink] [raw]
Subject: [PATCH v3 05/15] crypto: inside-secure - Use PCI_IRQ_MSI_TYPES where appropriate

Seeing as there is shorthand available to use when asking for any type
of interrupt, or any type of message signalled interrupt, leverage it.

Signed-off-by: Piotr Stankiewicz <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Reviewed-by: Antoine Tenart <[email protected]>
Acked-by: Herbert Xu <[email protected]>
---
drivers/crypto/inside-secure/safexcel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
index 2cb53fbae841..1b2faa2a6ab0 100644
--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -1567,7 +1567,7 @@ static int safexcel_probe_generic(void *pdev,
ret = pci_alloc_irq_vectors(pci_pdev,
priv->config.rings + 1,
priv->config.rings + 1,
- PCI_IRQ_MSI | PCI_IRQ_MSIX);
+ PCI_IRQ_MSI_TYPES);
if (ret < 0) {
dev_err(dev, "Failed to allocate PCI MSI interrupts\n");
return ret;
--
2.17.2