From patchwork Fri Nov 18 08:15:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 9435931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8A0E460469 for ; Fri, 18 Nov 2016 08:17:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CF0A29825 for ; Fri, 18 Nov 2016 08:17:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71C8F2982A; Fri, 18 Nov 2016 08:17:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2511629825 for ; Fri, 18 Nov 2016 08:17:48 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 55B2626768D; Fri, 18 Nov 2016 09:17:47 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6BD5E266B39; Fri, 18 Nov 2016 09:15:20 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5F0CF266B69; Fri, 18 Nov 2016 09:15:11 +0100 (CET) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 9182E266B17 for ; Fri, 18 Nov 2016 09:15:05 +0100 (CET) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 74252AAA3; Fri, 18 Nov 2016 08:15:04 +0000 (UTC) Date: Fri, 18 Nov 2016 09:15:04 +0100 Message-ID: From: Takashi Iwai To: Florian Fainelli In-Reply-To: <03fdca9f-1e6f-54b7-18b8-74b8063cb4fb@gmail.com> References: <20161117185237.7070-1-f.fainelli@gmail.com> <20c84fff-13d0-e608-1237-6bc567014cc5@gmail.com> <03fdca9f-1e6f-54b7-18b8-74b8063cb4fb@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: "moderated list:SOUND" , linux-kernel@vger.kernel.org, arnd@arndb.de Subject: Re: [alsa-devel] [PATCH] sound: Add dependency on DMA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 17 Nov 2016 20:42:38 +0100, Florian Fainelli wrote: > > On 11/17/2016 11:14 AM, Florian Fainelli wrote: > > On 11/17/2016 11:03 AM, Takashi Iwai wrote: > >> On Thu, 17 Nov 2016 19:52:37 +0100, > >> Florian Fainelli wrote: > >>> > >>> Architectures like m32r do not have a proper DMA-API implementation, > >>> fixes COMPILE_TEST linking failures for the sounds subsystem. > >> > >> What error did you get exactly? > >> There are already CONFIG_HAS_DMA dependency in a few places, so I > >> wonder what's missing. > > > > They looked like these: > > > > sound/built-in.o: In function `snd_pcm_lib_default_mmap': > > (.text+0xbb14): undefined reference to `bad_dma_ops' > > sound/built-in.o: In function `snd_pcm_lib_default_mmap': > > (.text+0xbb1c): undefined reference to `bad_dma_ops' > > sound/built-in.o: In function `snd_pcm_lib_default_mmap': > > (.text+0xbb34): undefined reference to `dma_common_mmap' > > sound/built-in.o: In function `snd_pcm_lib_default_mmap': > > (.text+0xbb34): relocation truncated to fit: R_M32R_26_PCREL_RELA > > against undefined symbol `dma_common_mmap' > > Makefile:961: recipe for target 'vmlinux' failed > > > > I could probably add an ifdef CONFIG_HAS_DMA just surrounding these > > snd_pcm_lib if you think this is more appropriate? > > I can't reproduce this build failure reliably anyway now, it was due to > switching between x86/m32r configurations, the only offender was the > Broadcom Cygnus driver, and this has been fixed as well. OK, good to hear. Meanwhile, we can put a patch like below just to be sure, too. But you can't check whether it works now ;) thanks, Takashi diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 9d33c1e85c79..8d7a61078b9f 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -3403,6 +3403,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream, area->vm_end - area->vm_start, area->vm_page_prot); } #endif /* CONFIG_GENERIC_ALLOCATOR */ +#ifdef CONFIG_HAS_DMA #ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */ if (!substream->ops->page && substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) @@ -3412,6 +3413,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream, substream->runtime->dma_addr, area->vm_end - area->vm_start); #endif /* CONFIG_X86 */ +#endif /* CONFIG_HAS_DMA */ /* mmap with fault handler */ area->vm_ops = &snd_pcm_vm_ops_data_fault; return 0;