From patchwork Thu Jun 25 13:08:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 11625261 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 2FABE14F6 for ; Thu, 25 Jun 2020 13:11:03 +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 08F1E20702 for ; Thu, 25 Jun 2020 13:11:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="S8PnPiSD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08F1E20702 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: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:In-Reply-To:References:List-Owner; bh=J1jNtQxF2lmi3683EGQXjOWJwLN6nVHa9Wm9QNgb83M=; b=S8PnPiSDzxp5TPUiMnqbVpsNuz /f7+s8/uewGMj8m3xdncE9o6I4HjHVzlFJw4XC/4j/1OjYngpTgR0GIhfHzJD2AwRH+9xjNA46jOt vDqMOLgRKJKGn515SNd0qw3TurNToiPuuU/yUnGHiEg65fu7Q7w49WPiP5Aidtq+XduPgs6aLaIgt QHxZhrxvby6P/5L/xKS+1h+vWEH1Jf4rjSqeuFqJxFJ8LiIhOni2R5m3P45DXxTqnewuj8l/8lVjp hmLVG8VLfRH16SuE3YyH867GNzp0vSGU+QXAAGcIWOP9riBtA0gE6q3iClb5VFIrDUB+1rxrKLPwx i0w/e12A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joRcl-0003xD-HQ; Thu, 25 Jun 2020 13:09:03 +0000 Received: from 8bytes.org ([81.169.241.247] helo=theia.8bytes.org) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joRcX-0003qx-Eh for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2020 13:08:51 +0000 Received: by theia.8bytes.org (Postfix, from userid 1000) id F104136D; Thu, 25 Jun 2020 15:08:37 +0200 (CEST) From: Joerg Roedel To: iommu@lists.linux-foundation.org Subject: [PATCH 00/13] iommu: Remove usage of dev->archdata.iommu Date: Thu, 25 Jun 2020 15:08:23 +0200 Message-Id: <20200625130836.1916-1-joro@8bytes.org> X-Mailer: git-send-email 2.17.1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) 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] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender 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 Hi, here is a patch-set to remove the usage of dev->archdata.iommu from the IOMMU code in the kernel and replace its uses by the iommu per-device private data field. The changes also remove the field entirely from the architectures which no longer need it. On PowerPC the field is called dev->archdata.iommu_domain and was only used by the PAMU IOMMU driver. It gets removed as well. The patches have been runtime tested on Intel VT-d and compile tested with allyesconfig for: * x86 (32 and 64 bit) * arm and arm64 * ia64 (only drivers/ because build failed for me in arch/ia64) * PPC64 Besides that the changes also survived my IOMMU tree compile tests. Please review. Regards, Joerg Joerg Roedel (13): iommu/exynos: Use dev_iommu_priv_get/set() iommu/vt-d: Use dev_iommu_priv_get/set() iommu/msm: Use dev_iommu_priv_get/set() iommu/omap: Use dev_iommu_priv_get/set() iommu/rockchip: Use dev_iommu_priv_get/set() iommu/tegra: Use dev_iommu_priv_get/set() iommu/pamu: Use dev_iommu_priv_get/set() iommu/mediatek: Do no use dev->archdata.iommu x86: Remove dev->archdata.iommu pointer ia64: Remove dev->archdata.iommu pointer arm: Remove dev->archdata.iommu pointer arm64: Remove dev->archdata.iommu pointer powerpc/dma: Remove dev->archdata.iommu_domain arch/arm/include/asm/device.h | 3 --- arch/arm64/include/asm/device.h | 3 --- arch/ia64/include/asm/device.h | 3 --- arch/powerpc/include/asm/device.h | 3 --- arch/x86/include/asm/device.h | 3 --- .../gpu/drm/i915/selftests/mock_gem_device.c | 10 ++++++++-- drivers/iommu/exynos-iommu.c | 20 +++++++++---------- drivers/iommu/fsl_pamu_domain.c | 8 ++++---- drivers/iommu/intel/iommu.c | 18 ++++++++--------- drivers/iommu/msm_iommu.c | 4 ++-- drivers/iommu/mtk_iommu.h | 2 ++ drivers/iommu/mtk_iommu_v1.c | 10 ++++------ drivers/iommu/omap-iommu.c | 20 +++++++++---------- drivers/iommu/rockchip-iommu.c | 8 ++++---- drivers/iommu/tegra-gart.c | 8 ++++---- drivers/iommu/tegra-smmu.c | 8 ++++---- .../media/platform/s5p-mfc/s5p_mfc_iommu.h | 4 +++- 17 files changed, 64 insertions(+), 71 deletions(-) Reviewed-by: Jerry Snitselaar