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 99FA0C433EF for ; Thu, 21 Apr 2022 17:14:26 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Yjk1aMhxIVI7TEsywZft8YnLlut3AO6n+HjHB/e/QYA=; b=V8BU7wdQYbZ+AR V41yP/3maun2hL9XL++Mn8GtLJ2Wgd+shrUsRYIkM3S8i9X4LLFBFw8BJ2USJ1jA43V7SHE6lJGtF 8yAJdaQH0SfJx1WEpSDfFx+AOEAxY4/2Zw3W6aU6DMQdLuf753+iqDpRNOg51iG0q9neMANiYO5vZ mMFD+5tYBaivsZ/GGVo+nXBFuLwO+djq5OycVhhFOPwIPtGIHHT2Y9X8Si006vFgbFYvB0VU8m0hz lmTTNbMX3VQueOM0fdC0M5YAQ1dnEtV20pkir8JIWEWNDI8Fz2HjE+nVMlnS7g0jCJHmxSva5OiEP xUlKFSlE3iPnMUTc6BJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhaMq-00EQag-Hh; Thu, 21 Apr 2022 17:13:20 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhaMl-00EQXy-R7 for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 17:13:17 +0000 Received: by mail-wm1-x32c.google.com with SMTP id r4-20020a05600c35c400b0039295dc1fc3so3856346wmq.3 for ; Thu, 21 Apr 2022 10:13:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=t9kx/kpBHIRHJF5Ta8VXVNIlkSe6PaiEDU5Ov3KqXBk=; b=d4B1RMfWECwtoWYYvT65Wgr5vxqjzt3ftXOaVgpq7ZkpLJIMv0UX/vF5PcCtGMmZ96 Lcmrvhpwa17FjzkPXncVded4mGmRbYdXqGaXsML0hbLT98CzeRdb1Jg0S0Y/MaIWotdI AVO04YOupaanZC6EHBfjicyIUkBiqJndp+kD+UpxCm0JOuRKTSAMNHnf9hNgQmJ8ZIyS e1RCUqAVs0FBpVBuYTWkKcaVHk/SDcx7+d3Yy8vxy8/3+W2XFOoq3Jd+vLL8azyINu+y qnRxplo6Gb1esD+Gjpibu1LoahVr4bqdAMgUt9gBi1HK9CsGaSDfPRdob0gxUtf1Q08h 85Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=t9kx/kpBHIRHJF5Ta8VXVNIlkSe6PaiEDU5Ov3KqXBk=; b=78ZsXuo423iecw1cspI/Ez5btoEUwMZIBvxtUIgSRovwg2d/d59qmp4gPtNnCt4bq6 Ltv3kTuBeN8VSw7Rixb2mRWiyMpR3hy+QLsc57uM86gHpm+witxgTLUxEhdvpAJXbbOu WwXgsfE+BNWsaLklmzyni4WAXPb6DEzz0Zj3RyfHeCEk1oca5LVpQ6+sWKmUV+001ae4 eKOCm/Pe8s1nOlR3QCCojAkEwsbYmMsJuhMS6QLowBcIJygJbqw8roKmDatgxcXPwP5/ CC9rzsvm+g8m6n4wgr9kr53nWLAyosB6aZfgKBG6gnnmXvUccrXo3k/NrJZY6dAdK5Lt bakg== X-Gm-Message-State: AOAM530CoVPFBNCJUC3grSrtmrj1iJ/JDJ9R16+FAUJna6+mVmQvQv9C yTQa47JX8IJ1ChOSWzyDhCIpkQ== X-Google-Smtp-Source: ABdhPJx94l//WJnxf1x9I9ICVu3B7WTWZyYnYQFGGftuQa3e2LPt/atN6vGk0psS2bdMi48D2aYoIg== X-Received: by 2002:a05:600c:19cd:b0:392:1419:9d2 with SMTP id u13-20020a05600c19cd00b00392141909d2mr9673336wmq.64.1650561191512; Thu, 21 Apr 2022 10:13:11 -0700 (PDT) Received: from myrica (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id b11-20020a5d45cb000000b0020a810f7726sm2674852wrs.5.2022.04.21.10.13.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 10:13:10 -0700 (PDT) Date: Thu, 21 Apr 2022 18:12:45 +0100 From: Jean-Philippe Brucker To: Robin Murphy Subject: Re: [PATCH 12/13] iommu/virtio: Clean up bus_set_iommu() Message-ID: References: <4db34a35e07f3741a658465045b78c96a569c591.1649935679.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4db34a35e07f3741a658465045b78c96a569c591.1649935679.git.robin.murphy@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_101315_938199_BA37DCE3 X-CRM114-Status: GOOD ( 15.82 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Jean-Philippe Brucker and tested on QEMU (so only PCI for now) > @@ -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