Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp837298pxb; Wed, 8 Sep 2021 13:38:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxye6GsshJe7gwCqjCCj2zxlqPkK7ghnNoxkM7snfZXhpzC3mJpigmI3CLHH1X4OAFIEhfI X-Received: by 2002:a05:6638:4122:: with SMTP id ay34mr193448jab.131.1631133502630; Wed, 08 Sep 2021 13:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631133502; cv=none; d=google.com; s=arc-20160816; b=JZ5DtA0K4zXz2U0+rVbp2TUWLjJ4YOxtX8uN0b9mw6pErL5m7XBXs1D6kH9efDHI0X uZ4Plld6b7WSgVY7Whi+2AT/gdL5o4hcARCDvCX3qzMje8T1M6Ts0Sy7q9+41rPOtF/P 0zhocoIT3HiZbd28xfYeHmv2+Xvn0TNRJCqD5c3DMLDXA1aeo7h3yYlXlzvUdywVf/sN Pz738z6kT/bR0AgetIARGw7Mf17uXJJR7abhiVcyrkzucDvDaJf/vplD1kqd+zpxxvBe wYKUakGvDboUTATBjLT+wYKwp6easUOPkoJWpu5WMEzMT+8oMf110j+5pZC9q+FGbZVm 38sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=EWemu83n5pDQ6Fv4EKaY23k23/nR2hurW+tYi5vPqII=; b=i6/O+2JW5ZZcFUMinDtUsV6f6+M3dJSn1Sx6W9ja/ZwTVbQEsq3DILd9fL+syWI4X8 P8zR3bkcDx0CABtUCUD3yeUmCeXSWzdzoFJ4+CMnYfwoJdZDEVvyCxR5xQlcBT9E+udU +ZnFfuRV9JJrnmtFDqoof7CNmNAUjxjQ+W/fxRMCZZkqPih4dFAuBTXxn1XhGek1i+o/ 8yrfpSKtPxV3J6n82Yp+zTS8mldYejfhmd+EosfCCwbHr/swMTAsTPtqYnBaPwgYpgdP HMNpdKqGA5jsSaBNzPR6t5ZIEF6CwiQUpx8LxL/mLw+mT81GvyDUCij2EslIs2epJbyl k8VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=HC4AqQEG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si15810ilo.83.2021.09.08.13.38.10; Wed, 08 Sep 2021 13:38:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=HC4AqQEG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241984AbhIHUP4 (ORCPT + 99 others); Wed, 8 Sep 2021 16:15:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235986AbhIHUPz (ORCPT ); Wed, 8 Sep 2021 16:15:55 -0400 Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE0BC061575 for ; Wed, 8 Sep 2021 13:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=EWemu83n5pDQ6Fv4EKaY23k23/nR2hurW+tYi5vPqII=; b=HC4AqQEGu7o+TVPDwx8Q/uiWuc FgiNTH1RLcIytFDJ2hGfcfnEkrop2p46mxnbXgHkmv1BOnydpVI6D9NbfzzTjNXtf9kfbpM5rWYbt 6FlPzu5WRhgjcHP7SaGczbRHEpZXrjTxEllS8/7k70qKbwz3M1HBv0mApIh8TbdczniaKRtZbEUwP q2ZGHE99U0pWrAqBp82cuRU/j93YAaOhe/JvWPdQ5vy9NXP9y/3zll2YJOwjLNE/W4AuqveVsr5Mg yIEkeul+jvw8A3qYTQ9Kp+ZKfPPHQ12VtQrFmDhZWW6g/R4uWho3s7A5ICkunbwV6MU1ACJpODOWr 48DIqciQ==; Received: from [2601:1c0:6280:3f0::aa0b] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mO3xv-007Y1C-0h; Wed, 08 Sep 2021 20:14:39 +0000 Subject: Re: [PATCH v3] ASoC: atmel: ATMEL drivers don't need HAS_DMA To: Geert Uytterhoeven Cc: Codrin.Ciubotariu@microchip.com, Linux Kernel Mailing List , ALSA Development Mailing List , Liam Girdwood , Mark Brown , mirq-linux@rere.qmqm.pl, Alexandre Belloni References: <20210707214752.3831-1-rdunlap@infradead.org> <49495ab9-5039-f332-2895-1a79c034f58d@infradead.org> From: Randy Dunlap Message-ID: Date: Wed, 8 Sep 2021 13:14:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/6/21 12:14 AM, Geert Uytterhoeven wrote: > Hi Randy, > > On Fri, Sep 3, 2021 at 9:53 PM Randy Dunlap wrote: >> On 9/2/21 9:44 AM, Geert Uytterhoeven wrote: >>> On Thu, Jul 8, 2021 at 6:51 PM Randy Dunlap wrote: >>>> On 7/8/21 1:19 AM, Codrin.Ciubotariu@microchip.com wrote: >>>>> On 08.07.2021 00:47, Randy Dunlap wrote: >>>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>>>> >>>>>> On a config (such as arch/sh/) which does not set HAS_DMA when MMU >>>>>> is not set, several ATMEL ASoC drivers select symbols that cause >>>>>> kconfig warnings. There is one "depends on HAS_DMA" which is no longer >>>>>> needed. Dropping it eliminates the kconfig warnings and still builds >>>>>> with no problems reported. >>>>>> >>>>>> Fix the following kconfig warnings: >>>>>> >>>>>> WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC >>>>>> Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] && HAS_DMA [=n] >>>>>> Selected by [m]: >>>>>> - SND_ATMEL_SOC_SSC [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] >>>>>> - SND_ATMEL_SOC_SSC_PDC [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] && ATMEL_SSC [=m] >>>>>> >>>>>> WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_SSC_PDC >>>>>> Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] && ATMEL_SSC [=m] && HAS_DMA [=n] >>>>>> Selected by [m]: >>>>>> - SND_AT91_SOC_SAM9G20_WM8731 [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] && (ARCH_AT91 || COMPILE_TEST [=y]) && ATMEL_SSC [=m] && SND_SOC_I2C_AND_SPI [=m] >>>>>> >>>>>> WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_SSC >>>>>> Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] && HAS_DMA [=n] >>>>>> Selected by [m]: >>>>>> - SND_ATMEL_SOC_SSC_DMA [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] && ATMEL_SSC [=m] >>>>>> >>>>>> WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_SSC_DMA >>>>>> Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] && ATMEL_SSC [=m] && HAS_DMA [=n] >>>>>> Selected by [m]: >>>>>> - SND_ATMEL_SOC_WM8904 [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] && (ARCH_AT91 || COMPILE_TEST [=y]) && ATMEL_SSC [=m] && I2C [=m] >>>>>> - SND_AT91_SOC_SAM9X5_WM8731 [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_ATMEL_SOC [=m] && (ARCH_AT91 || COMPILE_TEST [=y]) && ATMEL_SSC [=m] && SND_SOC_I2C_AND_SPI [=m] >>>>>> >>>>>> Fixes: 3951e4aae2ce ("ASoC: atmel-pcm: dma support based on pcm dmaengine") >>>>>> Fixes: 18291410557f ("ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig") >>>>>> Fixes: 061981ff8cc8 ("ASoC: atmel: properly select dma driver state") >>>>> >>>>> I am not sure about these fixes tags. As Alexandre mentioned, it looks >>>>> like the reason for HAS_DMA in the first place was the COMPILE_TEST with >>>>> m32r arch. I dig a bit, and, if any, I think we should use: >>>>> Fixes: eb17726b00b3 ("m32r: add simple dma") >>>>> since this commit adds dummy DMA support for m32r and seems to fix the >>>>> HAS_DMA dependency. >>>> >>>> Ah, I forgot to update the Fixes: tag(s). >>>> >>>> I won't disagree with your Fixes: suggestion (good digging) but >>>> I would probably have used 8d7d11005e930: >>>> ASoC: atmel: fix build failure >>>> which is the commit that added "depends on HAS_DMA". >>> >>> M32r was not the only platform NO_DMA, so I guess the build would >>> have failed for the others, too (e.g. Sun-3). >>> >>> So the real fix was probably commit f29ab49b5388b2f8 ("dma-mapping: >>> Convert NO_DMA get_dma_ops() into a real dummy"), or one of the >>> related commits adding dummies to subsystems. >> >> Hi Geert, >> Does this mean that some other actions are needed here? >> E.g. revert + a different kind of fix? > > While we can now compile drivers using DMA features on NO_DMA > platforms, thanks to the dummies, it does mean many of these drivers > cannot work on such platforms. So I think it makes sense to replace > "depends on HAS_DMA" by "depends on HAS_DMA || COMPILE_TEST" if DMA > is not optional to the driver. Hi Geert, Is this what you had in mind? It seems to work with my (limited) testing. thanks. --- sound/soc/atmel/Kconfig | 1 + 1 file changed, 1 insertion(+) --- linux-next-20210907.orig/sound/soc/atmel/Kconfig +++ linux-next-20210907/sound/soc/atmel/Kconfig @@ -11,6 +11,7 @@ if SND_ATMEL_SOC config SND_ATMEL_SOC_PDC bool + depends on HAS_DMA || COMPILE_TEST config SND_ATMEL_SOC_DMA bool