Merge tag 'driver-core-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / include / linux / pci.h
index 844d38f..81a57b4 100644 (file)
@@ -379,10 +379,6 @@ struct pci_dev {
        unsigned int    mmio_always_on:1;       /* Disallow turning off io/mem
                                                   decoding during BAR sizing */
        unsigned int    wakeup_prepared:1;
-       unsigned int    runtime_d3cold:1;       /* Whether go through runtime
-                                                  D3cold, not set for devices
-                                                  powered on/off by the
-                                                  corresponding bridge */
        unsigned int    skip_bus_pm:1;  /* Internal: Skip bus-level PM */
        unsigned int    ignore_hotplug:1;       /* Ignore hotplug events */
        unsigned int    hotplug_user_indicators:1; /* SlotCtl indicators
@@ -899,6 +895,13 @@ struct module;
  *              created once it is bound to the driver.
  * @driver:    Driver model structure.
  * @dynids:    List of dynamically added device IDs.
+ * @driver_managed_dma: Device driver doesn't use kernel DMA API for DMA.
+ *             For most device drivers, no need to care about this flag
+ *             as long as all DMAs are handled through the kernel DMA API.
+ *             For some special ones, for example VFIO drivers, they know
+ *             how to manage the DMA themselves and set this flag so that
+ *             the IOMMU layer will allow them to setup and manage their
+ *             own I/O address space.
  */
 struct pci_driver {
        struct list_head        node;
@@ -917,6 +920,7 @@ struct pci_driver {
        const struct attribute_group **dev_groups;
        struct device_driver    driver;
        struct pci_dynids       dynids;
+       bool driver_managed_dma;
 };
 
 static inline struct pci_driver *to_pci_driver(struct device_driver *drv)