From patchwork Mon Feb 29 09:19:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8450611 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C176F9F52D for ; Mon, 29 Feb 2016 09:20:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23CB020266 for ; Mon, 29 Feb 2016 09:20:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B6A62027D for ; Mon, 29 Feb 2016 09:20:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaK08-0005rH-KN; Mon, 29 Feb 2016 09:20:24 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaJzv-0004ZU-Gs; Mon, 29 Feb 2016 09:20:13 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0LZf8m-1aBBNk0NcS-00lUog; Mon, 29 Feb 2016 10:19:20 +0100 From: Arnd Bergmann To: Joerg Roedel , Joerg Roedel Subject: [PATCH 1/2] iommu/mediatek: select ARM_DMA_USE_IOMMU Date: Mon, 29 Feb 2016 10:19:06 +0100 Message-Id: <1456737553-496245-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:3je/oPWVzp3CPxMigV8X/GBRI+xJjdjy4cOj4sn1g7f3rTW0lO6 qXXaQ8iBgqrGYdWjlQBuB0tVkYno5wPAIsrzXhVxTYP9utBwUEoU8oirgrzt1mGlAlQFygy kjiMznCYhhjWzirm2XiSAVyrp3CqI3d5OIp4quRhw0Mrb64yBYeiyZFICADioPQn8kKbrjl L+zXr5uVEbWusP0QRUIAQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:BVZUw/j6RNk=:O/2fiCHSl46Xx1NlVcCOnN M2iF6yrA6kOxmDSDaBW8gMQmjRq8x84cWZdE5r8FqWsj6WRRyhicxQes8xjoVOcsavosD983e 5QyStzTRNo3uo8nx+rcEf6+nbTXh1OBnB5kqfoMvxqMnmpXgMmumTmME8zj+TQNoju9RQm65s EFuG/MxDxKqHryRUiaAk1cqbLiWFqTxn3woR9Lz4mvPGqTbL99u5P3j+gTWxHuraoo7obJej4 fsSgJk67qJVIhWRVz68JKysQBHI8yIr78rVd7vdWHtVrctsRzLNtp5vRPhHZh6wt1XLGwdy41 FEIdD0Sgt0NsILMerXRYOjRAxYR0jgYB5jfzaqHB69LaPY+K+rGZILxPwKB4n0l8nBQMXPWJe qi29XxrNVepVyny79fG/vdgXFu9HDnIPpDp3KFQH7g4Ld/JwqxoCndKa8TQkvs9NLUGB+4hqx /3gm4r9H/gf2DxlufreRdKuPPfR8yflDzSrpvDuqSiAaoYbl0txlJ0cPwGCF3KcIyy6OEl3ZN xYIQzP+Qke7APKuq83hczhcTNwpfUMV+k9aESts0brQVF5BpQFSMDWiIQACYAc4LxZfXoWm+P LnT6R20hcOuIbT5pKJV0JNHTtDakRVTf92aoIQqZgw/uMuLynZ76YWFGSa3Lvik3tErBdiKyP ISYpt/+kDjk2zFxwZZvumET9ScS/9jFG1PHiIg9cVU1UhlnMOoffX9ImBKFTgNYO3znA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160229_012012_005248_FA166554 X-CRM114-Status: GOOD ( 12.59 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , Robin Murphy , Yong Wu MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index b325954cf8f8..ea0998921702 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -341,6 +341,7 @@ config MTK_IOMMU bool "MTK IOMMU Support" depends on ARM || ARM64 depends on ARCH_MEDIATEK || COMPILE_TEST + select ARM_DMA_USE_IOMMU select IOMMU_API select IOMMU_DMA select IOMMU_IO_PGTABLE_ARMV7S