Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4437562imu; Tue, 29 Jan 2019 01:19:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN5mbSqqxwLSmnZVUfzznTd1ukkK5Hkn09POg6mZdEFLcW6uO5ZXqQgltqykyZ8k5UN4QMNB X-Received: by 2002:a17:902:8346:: with SMTP id z6mr25178383pln.340.1548753591624; Tue, 29 Jan 2019 01:19:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548753591; cv=none; d=google.com; s=arc-20160816; b=fbI5Hxd1rcZlbIDykBvfe+wXWB7b8o680fOA0mANkfC8hPjrrD8WLcmAtzvKB7e50Z 9jXlqC5vsLhCSONwDtZQCrOgHVpPx6RS5/A5X6q4kpvJWWo/AJD7j85t1mx6lkPmOmrz sRklqA9By6pFB23c3M4ALE5QrLeJUj3uTG19ty563T/r9on3EEraXdLEjKOeYzqKukPW PPDwE2l1saCmq89lZ4S4Z2QgSBba8bbxYnGZWBIf9q8zURGdS46/R+DmDcxrdjhgKCc2 MzARIKKH0MfSSIZOJo4lsiCWDDHnh3mfqaHK/vn+htDdTzAimyklMvm3ufg6CcAHukKe nooA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=qwed0/nRQ7TCZ5VJEyoFyPdiOXnl4TGKKbkhnJEc4CM=; b=eUNMFhxuVegdKF8OQh4XUa4b03+JOh/pk+8HmGrVa5zFV5uzefXpHiCRkhYYuZOBNI 9HSPqE7OdyFDp40dxzK49g1JNvu01W7AUxd0wLa9RskWjMFkHzBKP/xRBh24b23EwPhp UP1gtnY1Deg1RZNkD7FszbyENzd49//EiTfqXrX5EADjVH9jCQuTorZPw+xu5yXMFsBG aAItC+F/NP2svBXy+r1hnK7bRgFxw8JJ1EPJcowh3Laa328zqb33PaOC0PT5yFfR7LyK VXnYlQCBw6IuTlDRkLfnPscKszGzISd9ifN/2Cfsal7eQkobE0m2KEDPlbsacf2+1Ah6 eOuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd3si23471640plb.286.2019.01.29.01.19.35; Tue, 29 Jan 2019 01:19:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728147AbfA2JRh (ORCPT + 99 others); Tue, 29 Jan 2019 04:17:37 -0500 Received: from mx2.suse.de ([195.135.220.15]:55876 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725355AbfA2JRh (ORCPT ); Tue, 29 Jan 2019 04:17:37 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ACDCFAE67; Tue, 29 Jan 2019 09:17:35 +0000 (UTC) Date: Tue, 29 Jan 2019 10:17:33 +0100 From: Joerg Roedel To: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman , LKML , Linux PM , Ulf Hansson , Daniel Vetter , Lukas Wunner , Andrzej Hajda , Russell King - ARM Linux , Lucas Stach , Linus Walleij , Thierry Reding , Laurent Pinchart , Marek Szyprowski , Jeffy Chen Subject: Re: [PATCH 1/4] IOMMU: Make dwo drivers use stateless device links Message-ID: <20190129091733.3ue6ifr3tpwu237j@suse.de> References: <2405639.4es7pRLqn0@aspire.rjw.lan> <3532356.d9GMSSLOvP@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3532356.d9GMSSLOvP@aspire.rjw.lan> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 29, 2019 at 12:05:21AM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > 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 > --- > drivers/iommu/exynos-iommu.c | 1 + > drivers/iommu/rockchip-iommu.c | 3 ++- > 2 files changed, 3 insertions(+), 1 deletion(-) Acked-by: Joerg Roedel > > 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);