Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1436365ybt; Thu, 25 Jun 2020 06:11:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdDikmL7A9Je7c8/z5ByYCC2GUoh3kugt78UTDU0lkvHqla4u7LbKJpBglDeFYeAGr7rVI X-Received: by 2002:a17:906:d92e:: with SMTP id rn14mr22575317ejb.314.1593090661649; Thu, 25 Jun 2020 06:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593090661; cv=none; d=google.com; s=arc-20160816; b=xXOc/qx7XhIPDuJRHUHMO7OrwUF0vehU+QV1TYJPfypT+WATqbfzqvupjJRtmSY9jB 7Ln5KMyJRtpzh4hL4qiskRGzGcShRKRS0cHCDvxBDV+a8lIF/YlBcyWSGE/u/AwxeEMK iqtnl3eQNlUadMyFZYHsaf2CtM3hwNSvFCuFZfawUfybC3+5jErqXXZXN6Ykyj8zP3+P esJu+oLW59da7gsLcJommfR4haaCFzwo7eiqI6c9Ms+BY1HVwTMTJfEgr0zp8/Vw2KDY D1Izz2sSRQmI0XKt5ZjOb/EtTM0LiFC+s46TYaqp8JQP2FR2tX+TNw71OjsvWVu/yhbk oKEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=vBRBmKJ2ot+FXV1UabUSpbQuEzOL+IIc4LRBqOCOlII=; b=SEahHyHvO8q8KazbD/KdKKgf87yx49imgeFnEw4RjXYn0sX0W4MWX2QnbDgX24AM8W /IA8x9CT6P15rtAlSlFUVVdpyvEq7qk4SnuE2xX0pPm7dOpzaPn/Zd3m2KXx/7JmPeUd lvdNL+8drMm3/ALOzfzPeluyrnCjrwLyEpyyZpnICyCQ94XmEJ2305ek/jaxLVdEnFmZ /1svnYN5TdXelFshzA5Xz/VXa6hDYSKpo2XpjmBs/h5A53/gBnmQpdzPVbKmKq1zZNOs vnZ55OfahqFYX6DBYAKNUe0FB7voTC0dL8f9jete4UyYFdgd6K1mJTNFiBG+fkkRYB0s pA9g== 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 l4si16376484edi.316.2020.06.25.06.10.37; Thu, 25 Jun 2020 06:11:01 -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 S2404866AbgFYNIo (ORCPT + 99 others); Thu, 25 Jun 2020 09:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404650AbgFYNIm (ORCPT ); Thu, 25 Jun 2020 09:08:42 -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 6C6A7C08C5C1 for ; Thu, 25 Jun 2020 06:08:42 -0700 (PDT) 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 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 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(-) -- 2.27.0