From patchwork Fri Sep 15 16:58:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Murphy X-Patchwork-Id: 13387256 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 0A06EEED61A for ; Fri, 15 Sep 2023 16:58:53 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=ybs76ADxuZ5Z7UrbkqaWxpmWXXxGNJPDENMglCGrh5s=; b=N3Vs0t9X5WUIht RyAD3sOJWCsCTt7VlJ9xJ3E15pDCYvHQNGTt8R0ewtYEY5LCoUTjWvTqLEe8EnyJCb5NfYbFQOJTY gFUn0i8MXtw8rWotqR+oNXLlgZA/AkFhuBG6Y8e6AqSAinRk2NTFFuIz0DY0z0HseDPkyKf7uqUTy ALdxLQEld4Cu7p4pKcrRBm3jBgfsCeZumPVqh1OFKCbgBoCTcn+nrImTV3GI2D1Nq7SmwRepoy5de xY67P1o3vpaYdaYi7RQzb13YPSU1P3/wZE4GGCTT3v/YgT8QBxI5z0TEWkEJBcInJ1hLgviw3r3KL R1KfRTySVK0TT4G1+wTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qhC9D-00B5Pi-1E; Fri, 15 Sep 2023 16:58:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qhC97-00B5P5-3B for linux-arm-kernel@lists.infradead.org; Fri, 15 Sep 2023 16:58:25 +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 711AC1FB; Fri, 15 Sep 2023 09:58:55 -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 1A6A73F5A1; Fri, 15 Sep 2023 09:58:16 -0700 (PDT) From: Robin Murphy To: joro@8bytes.org, will@kernel.org Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jgg@nvidia.com, baolu.lu@linux.intel.com Subject: [PATCH v3 0/7] Iommu: Retire bus ops Date: Fri, 15 Sep 2023 17:58:04 +0100 Message-Id: X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230915_095822_099870_FFD463BB X-CRM114-Status: GOOD ( 11.69 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org v2: https://lore.kernel.org/linux-iommu/cover.1674753627.git.robin.murphy@arm.com/ Hi all, I've finally been able to get back to this again, and I think it is now hopefully ready to go. Changes from v3 are quite minor - basically a few cosmetics and small tweaks (where I've taken the liberty of keeping Baolu and Jason's review tags; hope that's OK!), the one functional thing around blocking domains fixed, and plenty of reshuffling from rebases. I'm happy to see that the IOMMUFD selftest problem has resolved itself in the meantime, and it might even be able to use the standard registration flow after this, however I'll leave that for someone else more motivated, since my follow-up priority will be moving the of_xlate business around at the bus level to sort out the probe_device ordering mess once and for all. Thanks, Robin. Robin Murphy (7): iommu: Factor out some helpers iommu: Decouple iommu_present() from bus ops iommu: Validate that devices match domains iommu: Switch __iommu_domain_alloc() to device ops iommu/arm-smmu: Don't register fwnode for legacy binding iommu: Retire bus ops iommu: Clean up open-coded ownership checks drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 - drivers/iommu/arm/arm-smmu/arm-smmu.c | 12 +- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 14 +- drivers/iommu/iommu.c | 140 ++++++++++++++------ drivers/iommu/mtk_iommu.c | 7 +- drivers/iommu/mtk_iommu_v1.c | 3 - drivers/iommu/sprd-iommu.c | 8 +- drivers/iommu/virtio-iommu.c | 3 - include/acpi/acpi_bus.h | 2 + include/linux/device.h | 1 - include/linux/device/bus.h | 5 - include/linux/dma-map-ops.h | 1 + include/linux/iommu.h | 1 + 13 files changed, 108 insertions(+), 92 deletions(-)