From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 466818BF0 for ; Mon, 28 Nov 2022 13:59:44 +0000 (UTC) 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 1DDFCD6E; Mon, 28 Nov 2022 05:59:50 -0800 (PST) Received: from [10.57.71.118] (unknown [10.57.71.118]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CDDC63F73D; Mon, 28 Nov 2022 05:59:39 -0800 (PST) Message-ID: Date: Mon, 28 Nov 2022 13:59:30 +0000 Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v3 06/20] iommu/mtk: Remove detach_dev callback Content-Language: en-GB To: Jason Gunthorpe , Lu Baolu Cc: Joerg Roedel , Christoph Hellwig , Kevin Tian , Will Deacon , Jean-Philippe Brucker , Suravee Suthikulpanit , Hector Martin , Sven Peter , Rob Clark , Marek Szyprowski , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Yong Wu , Matthias Brugger , Heiko Stuebner , Matthew Rosato , Orson Zhai , Baolin Wang , Chunyan Zhang , Chen-Yu Tsai , Thierry Reding , iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <20221128064648.1934720-1-baolu.lu@linux.intel.com> <20221128064648.1934720-7-baolu.lu@linux.intel.com> From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2022-11-28 13:49, Jason Gunthorpe wrote: > On Mon, Nov 28, 2022 at 02:46:34PM +0800, Lu Baolu wrote: >> The IOMMU driver supports default domain, so the detach_dev op will never >> be called. Remove it to avoid dead code. >> >> Signed-off-by: Lu Baolu >> --- >> drivers/iommu/mtk_iommu.c | 9 --------- >> 1 file changed, 9 deletions(-) > > I listed this driver as not supporting default domains: > > https://lore.kernel.org/linux-iommu/20220516135741.GV1343366@nvidia.com/ > > ? > > Has something changed? Did I get it wrong? static struct iommu_domain *mtk_iommu_domain_alloc(unsigned type) { struct mtk_iommu_domain *dom; if (type != IOMMU_DOMAIN_DMA && type != IOMMU_DOMAIN_UNMANAGED) return NULL; ... This one runs on arm64, so has always supported default domains for iommu-dma to work. Cheers, Robin.