2024-03-25 12:19:32

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 00/28] Remove PCI_IRQ_LEGACY

This patch series removes the use of the depracated PCI_IRQ_LEGACY macro
and replace it with PCI_IRQ_INTX. No functional change.

Damien Le Moal (28):
PCI: msi: Use PCI_IRQ_INTX
PCI: portdrv: Use PCI_IRQ_INTX
PCI: documentation: Use PCI_IRQ_INTX
sound: intel: Use PCI_IRQ_INTX
usb: hcd-pci: Use PCI_IRQ_INTX
tty: 8250_pci: Use PCI_IRQ_INTX
platform: intel_ips: Use PCI_IRQ_INTX
ntb: Use PCI_IRQ_INTX
mfd: intel-lpss-pci: Use PCI_IRQ_INTX
drm: amdgpu: Use PCI_IRQ_INTX
infiniband: qib: Use PCI_IRQ_INTX
infiniband: vmw_pvrdma: Use PCI_IRQ_INTX
misc: vmci_guest: Use PCI_IRQ_ALL_TYPES
net: xgbe: Use PCI_IRQ_INTX
net: aquantia atlantic: Use PCI_IRQ_INTX
net: atheros: alx: Use PCI_IRQ_INTX
net: realtek: r8169: Use PCI_IRQ_INTX
net: wangxun: Use PCI_IRQ_INTX
net: wireless: ath10k: Use references to INTX instead of LEGACY
net wireless; realtec: Use PCI_IRQ_INTX
scsi: arcmsr: Use PCI_IRQ_INTX
scsi: hpsa: Use PCI_IRQ_INTX
scsi: ipr: Use PCI_IRQ_INTX
scsi: megaraid: Use PCI_IRQ_INTX
scsi: mpt3sas: Use PCI_IRQ_INTX
scsi: pmcraid: Use PCI_IRQ_INTX
scsi: vmw_pvscsi: Do not use PCI_IRQ_LEGACY
PCI: Remove PCI_IRQ_LEGACY

Documentation/PCI/msi-howto.rst | 2 +-
Documentation/PCI/pci.rst | 2 +-
.../translations/zh_CN/PCI/msi-howto.rst | 2 +-
Documentation/translations/zh_CN/PCI/pci.rst | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
drivers/infiniband/hw/qib/qib_iba7220.c | 2 +-
drivers/infiniband/hw/qib/qib_iba7322.c | 5 ++-
drivers/infiniband/hw/qib/qib_pcie.c | 2 +-
.../infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
drivers/mfd/intel-lpss-pci.c | 2 +-
drivers/misc/vmw_vmci/vmci_guest.c | 3 +-
drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 +-
.../net/ethernet/aquantia/atlantic/aq_cfg.h | 2 +-
.../net/ethernet/aquantia/atlantic/aq_hw.h | 2 +-
.../net/ethernet/aquantia/atlantic/aq_nic.c | 2 +-
.../ethernet/aquantia/atlantic/aq_pci_func.c | 9 ++---
.../aquantia/atlantic/hw_atl/hw_atl_a0.c | 2 +-
.../aquantia/atlantic/hw_atl/hw_atl_b0.c | 2 +-
.../aquantia/atlantic/hw_atl2/hw_atl2.c | 2 +-
drivers/net/ethernet/atheros/alx/main.c | 2 +-
drivers/net/ethernet/realtek/r8169_main.c | 2 +-
drivers/net/ethernet/wangxun/libwx/wx_lib.c | 8 ++---
drivers/net/wireless/ath/ath10k/ahb.c | 18 +++++-----
drivers/net/wireless/ath/ath10k/pci.c | 36 +++++++++----------
drivers/net/wireless/ath/ath10k/pci.h | 6 ++--
drivers/net/wireless/realtek/rtw88/pci.c | 2 +-
drivers/net/wireless/realtek/rtw89/pci.c | 2 +-
drivers/ntb/hw/idt/ntb_hw_idt.c | 2 +-
drivers/pci/msi/api.c | 8 ++---
drivers/pci/pcie/portdrv.c | 8 ++---
drivers/platform/x86/intel_ips.c | 2 +-
drivers/scsi/arcmsr/arcmsr_hba.c | 2 +-
drivers/scsi/hpsa.c | 2 +-
drivers/scsi/ipr.c | 2 +-
drivers/scsi/megaraid/megaraid_sas_base.c | 4 +--
drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
drivers/scsi/pmcraid.c | 2 +-
drivers/scsi/vmw_pvscsi.c | 2 +-
drivers/tty/serial/8250/8250_pci.c | 2 +-
drivers/usb/core/hcd-pci.c | 3 +-
include/linux/pci.h | 7 ++--
sound/soc/intel/avs/core.c | 2 +-
42 files changed, 84 insertions(+), 91 deletions(-)

--
2.44.0



2024-03-25 12:30:45

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 23/28] scsi: ipr: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/scsi/ipr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 3819f7c42788..e0326f1e6559 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -9463,7 +9463,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
ipr_number_of_msix = IPR_MAX_MSIX_VECTORS;
}

- irq_flag = PCI_IRQ_LEGACY;
+ irq_flag = PCI_IRQ_INTX;
if (ioa_cfg->ipr_chip->has_msi)
irq_flag |= PCI_IRQ_MSI | PCI_IRQ_MSIX;
rc = pci_alloc_irq_vectors(pdev, 1, ipr_number_of_msix, irq_flag);
--
2.44.0


2024-03-25 12:30:51

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 08/28] ntb: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/ntb/hw/idt/ntb_hw_idt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c
index 48823b53ede3..48dfb1a69a77 100644
--- a/drivers/ntb/hw/idt/ntb_hw_idt.c
+++ b/drivers/ntb/hw/idt/ntb_hw_idt.c
@@ -2129,7 +2129,7 @@ static int idt_init_isr(struct idt_ntb_dev *ndev)
int ret;

/* Allocate just one interrupt vector for the ISR */
- ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI | PCI_IRQ_LEGACY);
+ ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI | PCI_IRQ_INTX);
if (ret != 1) {
dev_err(&pdev->dev, "Failed to allocate IRQ vector");
return ret;
--
2.44.0


2024-03-25 12:31:00

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 17/28] net: realtek: r8169: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/net/ethernet/realtek/r8169_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 5c879a5c86d7..7288afcc8c94 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5076,7 +5076,7 @@ static int rtl_alloc_irq(struct rtl8169_private *tp)
rtl_lock_config_regs(tp);
fallthrough;
case RTL_GIGA_MAC_VER_07 ... RTL_GIGA_MAC_VER_17:
- flags = PCI_IRQ_LEGACY;
+ flags = PCI_IRQ_INTX;
break;
default:
flags = PCI_IRQ_ALL_TYPES;
--
2.44.0


2024-03-25 12:31:03

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 04/28] sound: intel: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
sound/soc/intel/avs/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c
index d7f8940099ce..69818e4b43da 100644
--- a/sound/soc/intel/avs/core.c
+++ b/sound/soc/intel/avs/core.c
@@ -343,7 +343,7 @@ static int avs_hdac_acquire_irq(struct avs_dev *adev)
int ret;

/* request one and check that we only got one interrupt */
- ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI | PCI_IRQ_LEGACY);
+ ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI | PCI_IRQ_INTX);
if (ret != 1) {
dev_err(adev->dev, "Failed to allocate IRQ vector: %d\n", ret);
return ret;
--
2.44.0


2024-03-25 12:31:22

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 22/28] scsi: hpsa: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/scsi/hpsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index af18d20f3079..23b19fa30661 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -7509,7 +7509,7 @@ static void hpsa_setup_reply_map(struct ctlr_info *h)
*/
static int hpsa_interrupt_mode(struct ctlr_info *h)
{
- unsigned int flags = PCI_IRQ_LEGACY;
+ unsigned int flags = PCI_IRQ_INTX;
int ret;

/* Some boards advertise MSI but don't really support it */
--
2.44.0


2024-03-25 12:31:26

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 21/28] scsi: arcmsr: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/scsi/arcmsr/arcmsr_hba.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index ad227e6cb10e..35860c61468b 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -1007,7 +1007,7 @@ arcmsr_request_irq(struct pci_dev *pdev, struct AdapterControlBlock *acb)
goto msi_int1;
}
}
- nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY);
+ nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_INTX);
if (nvec < 1)
return FAILED;
msi_int1:
--
2.44.0


2024-03-25 12:31:42

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 25/28] scsi: mpt3sas: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 1b492e9a3e55..40f6f87428d5 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -3515,7 +3515,7 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc)
ioc_info(ioc, "High IOPs queues : disabled\n");
ioc->reply_queue_count = 1;
ioc->iopoll_q_start_index = ioc->reply_queue_count - 0;
- r = pci_alloc_irq_vectors(ioc->pdev, 1, 1, PCI_IRQ_LEGACY);
+ r = pci_alloc_irq_vectors(ioc->pdev, 1, 1, PCI_IRQ_INTX);
if (r < 0) {
dfailprintk(ioc,
ioc_info(ioc, "pci_alloc_irq_vector(legacy) failed (r=%d) !!!\n",
--
2.44.0


2024-03-25 12:36:12

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 07/28] platform: intel_ips: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/platform/x86/intel_ips.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
index ba38649cc142..73ec4460a151 100644
--- a/drivers/platform/x86/intel_ips.c
+++ b/drivers/platform/x86/intel_ips.c
@@ -1505,7 +1505,7 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
* IRQ handler for ME interaction
* Note: don't use MSI here as the PCH has bugs.
*/
- ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY);
+ ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_INTX);
if (ret < 0)
return ret;

--
2.44.0


2024-03-25 12:38:29

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 24/28] scsi: megaraid: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 3d4f13da1ae8..631a24d91fa9 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -6300,7 +6300,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
}

if (!instance->msix_vectors) {
- i = pci_alloc_irq_vectors(instance->pdev, 1, 1, PCI_IRQ_LEGACY);
+ i = pci_alloc_irq_vectors(instance->pdev, 1, 1, PCI_IRQ_INTX);
if (i < 0)
goto fail_init_adapter;
}
@@ -7839,7 +7839,7 @@ megasas_resume(struct device *dev)

if (!instance->msix_vectors) {
rval = pci_alloc_irq_vectors(instance->pdev, 1, 1,
- PCI_IRQ_LEGACY);
+ PCI_IRQ_INTX);
if (rval < 0)
goto fail_reenable_msix;
}
--
2.44.0


2024-03-25 12:39:24

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 26/28] scsi: pmcraid: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/scsi/pmcraid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index e8bcc3a88732..9c57efa10732 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4033,7 +4033,7 @@ static int
pmcraid_register_interrupt_handler(struct pmcraid_instance *pinstance)
{
struct pci_dev *pdev = pinstance->pdev;
- unsigned int irq_flag = PCI_IRQ_LEGACY, flag;
+ unsigned int irq_flag = PCI_IRQ_INTX, flag;
int num_hrrq, rc, i;
irq_handler_t isr;

--
2.44.0


2024-03-25 12:40:35

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 15/28] net: aquantia atlantic: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro. To be consistent with this change, the macros AQ_HW_IRQ_LEGACY
and AQ_CFG_FORCE_LEGACY_INT are respectively renamed to AQ_HW_IRQ_INTX
and AQ_CFG_FORCE_INTX.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 2 +-
drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 2 +-
drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +-
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 9 +++------
.../net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 2 +-
.../net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 2 +-
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c | 2 +-
7 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h b/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
index 7e9c74b141ef..fc2b325f34e7 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
@@ -17,7 +17,7 @@

#define AQ_CFG_IS_POLLING_DEF 0U

-#define AQ_CFG_FORCE_LEGACY_INT 0U
+#define AQ_CFG_FORCE_INTX 0U

#define AQ_CFG_INTERRUPT_MODERATION_OFF 0
#define AQ_CFG_INTERRUPT_MODERATION_ON 1
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
index dbd284660135..f010bda61c96 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
@@ -104,7 +104,7 @@ struct aq_stats_s {
};

#define AQ_HW_IRQ_INVALID 0U
-#define AQ_HW_IRQ_LEGACY 1U
+#define AQ_HW_IRQ_INTX 1U
#define AQ_HW_IRQ_MSI 2U
#define AQ_HW_IRQ_MSIX 3U

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index d6d6d5d37ff3..fe0e3e2a8117 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -127,7 +127,7 @@ void aq_nic_cfg_start(struct aq_nic_s *self)

cfg->irq_type = aq_pci_func_get_irq_type(self);

- if ((cfg->irq_type == AQ_HW_IRQ_LEGACY) ||
+ if ((cfg->irq_type == AQ_HW_IRQ_INTX) ||
(cfg->aq_hw_caps->vecs == 1U) ||
(cfg->vecs == 1U)) {
cfg->is_rss = 0U;
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index baa5f8cc31f2..43c71f6b314f 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -200,7 +200,7 @@ unsigned int aq_pci_func_get_irq_type(struct aq_nic_s *self)
if (self->pdev->msi_enabled)
return AQ_HW_IRQ_MSI;

- return AQ_HW_IRQ_LEGACY;
+ return AQ_HW_IRQ_INTX;
}

static void aq_pci_free_irq_vectors(struct aq_nic_s *self)
@@ -298,11 +298,8 @@ 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);
-
+#if !AQ_CFG_FORCE_INTX
+ err = pci_alloc_irq_vectors(self->pdev, 1, numvecs, PCI_IRQ_ALL_TYPES);
if (err < 0)
goto err_hwinit;
numvecs = err;
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
index 9dfd68f0fda9..8de2cdd09213 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
@@ -352,7 +352,7 @@ static int hw_atl_a0_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
{
static u32 aq_hw_atl_igcr_table_[4][2] = {
[AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
- [AQ_HW_IRQ_LEGACY] = { 0x20000080U, 0x20000080U },
+ [AQ_HW_IRQ_INTX] = { 0x20000080U, 0x20000080U },
[AQ_HW_IRQ_MSI] = { 0x20000021U, 0x20000025U },
[AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U },
};
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
index 54e70f07b573..56c46266bb0a 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
@@ -562,7 +562,7 @@ static int hw_atl_b0_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
{
static u32 aq_hw_atl_igcr_table_[4][2] = {
[AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
- [AQ_HW_IRQ_LEGACY] = { 0x20000080U, 0x20000080U },
+ [AQ_HW_IRQ_INTX] = { 0x20000080U, 0x20000080U },
[AQ_HW_IRQ_MSI] = { 0x20000021U, 0x20000025U },
[AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U },
};
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
index 220400a633f5..b0ed572e88c6 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
@@ -534,7 +534,7 @@ static int hw_atl2_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
{
static u32 aq_hw_atl2_igcr_table_[4][2] = {
[AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
- [AQ_HW_IRQ_LEGACY] = { 0x20000080U, 0x20000080U },
+ [AQ_HW_IRQ_INTX] = { 0x20000080U, 0x20000080U },
[AQ_HW_IRQ_MSI] = { 0x20000021U, 0x20000025U },
[AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U },
};
--
2.44.0


2024-03-25 12:40:37

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 27/28] scsi: vmw_pvscsi: Do not use PCI_IRQ_LEGACY

In pvscsi_probe(), initialize the irq_flag variable using
PCI_IRQ_ALL_TYPES to remove the use of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/scsi/vmw_pvscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index f88ecdb93a8a..c4fea077265e 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -1346,7 +1346,7 @@ static u32 pvscsi_get_max_targets(struct pvscsi_adapter *adapter)

static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
- unsigned int irq_flag = PCI_IRQ_MSIX | PCI_IRQ_MSI | PCI_IRQ_LEGACY;
+ unsigned int irq_flag = PCI_IRQ_ALL_TYPES;
struct pvscsi_adapter *adapter;
struct pvscsi_adapter adapter_temp;
struct Scsi_Host *host = NULL;
--
2.44.0


2024-03-25 12:40:48

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 12/28] infiniband: vmw_pvrdma: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
index a5e88185171f..768aad364c89 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
@@ -531,7 +531,7 @@ static int pvrdma_alloc_intrs(struct pvrdma_dev *dev)
PCI_IRQ_MSIX);
if (ret < 0) {
ret = pci_alloc_irq_vectors(pdev, 1, 1,
- PCI_IRQ_MSI | PCI_IRQ_LEGACY);
+ PCI_IRQ_MSI | PCI_IRQ_INTX);
if (ret < 0)
return ret;
}
--
2.44.0


2024-03-25 12:40:56

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 14/28] net: xgbe: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
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 f409d7bd1f1e..c5e5fac49779 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
@@ -170,7 +170,7 @@ static int xgbe_config_irqs(struct xgbe_prv_data *pdata)
goto out;

ret = pci_alloc_irq_vectors(pdata->pcidev, 1, 1,
- PCI_IRQ_LEGACY | PCI_IRQ_MSI);
+ PCI_IRQ_INTX | PCI_IRQ_MSI);
if (ret < 0) {
dev_info(pdata->dev, "single IRQ enablement failed\n");
return ret;
--
2.44.0


2024-03-25 12:41:10

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 19/28] net: wireless: ath10k: Use references to INTX instead of LEGACY

To be consistent with the deprecation of PCI_IRQ_LEGACY and its
replacement with PCI_IRQ_INTX, rename macros and functions referencing
"legacy irq" to instead use the term "intx irq".

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/net/wireless/ath/ath10k/ahb.c | 18 +++++++-------
drivers/net/wireless/ath/ath10k/pci.c | 36 +++++++++++++--------------
drivers/net/wireless/ath/ath10k/pci.h | 6 ++---
3 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
index a378bc48b1d2..f0441b3d7dcb 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -394,14 +394,14 @@ static irqreturn_t ath10k_ahb_interrupt_handler(int irq, void *arg)
if (!ath10k_pci_irq_pending(ar))
return IRQ_NONE;

- ath10k_pci_disable_and_clear_legacy_irq(ar);
+ ath10k_pci_disable_and_clear_intx_irq(ar);
ath10k_pci_irq_msi_fw_mask(ar);
napi_schedule(&ar->napi);

return IRQ_HANDLED;
}

-static int ath10k_ahb_request_irq_legacy(struct ath10k *ar)
+static int ath10k_ahb_request_irq_intx(struct ath10k *ar)
{
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
struct ath10k_ahb *ar_ahb = ath10k_ahb_priv(ar);
@@ -415,12 +415,12 @@ static int ath10k_ahb_request_irq_legacy(struct ath10k *ar)
ar_ahb->irq, ret);
return ret;
}
- ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_LEGACY;
+ ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_INTX;

return 0;
}

-static void ath10k_ahb_release_irq_legacy(struct ath10k *ar)
+static void ath10k_ahb_release_irq_intx(struct ath10k *ar)
{
struct ath10k_ahb *ar_ahb = ath10k_ahb_priv(ar);

@@ -430,7 +430,7 @@ static void ath10k_ahb_release_irq_legacy(struct ath10k *ar)
static void ath10k_ahb_irq_disable(struct ath10k *ar)
{
ath10k_ce_disable_interrupts(ar);
- ath10k_pci_disable_and_clear_legacy_irq(ar);
+ ath10k_pci_disable_and_clear_intx_irq(ar);
}

static int ath10k_ahb_resource_init(struct ath10k *ar)
@@ -621,7 +621,7 @@ static int ath10k_ahb_hif_start(struct ath10k *ar)

ath10k_core_napi_enable(ar);
ath10k_ce_enable_interrupts(ar);
- ath10k_pci_enable_legacy_irq(ar);
+ ath10k_pci_enable_intx_irq(ar);

ath10k_pci_rx_post(ar);

@@ -775,7 +775,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)

ath10k_pci_init_napi(ar);

- ret = ath10k_ahb_request_irq_legacy(ar);
+ ret = ath10k_ahb_request_irq_intx(ar);
if (ret)
goto err_free_pipes;

@@ -806,7 +806,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
ath10k_ahb_clock_disable(ar);

err_free_irq:
- ath10k_ahb_release_irq_legacy(ar);
+ ath10k_ahb_release_irq_intx(ar);

err_free_pipes:
ath10k_pci_release_resource(ar);
@@ -828,7 +828,7 @@ static void ath10k_ahb_remove(struct platform_device *pdev)

ath10k_core_unregister(ar);
ath10k_ahb_irq_disable(ar);
- ath10k_ahb_release_irq_legacy(ar);
+ ath10k_ahb_release_irq_intx(ar);
ath10k_pci_release_resource(ar);
ath10k_ahb_halt_chip(ar);
ath10k_ahb_clock_disable(ar);
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 5c34b156b4ff..6aeeab2edf5a 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -721,7 +721,7 @@ bool ath10k_pci_irq_pending(struct ath10k *ar)
return false;
}

-void ath10k_pci_disable_and_clear_legacy_irq(struct ath10k *ar)
+void ath10k_pci_disable_and_clear_intx_irq(struct ath10k *ar)
{
/* IMPORTANT: INTR_CLR register has to be set after
* INTR_ENABLE is set to 0, otherwise interrupt can not be
@@ -739,7 +739,7 @@ void ath10k_pci_disable_and_clear_legacy_irq(struct ath10k *ar)
PCIE_INTR_ENABLE_ADDRESS);
}

-void ath10k_pci_enable_legacy_irq(struct ath10k *ar)
+void ath10k_pci_enable_intx_irq(struct ath10k *ar)
{
ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS +
PCIE_INTR_ENABLE_ADDRESS,
@@ -1935,7 +1935,7 @@ static void ath10k_pci_irq_msi_fw_unmask(struct ath10k *ar)
static void ath10k_pci_irq_disable(struct ath10k *ar)
{
ath10k_ce_disable_interrupts(ar);
- ath10k_pci_disable_and_clear_legacy_irq(ar);
+ ath10k_pci_disable_and_clear_intx_irq(ar);
ath10k_pci_irq_msi_fw_mask(ar);
}

@@ -1949,7 +1949,7 @@ static void ath10k_pci_irq_sync(struct ath10k *ar)
static void ath10k_pci_irq_enable(struct ath10k *ar)
{
ath10k_ce_enable_interrupts(ar);
- ath10k_pci_enable_legacy_irq(ar);
+ ath10k_pci_enable_intx_irq(ar);
ath10k_pci_irq_msi_fw_unmask(ar);
}

@@ -3111,11 +3111,11 @@ static irqreturn_t ath10k_pci_interrupt_handler(int irq, void *arg)
return IRQ_NONE;
}

- if ((ar_pci->oper_irq_mode == ATH10K_PCI_IRQ_LEGACY) &&
+ if ((ar_pci->oper_irq_mode == ATH10K_PCI_IRQ_INTX) &&
!ath10k_pci_irq_pending(ar))
return IRQ_NONE;

- ath10k_pci_disable_and_clear_legacy_irq(ar);
+ ath10k_pci_disable_and_clear_intx_irq(ar);
ath10k_pci_irq_msi_fw_mask(ar);
napi_schedule(&ar->napi);

@@ -3152,7 +3152,7 @@ static int ath10k_pci_napi_poll(struct napi_struct *ctx, int budget)
napi_schedule(ctx);
goto out;
}
- ath10k_pci_enable_legacy_irq(ar);
+ ath10k_pci_enable_intx_irq(ar);
ath10k_pci_irq_msi_fw_unmask(ar);
}

@@ -3177,7 +3177,7 @@ static int ath10k_pci_request_irq_msi(struct ath10k *ar)
return 0;
}

-static int ath10k_pci_request_irq_legacy(struct ath10k *ar)
+static int ath10k_pci_request_irq_intx(struct ath10k *ar)
{
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
int ret;
@@ -3199,8 +3199,8 @@ static int ath10k_pci_request_irq(struct ath10k *ar)
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);

switch (ar_pci->oper_irq_mode) {
- case ATH10K_PCI_IRQ_LEGACY:
- return ath10k_pci_request_irq_legacy(ar);
+ case ATH10K_PCI_IRQ_INTX:
+ return ath10k_pci_request_irq_intx(ar);
case ATH10K_PCI_IRQ_MSI:
return ath10k_pci_request_irq_msi(ar);
default:
@@ -3232,7 +3232,7 @@ static int ath10k_pci_init_irq(struct ath10k *ar)
ath10k_pci_irq_mode);

/* Try MSI */
- if (ath10k_pci_irq_mode != ATH10K_PCI_IRQ_LEGACY) {
+ if (ath10k_pci_irq_mode != ATH10K_PCI_IRQ_INTX) {
ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_MSI;
ret = pci_enable_msi(ar_pci->pdev);
if (ret == 0)
@@ -3250,7 +3250,7 @@ static int ath10k_pci_init_irq(struct ath10k *ar)
* For now, fix the race by repeating the write in below
* synchronization checking.
*/
- ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_LEGACY;
+ ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_INTX;

ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS + PCIE_INTR_ENABLE_ADDRESS,
PCIE_INTR_FIRMWARE_MASK | PCIE_INTR_CE_MASK_ALL);
@@ -3258,7 +3258,7 @@ static int ath10k_pci_init_irq(struct ath10k *ar)
return 0;
}

-static void ath10k_pci_deinit_irq_legacy(struct ath10k *ar)
+static void ath10k_pci_deinit_irq_intx(struct ath10k *ar)
{
ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS + PCIE_INTR_ENABLE_ADDRESS,
0);
@@ -3269,8 +3269,8 @@ static int ath10k_pci_deinit_irq(struct ath10k *ar)
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);

switch (ar_pci->oper_irq_mode) {
- case ATH10K_PCI_IRQ_LEGACY:
- ath10k_pci_deinit_irq_legacy(ar);
+ case ATH10K_PCI_IRQ_INTX:
+ ath10k_pci_deinit_irq_intx(ar);
break;
default:
pci_disable_msi(ar_pci->pdev);
@@ -3307,14 +3307,14 @@ int ath10k_pci_wait_for_target_init(struct ath10k *ar)
if (val & FW_IND_INITIALIZED)
break;

- if (ar_pci->oper_irq_mode == ATH10K_PCI_IRQ_LEGACY)
+ if (ar_pci->oper_irq_mode == ATH10K_PCI_IRQ_INTX)
/* Fix potential race by repeating CORE_BASE writes */
- ath10k_pci_enable_legacy_irq(ar);
+ ath10k_pci_enable_intx_irq(ar);

mdelay(10);
} while (time_before(jiffies, timeout));

- ath10k_pci_disable_and_clear_legacy_irq(ar);
+ ath10k_pci_disable_and_clear_intx_irq(ar);
ath10k_pci_irq_msi_fw_mask(ar);

if (val == 0xffffffff) {
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index 27bb4cf2dfea..4c3f536f2ea1 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -101,7 +101,7 @@ struct ath10k_pci_supp_chip {

enum ath10k_pci_irq_mode {
ATH10K_PCI_IRQ_AUTO = 0,
- ATH10K_PCI_IRQ_LEGACY = 1,
+ ATH10K_PCI_IRQ_INTX = 1,
ATH10K_PCI_IRQ_MSI = 2,
};

@@ -243,9 +243,9 @@ int ath10k_pci_init_pipes(struct ath10k *ar);
int ath10k_pci_init_config(struct ath10k *ar);
void ath10k_pci_rx_post(struct ath10k *ar);
void ath10k_pci_flush(struct ath10k *ar);
-void ath10k_pci_enable_legacy_irq(struct ath10k *ar);
+void ath10k_pci_enable_intx_irq(struct ath10k *ar);
bool ath10k_pci_irq_pending(struct ath10k *ar);
-void ath10k_pci_disable_and_clear_legacy_irq(struct ath10k *ar);
+void ath10k_pci_disable_and_clear_intx_irq(struct ath10k *ar);
void ath10k_pci_irq_msi_fw_mask(struct ath10k *ar);
int ath10k_pci_wait_for_target_init(struct ath10k *ar);
int ath10k_pci_setup_resource(struct ath10k *ar);
--
2.44.0


2024-03-25 12:41:17

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 10/28] drm: amdgpu: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 7e6d09730e6d..d18113017ee7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -279,7 +279,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
adev->irq.msi_enabled = false;

if (!amdgpu_msi_ok(adev))
- flags = PCI_IRQ_LEGACY;
+ flags = PCI_IRQ_INTX;
else
flags = PCI_IRQ_ALL_TYPES;

--
2.44.0


2024-03-25 12:41:23

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 03/28] PCI: documentation: Use PCI_IRQ_INTX

Change all references to PCI_IRQ_LEGACY to PCI_IRQ_INTX in the PCI
documentation to reflect that PCI_IRQ_LEGACY is deprecated.

Signed-off-by: Damien Le Moal <[email protected]>
---
Documentation/PCI/msi-howto.rst | 2 +-
Documentation/PCI/pci.rst | 2 +-
Documentation/translations/zh_CN/PCI/msi-howto.rst | 2 +-
Documentation/translations/zh_CN/PCI/pci.rst | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/PCI/msi-howto.rst b/Documentation/PCI/msi-howto.rst
index 783d30b7bb42..0692c9aec66f 100644
--- a/Documentation/PCI/msi-howto.rst
+++ b/Documentation/PCI/msi-howto.rst
@@ -103,7 +103,7 @@ min_vecs argument set to this limit, and the PCI core will return -ENOSPC
if it can't meet the minimum number of vectors.

The flags argument is used to specify which type of interrupt can be used
-by the device and the driver (PCI_IRQ_LEGACY, PCI_IRQ_MSI, PCI_IRQ_MSIX).
+by the device and the driver (PCI_IRQ_INTX, PCI_IRQ_MSI, PCI_IRQ_MSIX).
A convenient short-hand (PCI_IRQ_ALL_TYPES) is also available to ask for
any possible kind of interrupt. If the PCI_IRQ_AFFINITY flag is set,
pci_alloc_irq_vectors() will spread the interrupts around the available CPUs.
diff --git a/Documentation/PCI/pci.rst b/Documentation/PCI/pci.rst
index cced568d78e9..dd7b1c0c21da 100644
--- a/Documentation/PCI/pci.rst
+++ b/Documentation/PCI/pci.rst
@@ -335,7 +335,7 @@ causes the PCI support to program CPU vector data into the PCI device
capability registers. Many architectures, chip-sets, or BIOSes do NOT
support MSI or MSI-X and a call to pci_alloc_irq_vectors with just
the PCI_IRQ_MSI and PCI_IRQ_MSIX flags will fail, so try to always
-specify PCI_IRQ_LEGACY as well.
+specify PCI_IRQ_INTX as well.

Drivers that have different interrupt handlers for MSI/MSI-X and
legacy INTx should chose the right one based on the msi_enabled
diff --git a/Documentation/translations/zh_CN/PCI/msi-howto.rst b/Documentation/translations/zh_CN/PCI/msi-howto.rst
index 1b9b5ea790d8..95baadf767e4 100644
--- a/Documentation/translations/zh_CN/PCI/msi-howto.rst
+++ b/Documentation/translations/zh_CN/PCI/msi-howto.rst
@@ -88,7 +88,7 @@ MSI功能。
如果设备对最小数量的向量有要求,驱动程序可以传递一个min_vecs参数,设置为这个限制,
如果PCI核不能满足最小数量的向量,将返回-ENOSPC。

-flags参数用来指定设备和驱动程序可以使用哪种类型的中断(PCI_IRQ_LEGACY, PCI_IRQ_MSI,
+flags参数用来指定设备和驱动程序可以使用哪种类型的中断(PCI_IRQ_INTX, PCI_IRQ_MSI,
PCI_IRQ_MSIX)。一个方便的短语(PCI_IRQ_ALL_TYPES)也可以用来要求任何可能的中断类型。
如果PCI_IRQ_AFFINITY标志被设置,pci_alloc_irq_vectors()将把中断分散到可用的CPU上。

diff --git a/Documentation/translations/zh_CN/PCI/pci.rst b/Documentation/translations/zh_CN/PCI/pci.rst
index 83c2a41d38d3..347f5c3f5ce9 100644
--- a/Documentation/translations/zh_CN/PCI/pci.rst
+++ b/Documentation/translations/zh_CN/PCI/pci.rst
@@ -304,7 +304,7 @@ MSI-X可以分配几个单独的向量。
的PCI_IRQ_MSI和/或PCI_IRQ_MSIX标志来启用MSI功能。这将导致PCI支持将CPU向量数
据编程到PCI设备功能寄存器中。许多架构、芯片组或BIOS不支持MSI或MSI-X,调用
``pci_alloc_irq_vectors`` 时只使用PCI_IRQ_MSI和PCI_IRQ_MSIX标志会失败,
-所以尽量也要指定 ``PCI_IRQ_LEGACY`` 。
+所以尽量也要指定 ``PCI_IRQ_INTX`` 。

对MSI/MSI-X和传统INTx有不同中断处理程序的驱动程序应该在调用
``pci_alloc_irq_vectors`` 后根据 ``pci_dev``结构体中的 ``msi_enabled``
--
2.44.0


2024-03-25 12:41:34

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 20/28] net wireless; realtec: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/net/wireless/realtek/rtw88/pci.c | 2 +-
drivers/net/wireless/realtek/rtw89/pci.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
index 9986a4cb37eb..282f1e5a882e 100644
--- a/drivers/net/wireless/realtek/rtw88/pci.c
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
@@ -1612,7 +1612,7 @@ static struct rtw_hci_ops rtw_pci_ops = {

static int rtw_pci_request_irq(struct rtw_dev *rtwdev, struct pci_dev *pdev)
{
- unsigned int flags = PCI_IRQ_LEGACY;
+ unsigned int flags = PCI_IRQ_INTX;
int ret;

if (!rtw_disable_msi)
diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c
index 19001130ad94..100549694e53 100644
--- a/drivers/net/wireless/realtek/rtw89/pci.c
+++ b/drivers/net/wireless/realtek/rtw89/pci.c
@@ -3547,7 +3547,7 @@ static int rtw89_pci_request_irq(struct rtw89_dev *rtwdev,
unsigned long flags = 0;
int ret;

- flags |= PCI_IRQ_LEGACY | PCI_IRQ_MSI;
+ flags |= PCI_IRQ_INTX | PCI_IRQ_MSI;
ret = pci_alloc_irq_vectors(pdev, 1, 1, flags);
if (ret < 0) {
rtw89_err(rtwdev, "failed to alloc irq vectors, ret %d\n", ret);
--
2.44.0


2024-03-25 12:41:50

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 18/28] net: wangxun: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/net/ethernet/wangxun/libwx/wx_lib.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
index 6dff2c85682d..ae0b940717a8 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
@@ -1674,14 +1674,14 @@ static int wx_set_interrupt_capability(struct wx *wx)
/* minmum one for queue, one for misc*/
nvecs = 1;
nvecs = pci_alloc_irq_vectors(pdev, nvecs,
- nvecs, PCI_IRQ_MSI | PCI_IRQ_LEGACY);
+ nvecs, PCI_IRQ_MSI | PCI_IRQ_INTX);
if (nvecs == 1) {
if (pdev->msi_enabled)
wx_err(wx, "Fallback to MSI.\n");
else
- wx_err(wx, "Fallback to LEGACY.\n");
+ wx_err(wx, "Fallback to INTX.\n");
} else {
- wx_err(wx, "Failed to allocate MSI/LEGACY interrupts. Error: %d\n", nvecs);
+ wx_err(wx, "Failed to allocate MSI/INTX interrupts. Error: %d\n", nvecs);
return nvecs;
}

@@ -2127,7 +2127,7 @@ void wx_write_eitr(struct wx_q_vector *q_vector)
* wx_configure_vectors - Configure vectors for hardware
* @wx: board private structure
*
- * wx_configure_vectors sets up the hardware to properly generate MSI-X/MSI/LEGACY
+ * wx_configure_vectors sets up the hardware to properly generate MSI-X/MSI/INTX
* interrupts.
**/
void wx_configure_vectors(struct wx *wx)
--
2.44.0


2024-03-25 12:42:41

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 06/28] tty: 8250_pci: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/tty/serial/8250/8250_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 0d35c77fad9e..400b16c0336c 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -4108,7 +4108,7 @@ pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board)
rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES);
} else {
pci_dbg(dev, "Using legacy interrupts\n");
- rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY);
+ rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_INTX);
}
if (rc < 0) {
kfree(priv);
--
2.44.0


2024-03-25 12:43:04

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 05/28] usb: hcd-pci: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/usb/core/hcd-pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index ee3156f49533..a08f3f228e6d 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -189,7 +189,8 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct hc_driver *driver)
* make sure irq setup is not touched for xhci in generic hcd code
*/
if ((driver->flags & HCD_MASK) < HCD_USB3) {
- retval = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY | PCI_IRQ_MSI);
+ retval = pci_alloc_irq_vectors(dev, 1, 1,
+ PCI_IRQ_INTX | PCI_IRQ_MSI);
if (retval < 0) {
dev_err(&dev->dev,
"Found HC with no IRQ. Check BIOS/PCI %s setup!\n",
--
2.44.0


2024-03-25 13:03:35

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 28/28] PCI: Remove PCI_IRQ_LEGACY

Replace the last references to PCI_IRQ_LEGACY with PCI_IRQ_INTX in pci.h
header file. With this change, PCI_IRQ_LEGACY is unused and we can
remove its definition.

Signed-off-by: Damien Le Moal <[email protected]>
---
include/linux/pci.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 16493426a04f..b19992a5dfaf 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1077,8 +1077,6 @@ enum {
#define PCI_IRQ_MSIX (1 << 2) /* Allow MSI-X interrupts */
#define PCI_IRQ_AFFINITY (1 << 3) /* Auto-assign affinity */

-#define PCI_IRQ_LEGACY PCI_IRQ_INTX /* Deprecated! Use PCI_IRQ_INTX */
-
/* These external functions are only available when PCI support is enabled */
#ifdef CONFIG_PCI

@@ -1648,8 +1646,7 @@ int pci_set_vga_state(struct pci_dev *pdev, bool decode,
*/
#define PCI_IRQ_VIRTUAL (1 << 4)

-#define PCI_IRQ_ALL_TYPES \
- (PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX)
+#define PCI_IRQ_ALL_TYPES (PCI_IRQ_INTX | PCI_IRQ_MSI | PCI_IRQ_MSIX)

#include <linux/dmapool.h>

@@ -1719,7 +1716,7 @@ pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs,
unsigned int max_vecs, unsigned int flags,
struct irq_affinity *aff_desc)
{
- if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1 && dev->irq)
+ if ((flags & PCI_IRQ_INTX) && min_vecs == 1 && dev->irq)
return 1;
return -ENOSPC;
}
--
2.44.0


2024-03-25 14:06:15

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 09/28] mfd: intel-lpss-pci: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/mfd/intel-lpss-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index 8c00e0c695c5..9f4782bdbf4b 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -54,7 +54,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
if (ret)
return ret;

- ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY);
+ ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_INTX);
if (ret < 0)
return ret;

--
2.44.0


2024-03-25 14:48:58

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 07/28] platform: intel_ips: Use PCI_IRQ_INTX

Hi,

On 3/25/24 8:09 AM, Damien Le Moal wrote:
> Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> macro.
>
> Signed-off-by: Damien Le Moal <[email protected]>

Thanks, patch looks good to me, feel free to merge
this through whatever tree is convenient (or let me
know if you want me to pick up just this one patch
from the series).

Acked-by: Hans de Goede <[email protected]>

Regards,

Hans




> ---
> drivers/platform/x86/intel_ips.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
> index ba38649cc142..73ec4460a151 100644
> --- a/drivers/platform/x86/intel_ips.c
> +++ b/drivers/platform/x86/intel_ips.c
> @@ -1505,7 +1505,7 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
> * IRQ handler for ME interaction
> * Note: don't use MSI here as the PCH has bugs.
> */
> - ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY);
> + ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_INTX);
> if (ret < 0)
> return ret;
>


2024-03-25 15:35:36

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 13/28] misc: vmci_guest: Use PCI_IRQ_ALL_TYPES

In vmci_guest_probe_device(), remove the reference to PCI_IRQ_LEGACY by
using PCI_IRQ_ALL_TYPES instead of an explicit OR of all IRQ types.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/misc/vmw_vmci/vmci_guest.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/misc/vmw_vmci/vmci_guest.c b/drivers/misc/vmw_vmci/vmci_guest.c
index 4f8d962bb5b2..c61e8953511d 100644
--- a/drivers/misc/vmw_vmci/vmci_guest.c
+++ b/drivers/misc/vmw_vmci/vmci_guest.c
@@ -787,8 +787,7 @@ static int vmci_guest_probe_device(struct pci_dev *pdev,
error = pci_alloc_irq_vectors(pdev, num_irq_vectors, num_irq_vectors,
PCI_IRQ_MSIX);
if (error < 0) {
- error = pci_alloc_irq_vectors(pdev, 1, 1,
- PCI_IRQ_MSIX | PCI_IRQ_MSI | PCI_IRQ_LEGACY);
+ error = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
if (error < 0)
goto err_unsubscribe_event;
} else {
--
2.44.0


2024-03-25 15:52:30

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 02/28] PCI: portdrv: Use PCI_IRQ_INTX

In the PCI Express Port Bus Driver, use the macro PCI_IRQ_INTX instead
of the now deprecated PCI_IRQ_LEGACY macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/pci/pcie/portdrv.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
index 14a4b89a3b83..bb65dfe43409 100644
--- a/drivers/pci/pcie/portdrv.c
+++ b/drivers/pci/pcie/portdrv.c
@@ -187,15 +187,15 @@ static int pcie_init_service_irqs(struct pci_dev *dev, int *irqs, int mask)
* interrupt.
*/
if ((mask & PCIE_PORT_SERVICE_PME) && pcie_pme_no_msi())
- goto legacy_irq;
+ goto intx_irq;

/* Try to use MSI-X or MSI if supported */
if (pcie_port_enable_irq_vec(dev, irqs, mask) == 0)
return 0;

-legacy_irq:
- /* fall back to legacy IRQ */
- ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY);
+intx_irq:
+ /* fall back to INTX IRQ */
+ ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_INTX);
if (ret < 0)
return -ENODEV;

--
2.44.0


2024-03-25 16:30:58

by Deucher, Alexander

[permalink] [raw]
Subject: RE: [PATCH 10/28] drm: amdgpu: Use PCI_IRQ_INTX

[Public]

> -----Original Message-----
> From: amd-gfx <[email protected]> On Behalf Of
> Damien Le Moal
> Sent: Monday, March 25, 2024 3:09 AM
> To: [email protected]; Bjorn Helgaas <[email protected]>;
> Manivannan Sadhasivami <[email protected]>; linux-
> [email protected]; Martin K . Petersen <[email protected]>;
> Jaroslav Kysela <[email protected]>; [email protected]; Greg Kroah-
> Hartman <[email protected]>; [email protected]; linux-
> [email protected]; Hans de Goede <[email protected]>; platform-
> [email protected]; [email protected]; Lee Jones <[email protected]>;
> David Airlie <[email protected]>; [email protected]; Jason
> Gunthorpe <[email protected]>; [email protected]; David S . Miller
> <[email protected]>; Eric Dumazet <[email protected]>;
> [email protected]; [email protected]
> Subject: [PATCH 10/28] drm: amdgpu: Use PCI_IRQ_INTX
>
> Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> macro.
>
> Signed-off-by: Damien Le Moal <[email protected]>

Feel free to take it through whatever tree makes sense. If you want me to pick it up, let me know.
Acked-by: Alex Deucher <[email protected]>

> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index 7e6d09730e6d..d18113017ee7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -279,7 +279,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
> adev->irq.msi_enabled = false;
>
> if (!amdgpu_msi_ok(adev))
> - flags = PCI_IRQ_LEGACY;
> + flags = PCI_IRQ_INTX;
> else
> flags = PCI_IRQ_ALL_TYPES;
>
> --
> 2.44.0


2024-03-25 16:36:28

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 01/28] PCI: msi: Use PCI_IRQ_INTX

In pci_alloc_irq_vectors_affinity(), use the macro PCI_IRQ_INTX instead
of the now deprecated PCI_IRQ_LEGACY macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/pci/msi/api.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/msi/api.c b/drivers/pci/msi/api.c
index be679aa5db64..dfba4d6dd535 100644
--- a/drivers/pci/msi/api.c
+++ b/drivers/pci/msi/api.c
@@ -213,8 +213,8 @@ EXPORT_SYMBOL(pci_disable_msix);
* * %PCI_IRQ_MSIX Allow trying MSI-X vector allocations
* * %PCI_IRQ_MSI Allow trying MSI vector allocations
*
- * * %PCI_IRQ_LEGACY Allow trying legacy INTx interrupts, if
- * and only if @min_vecs == 1
+ * * %PCI_IRQ_INTX Allow trying INTx interrupts, if and
+ * only if @min_vecs == 1
*
* * %PCI_IRQ_AFFINITY Auto-manage IRQs affinity by spreading
* the vectors around available CPUs
@@ -279,8 +279,8 @@ int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs,
return nvecs;
}

- /* use legacy IRQ if allowed */
- if (flags & PCI_IRQ_LEGACY) {
+ /* use INTx IRQ if allowed */
+ if (flags & PCI_IRQ_INTX) {
if (min_vecs == 1 && dev->irq) {
/*
* Invoke the affinity spreading logic to ensure that
--
2.44.0


2024-03-25 16:36:59

by Amadeusz Sławiński

[permalink] [raw]
Subject: Re: [PATCH 04/28] sound: intel: Use PCI_IRQ_INTX

On 3/25/2024 8:09 AM, Damien Le Moal wrote:
> Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> macro.
>
> Signed-off-by: Damien Le Moal <[email protected]>
> ---
> sound/soc/intel/avs/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c
> index d7f8940099ce..69818e4b43da 100644
> --- a/sound/soc/intel/avs/core.c
> +++ b/sound/soc/intel/avs/core.c
> @@ -343,7 +343,7 @@ static int avs_hdac_acquire_irq(struct avs_dev *adev)
> int ret;
>
> /* request one and check that we only got one interrupt */
> - ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI | PCI_IRQ_LEGACY);
> + ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI | PCI_IRQ_INTX);
> if (ret != 1) {
> dev_err(adev->dev, "Failed to allocate IRQ vector: %d\n", ret);
> return ret;

Reviewed-by: Amadeusz Sławiński <[email protected]>

2024-03-25 16:45:53

by Damien Le Moal

[permalink] [raw]
Subject: [PATCH 16/28] net: atheros: alx: Use PCI_IRQ_INTX

Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
macro.

Signed-off-by: Damien Le Moal <[email protected]>
---
drivers/net/ethernet/atheros/alx/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index 49bb9a8f00e6..0dbb541155f3 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -901,7 +901,7 @@ static int alx_init_intr(struct alx_priv *alx)
int ret;

ret = pci_alloc_irq_vectors(alx->hw.pdev, 1, 1,
- PCI_IRQ_MSI | PCI_IRQ_LEGACY);
+ PCI_IRQ_MSI | PCI_IRQ_INTX);
if (ret < 0)
return ret;

--
2.44.0


2024-03-25 17:22:20

by Dave Jiang

[permalink] [raw]
Subject: Re: [PATCH 08/28] ntb: Use PCI_IRQ_INTX



On 3/25/24 12:09 AM, Damien Le Moal wrote:
> Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> macro.
>
> Signed-off-by: Damien Le Moal <[email protected]>

Reviewed-by: Dave Jiang <[email protected]>

> ---
> drivers/ntb/hw/idt/ntb_hw_idt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c
> index 48823b53ede3..48dfb1a69a77 100644
> --- a/drivers/ntb/hw/idt/ntb_hw_idt.c
> +++ b/drivers/ntb/hw/idt/ntb_hw_idt.c
> @@ -2129,7 +2129,7 @@ static int idt_init_isr(struct idt_ntb_dev *ndev)
> int ret;
>
> /* Allocate just one interrupt vector for the ISR */
> - ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI | PCI_IRQ_LEGACY);
> + ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI | PCI_IRQ_INTX);
> if (ret != 1) {
> dev_err(&pdev->dev, "Failed to allocate IRQ vector");
> return ret;

2024-03-25 18:29:27

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 00/28] Remove PCI_IRQ_LEGACY

On Mon, Mar 25, 2024 at 04:09:11PM +0900, Damien Le Moal wrote:
> This patch series removes the use of the depracated PCI_IRQ_LEGACY macro
> and replace it with PCI_IRQ_INTX. No functional change.
>
> Damien Le Moal (28):
> PCI: msi: Use PCI_IRQ_INTX
> PCI: portdrv: Use PCI_IRQ_INTX
> PCI: documentation: Use PCI_IRQ_INTX
> sound: intel: Use PCI_IRQ_INTX
> usb: hcd-pci: Use PCI_IRQ_INTX
> tty: 8250_pci: Use PCI_IRQ_INTX
> platform: intel_ips: Use PCI_IRQ_INTX
> ntb: Use PCI_IRQ_INTX
> mfd: intel-lpss-pci: Use PCI_IRQ_INTX
> drm: amdgpu: Use PCI_IRQ_INTX
> infiniband: qib: Use PCI_IRQ_INTX
> infiniband: vmw_pvrdma: Use PCI_IRQ_INTX
> misc: vmci_guest: Use PCI_IRQ_ALL_TYPES
> net: xgbe: Use PCI_IRQ_INTX
> net: aquantia atlantic: Use PCI_IRQ_INTX
> net: atheros: alx: Use PCI_IRQ_INTX
> net: realtek: r8169: Use PCI_IRQ_INTX
> net: wangxun: Use PCI_IRQ_INTX
> net: wireless: ath10k: Use references to INTX instead of LEGACY
> net wireless; realtec: Use PCI_IRQ_INTX
> scsi: arcmsr: Use PCI_IRQ_INTX
> scsi: hpsa: Use PCI_IRQ_INTX
> scsi: ipr: Use PCI_IRQ_INTX
> scsi: megaraid: Use PCI_IRQ_INTX
> scsi: mpt3sas: Use PCI_IRQ_INTX
> scsi: pmcraid: Use PCI_IRQ_INTX
> scsi: vmw_pvscsi: Do not use PCI_IRQ_LEGACY
> PCI: Remove PCI_IRQ_LEGACY
>
> Documentation/PCI/msi-howto.rst | 2 +-
> Documentation/PCI/pci.rst | 2 +-
> .../translations/zh_CN/PCI/msi-howto.rst | 2 +-
> Documentation/translations/zh_CN/PCI/pci.rst | 2 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
> drivers/infiniband/hw/qib/qib_iba7220.c | 2 +-
> drivers/infiniband/hw/qib/qib_iba7322.c | 5 ++-
> drivers/infiniband/hw/qib/qib_pcie.c | 2 +-
> .../infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
> drivers/mfd/intel-lpss-pci.c | 2 +-
> drivers/misc/vmw_vmci/vmci_guest.c | 3 +-
> drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 +-
> .../net/ethernet/aquantia/atlantic/aq_cfg.h | 2 +-
> .../net/ethernet/aquantia/atlantic/aq_hw.h | 2 +-
> .../net/ethernet/aquantia/atlantic/aq_nic.c | 2 +-
> .../ethernet/aquantia/atlantic/aq_pci_func.c | 9 ++---
> .../aquantia/atlantic/hw_atl/hw_atl_a0.c | 2 +-
> .../aquantia/atlantic/hw_atl/hw_atl_b0.c | 2 +-
> .../aquantia/atlantic/hw_atl2/hw_atl2.c | 2 +-
> drivers/net/ethernet/atheros/alx/main.c | 2 +-
> drivers/net/ethernet/realtek/r8169_main.c | 2 +-
> drivers/net/ethernet/wangxun/libwx/wx_lib.c | 8 ++---
> drivers/net/wireless/ath/ath10k/ahb.c | 18 +++++-----
> drivers/net/wireless/ath/ath10k/pci.c | 36 +++++++++----------
> drivers/net/wireless/ath/ath10k/pci.h | 6 ++--
> drivers/net/wireless/realtek/rtw88/pci.c | 2 +-
> drivers/net/wireless/realtek/rtw89/pci.c | 2 +-
> drivers/ntb/hw/idt/ntb_hw_idt.c | 2 +-
> drivers/pci/msi/api.c | 8 ++---
> drivers/pci/pcie/portdrv.c | 8 ++---
> drivers/platform/x86/intel_ips.c | 2 +-
> drivers/scsi/arcmsr/arcmsr_hba.c | 2 +-
> drivers/scsi/hpsa.c | 2 +-
> drivers/scsi/ipr.c | 2 +-
> drivers/scsi/megaraid/megaraid_sas_base.c | 4 +--
> drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
> drivers/scsi/pmcraid.c | 2 +-
> drivers/scsi/vmw_pvscsi.c | 2 +-
> drivers/tty/serial/8250/8250_pci.c | 2 +-
> drivers/usb/core/hcd-pci.c | 3 +-
> include/linux/pci.h | 7 ++--
> sound/soc/intel/avs/core.c | 2 +-
> 42 files changed, 84 insertions(+), 91 deletions(-)

I applied all these to pci/enumeration for v6.10, thanks!

I added acks and reviewed-by and will update if we receive more, and
adjusted subject lines to add "... instead of PCI_IRQ_LEGACY" and in
some cases to match history of the file.

Bjorn

2024-03-25 19:45:22

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 09/28] mfd: intel-lpss-pci: Use PCI_IRQ_INTX

On Mon, Mar 25, 2024 at 04:09:20PM +0900, Damien Le Moal wrote:
> Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> macro.

Not needed anymore. MFD subsystem has a patch moving this to MSI support.
But you need to coordinate with Lee how to proceed (in case of conflicts MFD
version should be taken).

--
With Best Regards,
Andy Shevchenko



2024-03-25 21:05:13

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 09/28] mfd: intel-lpss-pci: Use PCI_IRQ_INTX

On Mon, Mar 25, 2024 at 09:39:38PM +0200, Andy Shevchenko wrote:
> On Mon, Mar 25, 2024 at 04:09:20PM +0900, Damien Le Moal wrote:
> > Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> > macro.
>
> Not needed anymore. MFD subsystem has a patch moving this to MSI support.
> But you need to coordinate with Lee how to proceed (in case of conflicts MFD
> version should be taken).

Thanks! It looks like your patch [1] has been applied already and
makes this one obsolete, so I dropped this one from the series.

Bjorn

[1] https://lore.kernel.org/all/[email protected]/

2024-03-25 21:51:00

by Heiner Kallweit

[permalink] [raw]
Subject: Re: [PATCH 17/28] net: realtek: r8169: Use PCI_IRQ_INTX

On 25.03.2024 08:09, Damien Le Moal wrote:
> Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> macro.
>
> Signed-off-by: Damien Le Moal <[email protected]>
> ---
> drivers/net/ethernet/realtek/r8169_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 5c879a5c86d7..7288afcc8c94 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -5076,7 +5076,7 @@ static int rtl_alloc_irq(struct rtl8169_private *tp)
> rtl_lock_config_regs(tp);
> fallthrough;
> case RTL_GIGA_MAC_VER_07 ... RTL_GIGA_MAC_VER_17:
> - flags = PCI_IRQ_LEGACY;
> + flags = PCI_IRQ_INTX;
> break;
> default:
> flags = PCI_IRQ_ALL_TYPES;

Acked-by: Heiner Kallweit <[email protected]>


2024-03-25 22:42:06

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [External] : [PATCH 00/28] Remove PCI_IRQ_LEGACY


Damien,

> This patch series removes the use of the depracated PCI_IRQ_LEGACY macro
> and replace it with PCI_IRQ_INTX. No functional change.

SCSI changes look good to me.

Acked-by: Martin K. Petersen <[email protected]>

--
Martin K. Petersen Oracle Linux Engineering

2024-03-26 01:28:33

by Damien Le Moal

[permalink] [raw]
Subject: Re: [PATCH 00/28] Remove PCI_IRQ_LEGACY

On 3/26/24 02:59, Bjorn Helgaas wrote:
> I applied all these to pci/enumeration for v6.10, thanks!
>
> I added acks and reviewed-by and will update if we receive more, and
> adjusted subject lines to add "... instead of PCI_IRQ_LEGACY" and in
> some cases to match history of the file.

Thanks Bjorn !

--
Damien Le Moal
Western Digital Research


2024-03-26 02:00:26

by Amadeusz Sławiński

[permalink] [raw]
Subject: Re: [PATCH 04/28] sound: intel: Use PCI_IRQ_INTX

On 3/25/2024 1:34 PM, Amadeusz Sławiński wrote:
> On 3/25/2024 8:09 AM, Damien Le Moal wrote:
>> Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
>> macro.
>>
>> Signed-off-by: Damien Le Moal <[email protected]>
>> ---
>>   sound/soc/intel/avs/core.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c
>> index d7f8940099ce..69818e4b43da 100644
>> --- a/sound/soc/intel/avs/core.c
>> +++ b/sound/soc/intel/avs/core.c
>> @@ -343,7 +343,7 @@ static int avs_hdac_acquire_irq(struct avs_dev *adev)
>>       int ret;
>>       /* request one and check that we only got one interrupt */
>> -    ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI |
>> PCI_IRQ_LEGACY);
>> +    ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI | PCI_IRQ_INTX);
>>       if (ret != 1) {
>>           dev_err(adev->dev, "Failed to allocate IRQ vector: %d\n", ret);
>>           return ret;
>
> Reviewed-by: Amadeusz Sławiński <[email protected]>

Sorry, one more thing, can you adjust commit title to:
ASoC: Intel: avs: Use PCI_IRQ_INTX

and with that, you can add above Reviewed-by:

Thanks!

2024-03-26 08:28:29

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 13/28] misc: vmci_guest: Use PCI_IRQ_ALL_TYPES

On Mon, Mar 25, 2024 at 04:09:24PM +0900, Damien Le Moal wrote:
> In vmci_guest_probe_device(), remove the reference to PCI_IRQ_LEGACY by
> using PCI_IRQ_ALL_TYPES instead of an explicit OR of all IRQ types.
>
> Signed-off-by: Damien Le Moal <[email protected]>
> ---

Acked-by: Greg Kroah-Hartman <[email protected]>

2024-03-26 08:28:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 06/28] tty: 8250_pci: Use PCI_IRQ_INTX

On Mon, Mar 25, 2024 at 04:09:17PM +0900, Damien Le Moal wrote:
> Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> macro.
>
> Signed-off-by: Damien Le Moal <[email protected]>

Acked-by: Greg Kroah-Hartman <[email protected]>

2024-03-26 08:29:35

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 05/28] usb: hcd-pci: Use PCI_IRQ_INTX

On Mon, Mar 25, 2024 at 04:09:16PM +0900, Damien Le Moal wrote:
> Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> macro.
>
> Signed-off-by: Damien Le Moal <[email protected]>


Acked-by: Greg Kroah-Hartman <[email protected]>

2024-03-26 21:14:55

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 09/28] mfd: intel-lpss-pci: Use PCI_IRQ_INTX

On Mon, Mar 25, 2024 at 04:04:44PM -0500, Bjorn Helgaas wrote:
> On Mon, Mar 25, 2024 at 09:39:38PM +0200, Andy Shevchenko wrote:
> > On Mon, Mar 25, 2024 at 04:09:20PM +0900, Damien Le Moal wrote:
> > > Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY
> > > macro.
> >
> > Not needed anymore. MFD subsystem has a patch moving this to MSI support.
> > But you need to coordinate with Lee how to proceed (in case of conflicts MFD
> > version should be taken).
>
> Thanks! It looks like your patch [1] has been applied already and
> makes this one obsolete, so I dropped this one from the series.

I put this patch back in to prevent an ordering requirement between
MFD and PCI. There will be a trivial merge conflict as Andy
mentioned.

> [1] https://lore.kernel.org/all/[email protected]/