Skip to contentSkip to conversation

PCI: dwc/host: Mark PCIe/PCI (MSI) cascade ISR as IRQF_NO_THREAD

PATCH In review Jisheng Zhang 4 participants 4 messages Apr 20, 2017 – May 23, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: dwc/host: Mark PCIe/PCI (MSI) cascade ISR as IRQF_NO_THREAD

Similar as commit 8ff0ef996ca0 ("PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD"), we should mark PCIe/PCI (MSI) IRQ cascade handlers IRQF_NO_THREAD explicitly. I just found this issue in pcie-designware-plat driver, then searched the code, I think we should fix pcie-qcom and vmd as well.

---
 drivers/pci/dwc/pcie-designware-plat.c | 3 ++-
 drivers/pci/dwc/pcie-qcom.c            | 3 ++-
 drivers/pci/host/vmd.c                 | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/pci/dwc/pcie-designware-plat.c +2 -1
index f20d494922ab..0db1dafc82bb 100644
@@ -67,7 +67,8 @@ static int dw_plat_add_pcie_port(struct pcie_port *pp,
 
 		ret = devm_request_irq(dev, pp->msi_irq,
 					dw_plat_pcie_msi_irq_handler,
-					IRQF_SHARED, "dw-plat-pcie-msi", pp);
+					IRQF_SHARED | IRQF_NO_THREAD,
+					"dw-plat-pcie-msi", pp);
 		if (ret) {
 			dev_err(dev, "failed to request MSI IRQ\n");
 			return ret;
drivers/pci/dwc/pcie-qcom.c +2 -1
index 67eb7f5926dd..a5570c58081e 100644
@@ -727,7 +727,8 @@ static int qcom_pcie_probe(struct platform_device *pdev)
 
 		ret = devm_request_irq(dev, pp->msi_irq,
 				       qcom_pcie_msi_irq_handler,
-				       IRQF_SHARED, "qcom-pcie-msi", pp);
+				       IRQF_SHARED | IRQF_NO_THREAD,
+				       "qcom-pcie-msi", pp);
 		if (ret) {
 			dev_err(dev, "cannot request msi irq\n");
 			return ret;
drivers/pci/host/vmd.c +2 -1
index e27ad2a3bd33..784f63beb487 100644
@@ -704,7 +704,8 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 		INIT_LIST_HEAD(&vmd->irqs[i].irq_list);
 		err = devm_request_irq(&dev->dev, pci_irq_vector(dev, i),
-				       vmd_irq, 0, "vmd", &vmd->irqs[i]);
+				       vmd_irq, IRQF_NO_THREAD,
+				       "vmd", &vmd->irqs[i]);
 		if (err)
 			return err;
 	}
Signature · 1 line
2.11.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jisheng Zhang

Similar as commit 8ff0ef996ca0 ("PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD"), we should mark PCIe/PCI (MSI) IRQ cascade handlers IRQF_NO_THREAD explicitly. I just found this issue in pcie-designware-plat driver, then searched the code, I think we should fix pcie-qcom and vmd as well.

For pcie-designware-plat.c,

Thank you.

Best regards,
Jingoo Han

Quoted 12 lines
---
 drivers/pci/dwc/pcie-designware-plat.c | 3 ++-
 drivers/pci/dwc/pcie-qcom.c            | 3 ++-
 drivers/pci/host/vmd.c                 | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/pci/dwc/pcie-designware-plat.c +0 -0
index f20d494922ab..0db1dafc82bb 100644

drivers/pci/dwc/pcie-designware-plat.c static int dw_plat_add_pcie_port(struct pcie_port *pp, · line 70

Quoted 4 lines
drivers/pci/dwc/pcie-designware-plat.c +0 -1
@@ -67,7 +67,8 @@ static int dw_plat_add_pcie_port(struct pcie_port *pp,
 
 		ret = devm_request_irq(dev, pp->msi_irq,
 					dw_plat_pcie_msi_irq_handler,
-					IRQF_SHARED, "dw-plat-pcie-msi",

pp);

Quoted 37 lines
drivers/pci/dwc/pcie-designware-plat.c +2 -0
+					IRQF_SHARED | IRQF_NO_THREAD,
+					"dw-plat-pcie-msi", pp);
 		if (ret) {
 			dev_err(dev, "failed to request MSI IRQ\n");
 			return ret;
drivers/pci/dwc/pcie-qcom.c +2 -1
index 67eb7f5926dd..a5570c58081e 100644
@@ -727,7 +727,8 @@ static int qcom_pcie_probe(struct platform_device
 *pdev)
 
 		ret = devm_request_irq(dev, pp->msi_irq,
 				       qcom_pcie_msi_irq_handler,
-				       IRQF_SHARED, "qcom-pcie-msi", pp);
+				       IRQF_SHARED | IRQF_NO_THREAD,
+				       "qcom-pcie-msi", pp);
 		if (ret) {
 			dev_err(dev, "cannot request msi irq\n");
drivers/pci/dwc/pcie-qcom.c +0 -0
 			return ret;
drivers/pci/host/vmd.c +2 -1
index e27ad2a3bd33..784f63beb487 100644
@@ -704,7 +704,8 @@ static int vmd_probe(struct pci_dev *dev, const struct
 pci_device_id *id)
 
 		INIT_LIST_HEAD(&vmd->irqs[i].irq_list);
 		err = devm_request_irq(&dev->dev, pci_irq_vector(dev, i),
-				       vmd_irq, 0, "vmd", &vmd->irqs[i]);
+				       vmd_irq, IRQF_NO_THREAD,
+				       "vmd", &vmd->irqs[i]);
 		if (err)
 			return err;

}
--
2.11.0

Reviewed-by on v1 1/1
#2 lore raw
In reply to Jisheng Zhang
Quoted 6 lines · Jisheng Zhang

Similar as commit 8ff0ef996ca0 ("PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD"), we should mark PCIe/PCI (MSI) IRQ cascade handlers IRQF_NO_THREAD explicitly. I just found this issue in pcie-designware-plat driver, then searched the code, I think we should fix pcie-qcom and vmd as well.

Quoted 6 lines
---
 drivers/pci/dwc/pcie-designware-plat.c | 3 ++-
 drivers/pci/dwc/pcie-qcom.c            | 3 ++-
 drivers/pci/host/vmd.c                 | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

Okay for vmd driver.

#3 lore raw
In reply to Jisheng Zhang
Quoted 7 lines · Jisheng Zhang

Similar as commit 8ff0ef996ca0 ("PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD"), we should mark PCIe/PCI (MSI) IRQ cascade handlers IRQF_NO_THREAD explicitly. I just found this issue in pcie-designware-plat driver, then searched the code, I think we should fix pcie-qcom and vmd as well.

Applied with ack/reviewed-by from Jingoo and Keith to pci/host-designware for v4.13, thanks!

Quoted 51 lines
---
 drivers/pci/dwc/pcie-designware-plat.c | 3 ++-
 drivers/pci/dwc/pcie-qcom.c            | 3 ++-
 drivers/pci/host/vmd.c                 | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/pci/dwc/pcie-designware-plat.c +2 -1
index f20d494922ab..0db1dafc82bb 100644
@@ -67,7 +67,8 @@ static int dw_plat_add_pcie_port(struct pcie_port *pp,
 
 		ret = devm_request_irq(dev, pp->msi_irq,
 					dw_plat_pcie_msi_irq_handler,
-					IRQF_SHARED, "dw-plat-pcie-msi", pp);
+					IRQF_SHARED | IRQF_NO_THREAD,
+					"dw-plat-pcie-msi", pp);
 		if (ret) {
 			dev_err(dev, "failed to request MSI IRQ\n");
 			return ret;
drivers/pci/dwc/pcie-qcom.c +2 -1
index 67eb7f5926dd..a5570c58081e 100644
@@ -727,7 +727,8 @@ static int qcom_pcie_probe(struct platform_device *pdev)
 
 		ret = devm_request_irq(dev, pp->msi_irq,
 				       qcom_pcie_msi_irq_handler,
-				       IRQF_SHARED, "qcom-pcie-msi", pp);
+				       IRQF_SHARED | IRQF_NO_THREAD,
+				       "qcom-pcie-msi", pp);
 		if (ret) {
 			dev_err(dev, "cannot request msi irq\n");
 			return ret;
drivers/pci/host/vmd.c +2 -1
index e27ad2a3bd33..784f63beb487 100644
@@ -704,7 +704,8 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 		INIT_LIST_HEAD(&vmd->irqs[i].irq_list);
 		err = devm_request_irq(&dev->dev, pci_irq_vector(dev, i),
-				       vmd_irq, 0, "vmd", &vmd->irqs[i]);
+				       vmd_irq, IRQF_NO_THREAD,
+				       "vmd", &vmd->irqs[i]);
 		if (err)
 			return err;
 	}
Signature · 1 line
2.11.0