Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp306040ima; Thu, 31 Jan 2019 17:12:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN4d592LrPzz89O1NcAWuUaAxaeivw2xWcmxVLzTNo6THaxGHnh+cNaoXMwusXXiSiExjKqq X-Received: by 2002:a63:d818:: with SMTP id b24mr32965258pgh.174.1548983557118; Thu, 31 Jan 2019 17:12:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548983557; cv=none; d=google.com; s=arc-20160816; b=h4RNBCh/q8kWhzjV1JXB9LW4sIexkUUvLRMzu8yHIs/zdFsOBHOicV+8wQOtykFYvn bELBLMB2tyBNxvRPYnBxR0zM/thH0mIXQkICkNEkCu5B3hkgraed9ItZ7uTIx8GD124n xgp3DupAM77yvfW9LRaJM9iRwuhORlmRc1ZsrfITNqLJ7iKVasDsf6HaHcUBadxcDwUX +R9auz6SAho72fO4LZMZ07y4Mr2Bs1zPvS5DM6nbsrGs+oKfKegJ7gBl49VuNy4fktjR ClsHuoiSjjB6InipzW6Bq5mDKNhwu8MiBNm6gAxcllqwJE9jQEOaXka0c76gPzDtmFW+ 15lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=0pGERbLObsf+viBKbgHAD9SqjxtVacfeoyG7IFLWioY=; b=VbIfrdueoHWpmCz/NGj2BWzplyqXBEPkUIa3leyx46VqEmo7/zbPVOypFyhp2gs6ej QIPyZs4RVw1eEggSH4a/Q9spX89QbJ0QTi2ndXGq3/uJtUHd34iqijZLWva557GQDUtv +6ytzccv77B/FrtwL7s6/VezjAw1yoEr/Umspa6rdl+Xdovu2tXfyOUGcFLco29EiZW2 bkRx/b0z+4aixeFhEM5S5VsR+XfjR7Irf79raQ8Amzti9ugU0cyUznJn5E+7EUJnN979 Nf0Kn/kNoIhjsjL+BAQy9QuiwAPVIq1TNxTRTpmrbtDo/FVTQu3O5PI9Gaog6PzR0Ox6 AScA== 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 l1si5853738pld.324.2019.01.31.17.12.22; Thu, 31 Jan 2019 17:12:37 -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 S1727748AbfBABEE (ORCPT + 99 others); Thu, 31 Jan 2019 20:04:04 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:55336 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725870AbfBABEB (ORCPT ); Thu, 31 Jan 2019 20:04:01 -0500 Received: from 79.184.255.169.ipv4.supernova.orange.pl (79.184.255.169) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id d669926520e7f436; Fri, 1 Feb 2019 02:03:58 +0100 From: "Rafael J. Wysocki" To: Greg Kroah-Hartman Cc: 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 , Joerg Roedel Subject: [PATCH v2 7/9] IOMMU: Make dwo drivers use stateless device links Date: Fri, 01 Feb 2019 01:54:21 +0100 Message-ID: <2241080.hZz7uDQtY8@aspire.rjw.lan> In-Reply-To: <1952449.TVsm6CJCTy@aspire.rjw.lan> References: <1952449.TVsm6CJCTy@aspire.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Marek Szyprowski Acked-by: Joerg Roedel --- 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);