linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Daniel Vetter <daniel@ffwll.ch>, Lukas Wunner <lukas@wunner.de>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	Lucas Stach <l.stach@pengutronix.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Joerg Roedel <jroedel@suse.de>
Subject: [PATCH v2 7/9] IOMMU: Make dwo drivers use stateless device links
Date: Fri, 01 Feb 2019 01:54:21 +0100	[thread overview]
Message-ID: <2241080.hZz7uDQtY8@aspire.rjw.lan> (raw)
In-Reply-To: <1952449.TVsm6CJCTy@aspire.rjw.lan>

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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>
---
 drivers/iommu/exynos-iommu.c   |    1 +
 drivers/iommu/rockchip-iommu.c |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

Index: linux-pm/drivers/iommu/rockchip-iommu.c
===================================================================
--- linux-pm.orig/drivers/iommu/rockchip-iommu.c
+++ linux-pm/drivers/iommu/rockchip-iommu.c
@@ -1071,7 +1071,8 @@ static int rk_iommu_add_device(struct de
 	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;
 }
Index: linux-pm/drivers/iommu/exynos-iommu.c
===================================================================
--- linux-pm.orig/drivers/iommu/exynos-iommu.c
+++ linux-pm/drivers/iommu/exynos-iommu.c
@@ -1260,6 +1260,7 @@ static int exynos_iommu_add_device(struc
 		 * 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);


  parent reply	other threads:[~2019-02-01  1:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01  0:44 [PATCH v2 0/9] driver core: Fix some device links issues and add "consumer autoprobe" flag Rafael J. Wysocki
2019-02-01  0:45 ` [PATCH v2 1/9] driver core: Fix DL_FLAG_AUTOREMOVE_SUPPLIER device link flag handling Rafael J. Wysocki
2019-02-01  0:46 ` [PATCH v2 2/9] driver core: Avoid careless re-use of existing device links Rafael J. Wysocki
2019-02-07 19:03   ` Lukas Wunner
2019-02-07 19:11     ` Rafael J. Wysocki
2019-02-01  0:47 ` [PATCH v2 3/9] driver core: Do not resume suppliers under device_links_write_lock() Rafael J. Wysocki
2019-02-01  0:49 ` [PATCH v2 4/9] driver core: Fix handling of runtime PM flags in device_link_add() Rafael J. Wysocki
2019-02-07 19:15   ` Lukas Wunner
2019-02-07 19:20     ` Rafael J. Wysocki
2019-02-01  0:50 ` [PATCH v2 5/9] driver core: Fix adding device links to probing suppliers Rafael J. Wysocki
2019-02-01  0:52 ` [PATCH v2 6/9] driver core: Do not call rpm_put_suppliers() in pm_runtime_drop_link() Rafael J. Wysocki
2019-02-01  0:54 ` Rafael J. Wysocki [this message]
2019-02-01  0:58 ` [PATCH v2 8/9] driver core: Make driver core own stateful device links Rafael J. Wysocki
2019-02-01  0:59 ` [PATCH v2 9/9] driver core: Add device link flag DL_FLAG_AUTOPROBE_CONSUMER Rafael J. Wysocki
2019-02-01  9:05 ` [PATCH v2 0/9] driver core: Fix some device links issues and add "consumer autoprobe" flag Greg Kroah-Hartman
2019-02-01  9:45   ` Rafael J. Wysocki
2019-02-01 15:17 ` Ulf Hansson
2019-02-04 11:40   ` Rafael J. Wysocki
2019-02-04 11:45     ` Rafael J. Wysocki
2019-02-05  8:15       ` Ulf Hansson
2019-02-05 11:26         ` Rafael J. Wysocki
2019-02-06  9:56           ` Rafael J. Wysocki
2019-02-06 11:23             ` Ulf Hansson
2019-02-06 12:10               ` Rafael J. Wysocki
2019-02-06 13:02                 ` Ulf Hansson
2019-02-06 23:16                   ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2241080.hZz7uDQtY8@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=a.hajda@samsung.com \
    --cc=daniel@ffwll.ch \
    --cc=gregkh@linuxfoundation.org \
    --cc=jroedel@suse.de \
    --cc=l.stach@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lukas@wunner.de \
    --cc=m.szyprowski@samsung.com \
    --cc=thierry.reding@gmail.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).