From 3eefa790c9681a2dcbc923542dcd85b6989e8855 Mon Sep 17 00:00:00 2001 From: Jisheng Zhang Date: Thu, 20 Apr 2017 18:27:18 +0800 Subject: PCI: 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 in designware, qcom, and vmd as IRQF_NO_THREAD explicitly. Signed-off-by: Jisheng Zhang Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch # vmd Acked-by: Jingoo Han # pcie-designware-plat.c --- drivers/pci/host/vmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/pci/host/vmd.c') diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c index e27ad2a..784f63b 100644 --- a/drivers/pci/host/vmd.c +++ b/drivers/pci/host/vmd.c @@ -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; } -- cgit v1.1 From 575a144e7b3006c1b583ccecc4ede8b180d00d0c Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Mon, 19 Jun 2017 15:26:57 -0500 Subject: PCI: vmd: Correct comment: VMD domains start at 0x10000, not 0x1000 VMD domains are allocated starting at 0x10000, not 0x1000 as the comment said. Correct the comment and add a reference to the ACPI spec for _SEG. Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch --- drivers/pci/host/vmd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/pci/host/vmd.c') diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c index e27ad2a..53aa1d4 100644 --- a/drivers/pci/host/vmd.c +++ b/drivers/pci/host/vmd.c @@ -539,7 +539,10 @@ static void vmd_detach_resources(struct vmd_dev *vmd) } /* - * VMD domains start at 0x1000 to not clash with ACPI _SEG domains. + * VMD domains start at 0x10000 to not clash with ACPI _SEG domains. + * Per ACPI r6.0, sec 6.5.6, _SEG returns an integer, of which the lower + * 16 bits are the PCI Segment Group (domain) number. Other bits are + * currently reserved. */ static int vmd_find_free_domain(void) { -- cgit v1.1 From 0cb259c47a4df466d641c1f07ae3eccaa9ba3ccb Mon Sep 17 00:00:00 2001 From: Jon Derrick Date: Thu, 22 Jun 2017 09:15:42 -0600 Subject: PCI: vmd: Move SRCU cleanup after bus, child device removal Recent __call_srcu() changes have exposed that we need to cleanup SRCU structures after pci_stop_root_bus() calls into vmd_msi_free(). Fixes: 3906b91844d6 ("PCI: vmd: Use SRCU as a local RCU to prevent delaying global RCU") Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Acked-by: Keith Busch Cc: # 4.11 --- drivers/pci/host/vmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/pci/host/vmd.c') diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c index 53aa1d4..9d83f37 100644 --- a/drivers/pci/host/vmd.c +++ b/drivers/pci/host/vmd.c @@ -736,10 +736,10 @@ static void vmd_remove(struct pci_dev *dev) struct vmd_dev *vmd = pci_get_drvdata(dev); vmd_detach_resources(vmd); - vmd_cleanup_srcu(vmd); sysfs_remove_link(&vmd->dev->dev.kobj, "domain"); pci_stop_root_bus(vmd->bus); pci_remove_root_bus(vmd->bus); + vmd_cleanup_srcu(vmd); vmd_teardown_dma_ops(vmd); irq_domain_remove(vmd->irq_domain); } -- cgit v1.1