From patchwork Mon Feb 29 09:11:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8450571 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 6A14D9F52D for ; Mon, 29 Feb 2016 09:12:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0B2020253 for ; Mon, 29 Feb 2016 09:12:48 +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 B68A820165 for ; Mon, 29 Feb 2016 09:12:47 +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 1aaJsk-000868-T9; Mon, 29 Feb 2016 09:12:46 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaJsi-00083h-7l; Mon, 29 Feb 2016 09:12:45 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MPXsH-1aWD8q234T-004g2h; Mon, 29 Feb 2016 10:12:09 +0100 From: Arnd Bergmann To: Joerg Roedel , Joerg Roedel Subject: [PATCH] iommu/mediatek: select IOMMU_IOVA Date: Mon, 29 Feb 2016 10:11:58 +0100 Message-Id: <1456737124-309812-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:3xa0yz+BFXnbvPcQp1QKhJJLeAY7zS8knTGx5BRTzS6wL//iU+6 jl8/6HjvZY3SElFhAeHhuASZczCN1/4hdtg9kL62Y6XMHrsP088pBhqPZn5dM9CAIisp7gW JsQf7bcZ3uwT85YjFso1oDAPMujVBgrtyDD5FYLQYR9Yqzzqzd82R5oi7gAiPFGfz3/NE2b VU424a3c7/VFlTsQbvRkg== X-UI-Out-Filterresults: notjunk:1; V01:K0:8sKun0GlIZk=:aUSzqWyOyryNONoKz0jwOj jWumI5t6HKvTQNj2E2PdLnEYdJTiYLY12ooILydROYtIdFyeI1Hysfd+YANqtUJUmBrNNzG+k xjGl3aeMuibtn3H1VfyL15KbRh1cAXjdHA+yw5GLeHBaFOBTOFbL2MIqP+05NgfDaR1h7K5lz doHuI1Tt+EohGSrHYB+RvZSPjntLS1IBtz7akDKneCEmtIwDYq4h7iINh8Yi0E2NZYfgbUexM ZHhq1G89JI9WLpCXoNgcC/co/j76BpKQQzp/OZ2pulu3U3GxADTtU/8cbHIRCyA/4G5skot6E GK7C91068xIl72UDsmpKIUNj2F6bNQO/CSsOYQqLA4dlS6ebJCpjNrp9SGTjyW3pHyKZ47MyB UHJ4LpZ1S4Aein05LLxEWMbJUwjOoTx6mBfkF9xFG26303ye8Bkt2UTjqGVrN/x5uIdYchLJu 3O71YvWdkRFScz0II/NS5HqhugXCkIhz01Rcx6kGgRh2uYHR6zVkT2FvtdiyaquuTGdTWsDRg SAOLUXLMsFGw4brRHdEttpkQPpEap1De5jxrySiwWZIZ3/ET32A+v6PlNlLcqeMjVbNPZP1hw jHKirldKWVTG4X4ygtBu86RiZpbtNxn+5qKjYVQakcucMY7k2Xezz+EWr5Cq1cgDyth2LqCY3 77/BakUF+VYpkWaT2aQtdhUIgP3swpKcEN63fjL84KzQjEKhvvxx1q2lXopXiIYynerQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160229_011244_631052_30F0F759 X-CRM114-Status: GOOD ( 12.69 ) 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