Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1436711ybt; Thu, 25 Jun 2020 06:11:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv1dUzh94+l5TjbWwrkoPgylPkCVMyZko0oWTR0bUYvIlfUET0LxZaSvIxXvdmuU1B0uDF X-Received: by 2002:aa7:c883:: with SMTP id p3mr2402802eds.128.1593090686060; Thu, 25 Jun 2020 06:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593090686; cv=none; d=google.com; s=arc-20160816; b=WDATpBwEBnKeC/amP8bFJXUhBCCXGF0pXkbRb7qMMWQMDGNjg501qV3KYDxeDJxdm7 dviowNeLq+SZsfELmvdOkfrMSGJ+a3F9G65fXVyYwaM76UeG+XERw7O4mN1qofbSz47q vKhGAPGtIdG771Q3kHxTycEE0D5Q/urnTwEWiNs9OXN1J7GcpEiLaB8noXInU3+JGJiM OX0nUHMnY5EeyG9rMff2nhuzr/figiVoY8ivaw/Z2u32CR+7b1CbTh/YALpCCx7vVfH8 Nu5k7+KIk/DtVH/BZgsbBDvzAnp/jms4tPso9LpyFQtB2dFNzhzZ1bCQot660/sAakRE rprg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=WqQAttBNjE1J3FUUROVOjqsLZS/qTSqH5EDBjobULRY=; b=jNg7L+BPC7CMzjC6kIsqvcmWwYVG6o6fVuYiDRiqQapWrVSyHGrkvzf8o+JboqewSr +kADvJ3UFSpNSy3OhFctnrl6D6+qWIRdONF1immDDU/zvlDLHxM9+yhET+sMYSCBh1Lf PPrQGuH7HDLvAN2TMgqj1xFgbGlQiYaw/Gi0RTdXEJ2SHR9s40WZeoU45mm1wuRETXVf W9hN3MvoMSyDMLBP1rDPdT6orv0cvWWvQ4rfZfkX0FNRLuzmHFjV80sFiof6iNiKsIGj 0utS8ftx9euQ3u4c8M/sZT5fgRu6FlzdViCTiy85k+SWSp1K8yKpyxF5lqmAmr5LfCth nM7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g22si10312571edj.310.2020.06.25.06.11.01; Thu, 25 Jun 2020 06:11:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405020AbgFYNJq (ORCPT + 99 others); Thu, 25 Jun 2020 09:09:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404839AbgFYNIn (ORCPT ); Thu, 25 Jun 2020 09:08:43 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26897C08C5DD for ; Thu, 25 Jun 2020 06:08:43 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id B92BC44A; Thu, 25 Jun 2020 15:08:38 +0200 (CEST) From: Joerg Roedel To: iommu@lists.linux-foundation.org Cc: Russell King , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , x86@kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Marek Szyprowski , Joerg Roedel , David Woodhouse , Lu Baolu , Matthias Brugger , Heiko Stuebner , Thierry Reding , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, intel-gfx@lists.freedesktop.org, Joerg Roedel Subject: [PATCH 05/13] iommu/rockchip: Use dev_iommu_priv_get/set() Date: Thu, 25 Jun 2020 15:08:28 +0200 Message-Id: <20200625130836.1916-6-joro@8bytes.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200625130836.1916-1-joro@8bytes.org> References: <20200625130836.1916-1-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel --- drivers/iommu/rockchip-iommu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index d25c2486ca07..e5d86b7177de 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -836,7 +836,7 @@ static size_t rk_iommu_unmap(struct iommu_domain *domain, unsigned long _iova, static struct rk_iommu *rk_iommu_from_dev(struct device *dev) { - struct rk_iommudata *data = dev->archdata.iommu; + struct rk_iommudata *data = dev_iommu_priv_get(dev); return data ? data->iommu : NULL; } @@ -1059,7 +1059,7 @@ static struct iommu_device *rk_iommu_probe_device(struct device *dev) struct rk_iommudata *data; struct rk_iommu *iommu; - data = dev->archdata.iommu; + data = dev_iommu_priv_get(dev); if (!data) return ERR_PTR(-ENODEV); @@ -1073,7 +1073,7 @@ static struct iommu_device *rk_iommu_probe_device(struct device *dev) static void rk_iommu_release_device(struct device *dev) { - struct rk_iommudata *data = dev->archdata.iommu; + struct rk_iommudata *data = dev_iommu_priv_get(dev); device_link_del(data->link); } @@ -1100,7 +1100,7 @@ static int rk_iommu_of_xlate(struct device *dev, iommu_dev = of_find_device_by_node(args->np); data->iommu = platform_get_drvdata(iommu_dev); - dev->archdata.iommu = data; + dev_iommu_priv_set(dev, data); platform_device_put(iommu_dev); -- 2.27.0