From patchwork Thu Apr 14 12:42:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Murphy X-Patchwork-Id: 12813481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27785C433EF for ; Thu, 14 Apr 2022 12:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=jiXE7VtwHYTN9J0EtUcU6XNagdtnbuh6xc9Gd+w/zhw=; b=vnQtgSEnbLG1Ss EMQxNu+dMgFeu+LNgum0L0VU2wwMnZYSR7+ZQEBKWnvzQf+wS1k/ukDBTbsOe+3IO/aRNRetIIu/f vamRNwdcXnEdIxWSrYNzEjaTTKzIkouaOGeU/xOTb5y+EUYo3A81AUq7ylGwWwkVHzcEXLKQQnq8f 4kdPRGeRJnYZf+ZXO2QWQ+3LsshJ/QHzpaPFPmwTRlPmGBSKkXAO2benRiqpWBbw+W3gWnDBqw9V+ AL4sR8fyhB9IqXh3PWda2Crx2qGNo88y336mYEWSICJK3theFy9Yovd8UgAUxkWFiQAiX3mWcdJA3 Dm9bSObX4zsoRdecWfvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neyoH-005a7h-J3; Thu, 14 Apr 2022 12:42:54 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neyoD-005a5l-UY for linux-arm-kernel@lists.infradead.org; Thu, 14 Apr 2022 12:42:51 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B6569139F; Thu, 14 Apr 2022 05:42:47 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B932A3F70D; Thu, 14 Apr 2022 05:42:45 -0700 (PDT) From: Robin Murphy To: joro@8bytes.org, will@kernel.org Subject: [PATCH 00/13] iommu: Retire bus_set_iommu() Date: Thu, 14 Apr 2022 13:42:29 +0100 Message-Id: X-Mailer: git-send-email 2.28.0.dirty MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_054250_158100_20BD1C82 X-CRM114-Status: GOOD ( 11.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jean-philippe@linaro.org, mjrosato@linux.ibm.com, sven@svenpeter.dev, zhang.lyra@gmail.com, robdclark@gmail.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, gerald.schaefer@linux.ibm.com, baolu.lu@linux.intel.com, yong.wu@mediatek.com, m.szyprowski@samsung.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, Here's another chapter in my saga of moving to per-instance IOMMU ops - iommu_present() and iommu_capable() cleanups will be ongoing for another cycle or two, while this one is at least self-contained within the subsystem. The next steps after this are making iommu_domain_alloc() instance-aware - which should finish the public API - and pulling the fwnode/of_xlate bits into __iommu_probe_device(). And then making sense of whatever's left :) For ease of review here I split out individual driver patches based on whether there was any non-trivial change or affect on control flow; the straightforward deletions are all lumped together since the whole series needs applying together either way, but I'm happy to split the final patch up further if anyone would like. Patch #3 for AMD is based on Mario's SWIOTLB patch here: https://lore.kernel.org/linux-iommu/20220404204723.9767-1-mario.limonciello@amd.com/ since that wants merging first as fix material. The series is also based contextually (but not functionally) on my device_iommu_capable() patches here: https://lore.kernel.org/linux-iommu/cover.1649089693.git.robin.murphy@arm.com/ since those are pretty much good to go now (I'll send a slightly-tweaked final version once the iommu/core branch is open). Thanks, Robin. Robin Murphy (13): iommu: Always register bus notifiers iommu: Move bus setup to IOMMU device registration iommu/amd: Clean up bus_set_iommu() iommu/arm-smmu: Clean up bus_set_iommu() iommu/arm-smmu-v3: Clean up bus_set_iommu() iommu/dart: Clean up bus_set_iommu() iommu/exynos: Clean up bus_set_iommu() iommu/ipmmu-vmsa: Clean up bus_set_iommu() iommu/mtk: Clean up bus_set_iommu() iommu/omap: Clean up bus_set_iommu() iommu/tegra-smmu: Clean up bus_set_iommu() iommu/virtio: Clean up bus_set_iommu() iommu: Clean up bus_set_iommu() drivers/iommu/amd/amd_iommu.h | 1 - drivers/iommu/amd/init.c | 9 +- drivers/iommu/amd/iommu.c | 21 ---- drivers/iommu/apple-dart.c | 30 +----- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 53 +--------- drivers/iommu/arm/arm-smmu/arm-smmu.c | 84 +-------------- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 4 - drivers/iommu/exynos-iommu.c | 9 -- drivers/iommu/fsl_pamu_domain.c | 4 - drivers/iommu/intel/iommu.c | 1 - drivers/iommu/iommu.c | 109 +++++++++----------- drivers/iommu/ipmmu-vmsa.c | 35 +------ drivers/iommu/msm_iommu.c | 2 - drivers/iommu/mtk_iommu.c | 13 +-- drivers/iommu/mtk_iommu_v1.c | 13 +-- drivers/iommu/omap-iommu.c | 6 -- drivers/iommu/rockchip-iommu.c | 2 - drivers/iommu/s390-iommu.c | 6 -- drivers/iommu/sprd-iommu.c | 5 - drivers/iommu/sun50i-iommu.c | 2 - drivers/iommu/tegra-smmu.c | 29 ++---- drivers/iommu/virtio-iommu.c | 24 ----- include/linux/iommu.h | 1 - 23 files changed, 62 insertions(+), 401 deletions(-) Tested-by: Marek Szyprowski # for Exynos