From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507AbWF3JMN (ORCPT ); Fri, 30 Jun 2006 05:12:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751515AbWF3JMN (ORCPT ); Fri, 30 Jun 2006 05:12:13 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45767 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S1751507AbWF3JMM (ORCPT ); Fri, 30 Jun 2006 05:12:12 -0400 Date: Fri, 30 Jun 2006 11:12:00 +0200 Message-ID: From: Takashi Iwai To: "Gerhard Pircher" Cc: linux-kernel@vger.kernel.org, alsa-devel@lists.sourceforge.net, rlrevell@joe-job.com, linuxppc-dev@ozlabs.org Subject: Re: [Alsa-devel] RFC: dma_mmap_coherent() for powerpc/ppc architecture and ALSA? In-Reply-To: <20060629211513.64980@gmx.net> References: <20060628202753.198630@gmx.net> <20060629211513.64980@gmx.net> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta25) (eggplant) (+CVS-20060326) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 29 Jun 2006 23:15:13 +0200, Gerhard Pircher wrote: > > > -------- Original-Nachricht -------- > Datum: Thu, 29 Jun 2006 11:27:15 +0200 > Von: Takashi Iwai > An: Gerhard Pircher > Betreff: Re: [Alsa-devel] RFC: dma_mmap_coherent() for powerpc/ppc architecture and ALSA? > > > At Wed, 28 Jun 2006 22:27:53 +0200, > > Gerhard Pircher wrote: > > > > > > Hi, > > > > > > It took a little bit longer to integrate the patch, as I didn't figure > > out first how to implement the __dma_mmap_coherent() function for PPC > > systems with CONFIG_NOT_COHERENT_CACHE defined. :) > > > > > > Unfortunately my system still crashes within snd_pcm_mmap_data_nopage() > > > (sound/core/pcm_native.c), as you can see below. I guess it tries to > > remap > > > a DMA buffer allocated by the not cache coherent DMA memory allocation > > > function in arch/ppc/kernel/dma-mapping.c. > > > > Strange, nopage will be never called if you apply my patch and modify > > to use dma_mmap_coherent(). > > > > > > Takashi > > > That's indeed strange! I'm sure that the new code is called by the > sound drivers. Should snd_pcm_mmap_data_nopage() not be used at all > anymore, or are there any cases that could still trigger a call of > snd_pcm_mmap_data_nopage()? What is the type of buffer are you using? If it's a buffer pre-allocated via snd_pcm_lib_preallocate*() with SNDRV_DMA_TYPE_DEV, there should be no snd_pcm_mmap_data_nopage call. For other types, there can be. For example, the patch still doesn't solve the problems with drivers using sg-buffer. Takashi