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 X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEF3EC433E2 for ; Thu, 10 Sep 2020 21:44:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 754A5208E4 for ; Thu, 10 Sep 2020 21:44:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728408AbgIJVo3 (ORCPT ); Thu, 10 Sep 2020 17:44:29 -0400 Received: from foss.arm.com ([217.140.110.172]:35360 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730879AbgIJM40 (ORCPT ); Thu, 10 Sep 2020 08:56:26 -0400 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 CF2C01063; Thu, 10 Sep 2020 05:55:44 -0700 (PDT) Received: from [10.57.40.122] (unknown [10.57.40.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 141203F66E; Thu, 10 Sep 2020 05:55:40 -0700 (PDT) Subject: Re: [PATCH 04/12] dma-mapping: fix DMA_OPS dependencies To: Christoph Hellwig , Tony Luck , Fenghua Yu , Thomas Bogendoerfer , iommu@lists.linux-foundation.org Cc: Tomasz Figa , Joerg Roedel , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org References: <20200908164758.3177341-1-hch@lst.de> <20200908164758.3177341-5-hch@lst.de> From: Robin Murphy Message-ID: <1e3c7094-62da-6e8c-0a41-0bc63dd3db68@arm.com> Date: Thu, 10 Sep 2020 13:55:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200908164758.3177341-5-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-08 17:47, Christoph Hellwig wrote: > Driver that select DMA_OPS need to depend on HAS_DMA support to > work. The vop driver was missing that dependency, so add it, and also > add a nother depends in DMA_OPS itself. That won't fix the issue due > to how the Kconfig dependencies work, but at least produce a warning > about unmet dependencies. > > Signed-off-by: Christoph Hellwig > --- > drivers/misc/mic/Kconfig | 1 + > kernel/dma/Kconfig | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/misc/mic/Kconfig b/drivers/misc/mic/Kconfig > index b9bb086785db48..8a7c2c5711d5f4 100644 > --- a/drivers/misc/mic/Kconfig > +++ b/drivers/misc/mic/Kconfig > @@ -35,6 +35,7 @@ config SCIF_BUS > > config VOP_BUS > tristate "VOP Bus Driver" > + depends on HAS_DMA > select DMA_OPS AFAICS all three of these bus drivers are only proxying a struct dma_map_ops * pointer around, so if they used the set_dma_ops() helper they shouldn't even need these selects at all. Only INTEL_MIC_HOST appears to have a logical dependency on DMA_OPS for actual functionality. However, I have a vague feeling you might not be fond of those dma_ops helpers, and I have no great objection to this one-liner as-is, so (modulo the couple of commit message typos), Reviewed-by: Robin Murphy (of course the hunk below is unquestionably OK) Robin. > help > This option is selected by any driver which registers a > diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig > index 0ddfb5510fe45f..e7b801649f6574 100644 > --- a/kernel/dma/Kconfig > +++ b/kernel/dma/Kconfig > @@ -9,6 +9,7 @@ config HAS_DMA > default y > > config DMA_OPS > + depends on HAS_DMA > bool > > # >