From: Takashi Iwai Subject: Re: [PATCH 4/4] ALSA: add dummy function to support shared mmap in nommu Blackfin arch Date: Tue, 02 Sep 2008 11:41:36 +0200 Message-ID: References: <1219829968-6431-1-git-send-email-cooloney@kernel.org> <1219829968-6431-5-git-send-email-cooloney@kernel.org> <0F1B54C89D5F954D8535DB252AF412FA029D5EC2@chinexm1.ad.analog.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 7FADF1037F8 for ; Tue, 2 Sep 2008 11:41:37 +0200 (CEST) In-Reply-To: <0F1B54C89D5F954D8535DB252AF412FA029D5EC2@chinexm1.ad.analog.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: "Cai, Cliff" Cc: Bryan Wu , liam.girdwood@wolfsonmicro.com, broonie@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org At Tue, 2 Sep 2008 11:16:37 +0800, Cai, Cliff wrote: > > > > @@ -3419,5 +3426,6 @@ const struct file_operations snd_pcm_f_ops[2] = > { > > .compat_ioctl = snd_pcm_ioctl_compat, > > .mmap = snd_pcm_mmap, > > .fasync = snd_pcm_fasync, > > + .get_unmapped_area = dummy_get_unmapped_area, > > } > > }; > > >I don't think adding this dummy get_unmapped_area unconditionally for > every driver is good. This overrides the default > >mm->get_unmaped_area. > But without this dummy function,shared mmap on nommu arch would > fail,refer to validate_mmap_request() in mm/nommu.c. Yes, I know it's needed for nommu. That's why I wrote "unconditionally" in the above. > May be we can add a kernel config item to include or not include this > function depending on non-mmu or mmu arch. Checking CONFIG_MMU may suffice? Takashi