From mboxrd@z Thu Jan 1 00:00:00 1970 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 C495CC433F5 for ; Thu, 21 Apr 2022 19:45:44 +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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject:MIME-Version: Date:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Oo0nan9JWJiu4CYwuQ7aelbIHR+PHXcqoaAQXNmgxNs=; b=G57zpUerPeMYtwyWF72wlm8do6 muvXhXMTdXndbXOiRrpbhjFC2VTL/ir99h0S3vZqyl9WuALZ0oHxd8srxIqaHEfN9xlX2VEECSFGD nSpoxSUJMDRNKcC+AWAo70jWxyzdYyEcGwanbX6TruuOD7k1CAW9k7cQ45gSUsZOFKyKQ54zA2oVY 3xKcSjc187X5lXrG6tbJI+/tluVmuMp9SOQFG8rGCS9swEblpM+jbOS/cyMzEpbcMCdq+GmtdoYth lIuanF8ab7vm7fHrNbkWFLccHpJOdMHq6R82nlwpB27wmFyMuRIrp9MEsfCETB3tY5b0dLOfkgviO qWK1l8yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhcjS-00EpeJ-1Z; Thu, 21 Apr 2022 19:44:50 +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 1nhcjO-00Epdg-41 for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 19:44:47 +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 11ACF153B; Thu, 21 Apr 2022 12:44:42 -0700 (PDT) Received: from [10.57.80.98] (unknown [10.57.80.98]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4A64E3F5A1; Thu, 21 Apr 2022 12:44:39 -0700 (PDT) Message-ID: <9c6819ec-9189-c6dd-b9ba-3687beebc538@arm.com> Date: Thu, 21 Apr 2022 20:44:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 12/13] iommu/virtio: Clean up bus_set_iommu() Content-Language: en-GB To: Jean-Philippe Brucker References: <4db34a35e07f3741a658465045b78c96a569c591.1649935679.git.robin.murphy@arm.com> From: Robin Murphy In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_124446_252912_9DF17236 X-CRM114-Status: GOOD ( 12.23 ) 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: mjrosato@linux.ibm.com, sven@svenpeter.dev, zhang.lyra@gmail.com, joro@8bytes.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, robdclark@gmail.com, thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, gerald.schaefer@linux.ibm.com, baolu.lu@linux.intel.com, will@kernel.org, yong.wu@mediatek.com, m.szyprowski@samsung.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-04-21 18:12, Jean-Philippe Brucker wrote: > On Thu, Apr 14, 2022 at 01:42:41PM +0100, Robin Murphy wrote: >> Stop calling bus_set_iommu() since it's now unnecessary, and simplify >> the probe failure path accordingly. >> >> Signed-off-by: Robin Murphy >> --- >> drivers/iommu/virtio-iommu.c | 24 ------------------------ >> 1 file changed, 24 deletions(-) >> >> diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c >> index 25be4b822aa0..371f8657c0ce 100644 >> --- a/drivers/iommu/virtio-iommu.c >> +++ b/drivers/iommu/virtio-iommu.c >> @@ -7,7 +7,6 @@ >> >> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt >> >> -#include >> #include >> #include >> #include > > isn't needed anymore either. In any case it > looks great, thanks Ha, it totally passed me by that this one *isn't* a platform driver, derp :) > Reviewed-by: Jean-Philippe Brucker > > and tested on QEMU (so only PCI for now) Thanks! Robin. >> @@ -1146,26 +1145,6 @@ static int viommu_probe(struct virtio_device *vdev) >> >> iommu_device_register(&viommu->iommu, &viommu_ops, parent_dev); >> >> -#ifdef CONFIG_PCI >> - if (pci_bus_type.iommu_ops != &viommu_ops) { >> - ret = bus_set_iommu(&pci_bus_type, &viommu_ops); >> - if (ret) >> - goto err_unregister; >> - } >> -#endif >> -#ifdef CONFIG_ARM_AMBA >> - if (amba_bustype.iommu_ops != &viommu_ops) { >> - ret = bus_set_iommu(&amba_bustype, &viommu_ops); >> - if (ret) >> - goto err_unregister; >> - } >> -#endif >> - if (platform_bus_type.iommu_ops != &viommu_ops) { >> - ret = bus_set_iommu(&platform_bus_type, &viommu_ops); >> - if (ret) >> - goto err_unregister; >> - } >> - >> vdev->priv = viommu; >> >> dev_info(dev, "input address: %u bits\n", >> @@ -1174,9 +1153,6 @@ static int viommu_probe(struct virtio_device *vdev) >> >> return 0; >> >> -err_unregister: >> - iommu_device_sysfs_remove(&viommu->iommu); >> - iommu_device_unregister(&viommu->iommu); >> err_free_vqs: >> vdev->config->del_vqs(vdev); >> >> -- >> 2.28.0.dirty >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel