]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
IOMMU: Make dwo drivers use stateless device links
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Feb 2019 00:54:21 +0000 (01:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Feb 2019 09:04:08 +0000 (10:04 +0100)
The device links used by rockchip-iommu and exynos-iommu are
completely managed by these drivers within the IOMMU framework,
so there is no reason to involve the driver core in the management
of these links.

For this reason, make rockchip-iommu and exynos-iommu pass
DL_FLAG_STATELESS in flags to device_link_add(), so that the device
links used by them are stateless.

[Note that this change is requisite for a subsequent one that will
 rework the management of stateful device links in the driver core
 and it will not be compatible with the two drivers in question any
 more.]

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/exynos-iommu.c
drivers/iommu/rockchip-iommu.c

index 1bd0cd7168dfc92d2dcf7da7c78efc06c78b5f3b..05c6bc099d62524ba94700215d5c93571bf1876b 100644 (file)
@@ -1260,6 +1260,7 @@ static int exynos_iommu_add_device(struct device *dev)
                 * direct calls to pm_runtime_get/put in this driver.
                 */
                data->link = device_link_add(dev, data->sysmmu,
+                                            DL_FLAG_STATELESS |
                                             DL_FLAG_PM_RUNTIME);
        }
        iommu_group_put(group);
index c9ba9f377f631e4b64474c4f4f986263e94ea49b..77d4bd93fe4b89bbc45ad9bba40ca796eba2e9b4 100644 (file)
@@ -1071,7 +1071,8 @@ static int rk_iommu_add_device(struct device *dev)
        iommu_group_put(group);
 
        iommu_device_link(&iommu->iommu, dev);
-       data->link = device_link_add(dev, iommu->dev, DL_FLAG_PM_RUNTIME);
+       data->link = device_link_add(dev, iommu->dev,
+                                    DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME);
 
        return 0;
 }