From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755800AbcB2Ps1 (ORCPT ); Mon, 29 Feb 2016 10:48:27 -0500 Received: from 8bytes.org ([81.169.241.247]:56865 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752753AbcB2PsZ (ORCPT ); Mon, 29 Feb 2016 10:48:25 -0500 Date: Mon, 29 Feb 2016 16:48:22 +0100 From: Joerg Roedel To: Arnd Bergmann Cc: Joerg Roedel , linux-arm-kernel@lists.infradead.org, Yong Wu , Robin Murphy , iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] iommu/mediatek: select ARM_DMA_USE_IOMMU Message-ID: <20160229154822.GC13711@8bytes.org> References: <1456737553-496245-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1456737553-496245-1-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 29, 2016 at 10:19:06AM +0100, Arnd Bergmann wrote: > The newly added Mediatek IOMMU driver uses the IOMMU_DMA infrastructure, > but unlike other such drivers, it does not select 'ARM_DMA_USE_IOMMU', > which is a prerequisite, leading to a link error: > > warning: (MTK_IOMMU) selects IOMMU_DMA which has unmet direct dependencies (IOMMU_SUPPORT && NEED_SG_DMA_LENGTH) > drivers/iommu/built-in.o: In function `iommu_put_dma_cookie': > mtk_iommu.c:(.text+0x11fe): undefined reference to `put_iova_domain' > drivers/iommu/built-in.o: In function `iommu_dma_init_domain': > mtk_iommu.c:(.text+0x1316): undefined reference to `init_iova_domain' > drivers/iommu/built-in.o: In function `__iommu_dma_unmap': > mtk_iommu.c:(.text+0x1380): undefined reference to `find_iova' > > This adds the same select that the other drivers have. On a related > note, I wonder if we should just always select ARM_DMA_USE_IOMMU > whenever any IOMMU driver is enabled. Are there any cases where > we would enable an IOMMU but not use it? > > Signed-off-by: Arnd Bergmann > Fixes: 0df4fabe208d ("iommu/mediatek: Add mt8173 IOMMU driver") > --- > drivers/iommu/Kconfig | 1 + > 1 file changed, 1 insertion(+) Applied both, thanks.