* [PATCH v2 12/15] amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate
[not found] <20200603114212.12525-1-piotr.stankiewicz@intel.com>
@ 2020-06-03 11:49 ` Piotr Stankiewicz
2020-06-03 11:49 ` [PATCH v2 13/15] aquantia: atlantic: Use PCI_IRQ_ALL_TYPES " Piotr Stankiewicz
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Piotr Stankiewicz @ 2020-06-03 11:49 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci
Cc: Piotr Stankiewicz, Tom Lendacky, David S. Miller, Jakub Kicinski,
Andy Shevchenko, netdev, linux-kernel
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 <piotr.stankiewicz@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
index 7b86240ecd5f..903bc5ef2518 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
@@ -133,7 +133,7 @@ static int xgbe_config_multi_msi(struct xgbe_prv_data *pdata)
pdata->tx_ring_count);
ret = pci_alloc_irq_vectors(pdata->pcidev, XGBE_MSI_MIN_COUNT,
- vector_count, PCI_IRQ_MSI | PCI_IRQ_MSIX);
+ vector_count, PCI_IRQ_MSI_TYPES);
if (ret < 0) {
dev_info(pdata->dev, "multi MSI/MSI-X enablement failed\n");
return ret;
--
2.17.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 13/15] aquantia: atlantic: Use PCI_IRQ_ALL_TYPES where appropriate
[not found] <20200603114212.12525-1-piotr.stankiewicz@intel.com>
2020-06-03 11:49 ` [PATCH v2 12/15] amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate Piotr Stankiewicz
@ 2020-06-03 11:49 ` Piotr Stankiewicz
2020-06-03 11:49 ` [PATCH v2 14/15] net: hns3: Use PCI_IRQ_MSI_TYPES " Piotr Stankiewicz
2020-06-09 9:11 ` [PATCH v3 00/15] Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity() Piotr Stankiewicz
3 siblings, 0 replies; 7+ messages in thread
From: Piotr Stankiewicz @ 2020-06-03 11:49 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci
Cc: Piotr Stankiewicz, Igor Russkikh, David S. Miller, Jakub Kicinski,
Nikita Danilov, Dmitry Bogdanov, Andy Shevchenko, Pavel Belous,
Egor Pomozov, Thomas Gleixner, netdev, linux-kernel
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 <piotr.stankiewicz@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
---
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index 8a70ffe1d326..2a0ebf296478 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -277,9 +277,7 @@ static int aq_pci_probe(struct pci_dev *pdev,
numvecs += AQ_HW_SERVICE_IRQS;
/*enable interrupts */
#if !AQ_CFG_FORCE_LEGACY_INT
- err = pci_alloc_irq_vectors(self->pdev, 1, numvecs,
- PCI_IRQ_MSIX | PCI_IRQ_MSI |
- PCI_IRQ_LEGACY);
+ err = pci_alloc_irq_vectors(self->pdev, 1, numvecs, PCI_IRQ_ALL_TYPES);
if (err < 0)
goto err_hwinit;
--
2.17.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 14/15] net: hns3: Use PCI_IRQ_MSI_TYPES where appropriate
[not found] <20200603114212.12525-1-piotr.stankiewicz@intel.com>
2020-06-03 11:49 ` [PATCH v2 12/15] amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate Piotr Stankiewicz
2020-06-03 11:49 ` [PATCH v2 13/15] aquantia: atlantic: Use PCI_IRQ_ALL_TYPES " Piotr Stankiewicz
@ 2020-06-03 11:49 ` Piotr Stankiewicz
2020-06-09 9:11 ` [PATCH v3 00/15] Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity() Piotr Stankiewicz
3 siblings, 0 replies; 7+ messages in thread
From: Piotr Stankiewicz @ 2020-06-03 11:49 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci
Cc: Piotr Stankiewicz, Yisen Zhuang, Salil Mehta, David S. Miller,
Jakub Kicinski, Huazhong Tan, Peng Li, Jian Shen, Yunsheng Lin,
Guojia Liao, Yufeng Mo, Yonglong Liu, Guangbin Huang, Weihang Li,
netdev, linux-kernel
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 <piotr.stankiewicz@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +--
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index a758f9ae32be..c49313e87170 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -2334,8 +2334,7 @@ static int hclge_init_msi(struct hclge_dev *hdev)
int i;
vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,
- hdev->num_msi,
- PCI_IRQ_MSI | PCI_IRQ_MSIX);
+ hdev->num_msi, PCI_IRQ_MSI_TYPES);
if (vectors < 0) {
dev_err(&pdev->dev,
"failed(%d) to allocate MSI/MSI-X vectors\n",
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index e02d427131ee..2b02024bd00a 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -2341,8 +2341,7 @@ static int hclgevf_init_msi(struct hclgevf_dev *hdev)
PCI_IRQ_MSIX);
else
vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,
- hdev->num_msi,
- PCI_IRQ_MSI | PCI_IRQ_MSIX);
+ hdev->num_msi, PCI_IRQ_MSI_TYPES);
if (vectors < 0) {
dev_err(&pdev->dev,
--
2.17.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 00/15] Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity()
[not found] <20200603114212.12525-1-piotr.stankiewicz@intel.com>
` (2 preceding siblings ...)
2020-06-03 11:49 ` [PATCH v2 14/15] net: hns3: Use PCI_IRQ_MSI_TYPES " Piotr Stankiewicz
@ 2020-06-09 9:11 ` Piotr Stankiewicz
2020-06-09 9:19 ` [PATCH v3 12/15] amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate Piotr Stankiewicz
` (2 more replies)
3 siblings, 3 replies; 7+ messages in thread
From: Piotr Stankiewicz @ 2020-06-09 9:11 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci
Cc: Jonathan Corbet, Jens Axboe, Kurt Schwemmer, Logan Gunthorpe,
Antoine Tenart, Herbert Xu, David S . Miller, Gustavo Pimentel,
Dan Williams, Vinod Koul, Alex Deucher, Christian König,
David Zhou, David Airlie, Daniel Vetter, Dennis Dalessandro,
Mike Marciniszyn, Doug Ledford, Jason Gunthorpe,
Mauro Carvalho Chehab, Arnd Bergmann, Greg Kroah-Hartman,
Adrian Hunter, Ulf Hansson, Tom Lendacky, Jakub Kicinski,
Igor Russkikh, Yisen Zhuang, Salil Mehta, Brian King,
James E . J . Bottomley, Martin K . Petersen, Jim Gill, linux-doc,
linux-crypto, dmaengine, amd-gfx, dri-devel, linux-rdma,
linux-media, linux-mmc, netdev, linux-scsi, linux-kernel,
Piotr Stankiewicz
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
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v3 12/15] amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate
2020-06-09 9:11 ` [PATCH v3 00/15] Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity() Piotr Stankiewicz
@ 2020-06-09 9:19 ` Piotr Stankiewicz
2020-06-09 9:19 ` [PATCH v3 13/15] aquantia: atlantic: Use PCI_IRQ_ALL_TYPES " Piotr Stankiewicz
2020-06-09 9:20 ` [PATCH v3 14/15] net: hns3: Use PCI_IRQ_MSI_TYPES " Piotr Stankiewicz
2 siblings, 0 replies; 7+ messages in thread
From: Piotr Stankiewicz @ 2020-06-09 9:19 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci
Cc: Piotr Stankiewicz, Tom Lendacky, David S. Miller, Jakub Kicinski,
Andy Shevchenko, netdev, linux-kernel
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 <piotr.stankiewicz@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
index 7b86240ecd5f..903bc5ef2518 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
@@ -133,7 +133,7 @@ static int xgbe_config_multi_msi(struct xgbe_prv_data *pdata)
pdata->tx_ring_count);
ret = pci_alloc_irq_vectors(pdata->pcidev, XGBE_MSI_MIN_COUNT,
- vector_count, PCI_IRQ_MSI | PCI_IRQ_MSIX);
+ vector_count, PCI_IRQ_MSI_TYPES);
if (ret < 0) {
dev_info(pdata->dev, "multi MSI/MSI-X enablement failed\n");
return ret;
--
2.17.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 13/15] aquantia: atlantic: Use PCI_IRQ_ALL_TYPES where appropriate
2020-06-09 9:11 ` [PATCH v3 00/15] Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity() Piotr Stankiewicz
2020-06-09 9:19 ` [PATCH v3 12/15] amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate Piotr Stankiewicz
@ 2020-06-09 9:19 ` Piotr Stankiewicz
2020-06-09 9:20 ` [PATCH v3 14/15] net: hns3: Use PCI_IRQ_MSI_TYPES " Piotr Stankiewicz
2 siblings, 0 replies; 7+ messages in thread
From: Piotr Stankiewicz @ 2020-06-09 9:19 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci
Cc: Piotr Stankiewicz, Igor Russkikh, David S. Miller, Jakub Kicinski,
Nikita Danilov, Mark Starovoytov, Dmitry Bogdanov, Richard Clark,
zhengbin, Pavel Belous, netdev, linux-kernel
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 <piotr.stankiewicz@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
---
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index 41c0f560f95b..bc228be9f0a3 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -299,9 +299,7 @@ static int aq_pci_probe(struct pci_dev *pdev,
numvecs += AQ_HW_SERVICE_IRQS;
/*enable interrupts */
#if !AQ_CFG_FORCE_LEGACY_INT
- err = pci_alloc_irq_vectors(self->pdev, 1, numvecs,
- PCI_IRQ_MSIX | PCI_IRQ_MSI |
- PCI_IRQ_LEGACY);
+ err = pci_alloc_irq_vectors(self->pdev, 1, numvecs, PCI_IRQ_ALL_TYPES);
if (err < 0)
goto err_hwinit;
--
2.17.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 14/15] net: hns3: Use PCI_IRQ_MSI_TYPES where appropriate
2020-06-09 9:11 ` [PATCH v3 00/15] Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity() Piotr Stankiewicz
2020-06-09 9:19 ` [PATCH v3 12/15] amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate Piotr Stankiewicz
2020-06-09 9:19 ` [PATCH v3 13/15] aquantia: atlantic: Use PCI_IRQ_ALL_TYPES " Piotr Stankiewicz
@ 2020-06-09 9:20 ` Piotr Stankiewicz
2 siblings, 0 replies; 7+ messages in thread
From: Piotr Stankiewicz @ 2020-06-09 9:20 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci
Cc: Piotr Stankiewicz, Yisen Zhuang, Salil Mehta, David S. Miller,
Jakub Kicinski, Huazhong Tan, Peng Li, Jian Shen, Guojia Liao,
Yufeng Mo, Yonglong Liu, Guangbin Huang, Yunsheng Lin, netdev,
linux-kernel
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 <piotr.stankiewicz@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +--
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 96bfad52630d..535d9f4a31f5 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -2327,8 +2327,7 @@ static int hclge_init_msi(struct hclge_dev *hdev)
int i;
vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,
- hdev->num_msi,
- PCI_IRQ_MSI | PCI_IRQ_MSIX);
+ hdev->num_msi, PCI_IRQ_MSI_TYPES);
if (vectors < 0) {
dev_err(&pdev->dev,
"failed(%d) to allocate MSI/MSI-X vectors\n",
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index 1b9578d0bd80..fbfd4e7b2817 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -2608,8 +2608,7 @@ static int hclgevf_init_msi(struct hclgevf_dev *hdev)
PCI_IRQ_MSIX);
else
vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,
- hdev->num_msi,
- PCI_IRQ_MSI | PCI_IRQ_MSIX);
+ hdev->num_msi, PCI_IRQ_MSI_TYPES);
if (vectors < 0) {
dev_err(&pdev->dev,
--
2.17.2
^ permalink raw reply related [flat|nested] 7+ messages in thread