]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/pci/host/vmd.c
Merge tag 'pci-v4.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[karo-tx-linux.git] / drivers / pci / host / vmd.c
index 31203d69616d9063aebaeb7b84cd4fadfce3dde9..6088c308319447c13d636753521e87dc9ad1fafb 100644 (file)
@@ -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)
 {
@@ -710,7 +713,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;
        }
@@ -739,10 +743,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);
 }