From patchwork Thu Jun 25 13:08:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 11625279 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BFA5614E3 for ; Thu, 25 Jun 2020 13:11:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9760020720 for ; Thu, 25 Jun 2020 13:11:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="x2w19K35"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="GfddEISQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9760020720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hgFel364OlvK5mtVShwQoC3spPLhlGXK/2TGHRpONq8=; b=x2w19K3534fQKFfdJZc5cpMVOB LhcsahUEtkIbuKqsuXKWfncKI3i6AdrleLUkZT2ROj/kNLV3Zyu5qj06MZkNsny+OM1s2kScDByW0 xvZkXCsZs0+Mceo6X50o1MrO0eA7NKra1bEdvfRkvEJ1xqf1HbDnVqJ0UcPfRlEPnxuMkxPJhD42t F4xxoFOffMHwAzGelelf2K+YwS+fQIpyoVFLtSO+51za4Y9oiXR2cCykiVRX65d69KMZsLlLiFTM+ ksfI+eVoLsaRZeWxAXOrtD+jML+o2Bq/qEddKeXKvEgN+Z7QMYmtSVwlY91+QgPMNFlPp9PjeQr/B wSvBNv5g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joRdP-0004H0-Fr; Thu, 25 Jun 2020 13:09:43 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joRcm-0003yc-RD for linux-arm-kernel@merlin.infradead.org; Thu, 25 Jun 2020 13:09:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WqQAttBNjE1J3FUUROVOjqsLZS/qTSqH5EDBjobULRY=; b=GfddEISQ+KxK7FfjjfPX1Wwvxp f24Yx+VX6qTgNrwmO/KrMzFlVKrrKYx4S+WihAfuCelFqepUq6bwjcNiEdJCFHRrr+sjK6FhdE8jN K1GAroCyPaHWAt0VDrxWq0d3CvFSIR/keRgFFfctTWwnuaC/o4NVAO03e4R3VChS8/f0gTZGlFlVh umX4yJIQcPM7Ypm+ovf6C+YBY1+cRQuGpk8CHFXv+9l8zJYOyw7QudF2HxdPc9D+vdOb5u31TE6Cn Kilfegq6NdFDOdzTQPkPQOligHK0LvPrECjpo0PvTWrXlMcROiVnPm5y803KFU+63nFuHZl//1pr4 DJuVVouw==; Received: from 8bytes.org ([81.169.241.247] helo=theia.8bytes.org) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joRcd-0006vX-LN for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2020 13:09:03 +0000 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200625_140857_235263_477A4B0E X-CRM114-Status: GOOD ( 13.60 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [81.169.241.247 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ia64@vger.kernel.org, Heiko Stuebner , David Airlie , Benjamin Herrenschmidt , Joonas Lahtinen , Thierry Reding , Paul Mackerras , Will Deacon , Marek Szyprowski , Michael Ellerman , Joerg Roedel , x86@kernel.org, Russell King , Catalin Marinas , Fenghua Yu , Joerg Roedel , intel-gfx@lists.freedesktop.org, Jani Nikula , Rodrigo Vivi , Matthias Brugger , linux-arm-kernel@lists.infradead.org, Tony Luck , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Daniel Vetter , David Woodhouse , Lu Baolu MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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);