From: Takashi Iwai Subject: Re: [PATCH 3/5] ALSA: pcm - fix page conversion on non-coherent MIPS arch Date: Fri, 27 Nov 2009 10:20:12 +0100 Message-ID: References: <1259248388-20095-1-git-send-email-tiwai@suse.de> <1259248388-20095-2-git-send-email-tiwai@suse.de> <1259248388-20095-3-git-send-email-tiwai@suse.de> <1259248388-20095-4-git-send-email-tiwai@suse.de> <20091127084635.GA18741@linux-mips.org> 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 (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 0031910380E for ; Fri, 27 Nov 2009 10:20:12 +0100 (CET) In-Reply-To: <20091127084635.GA18741@linux-mips.org> 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: Ralf Baechle Cc: linux-mips@linux-mips.org, alsa-devel@alsa-project.org, Thomas Bogendoerfer , Becky Bruce , Wu Zhangjin , Benjamin Herrenschmidt , Kumar Gala List-Id: alsa-devel@alsa-project.org At Fri, 27 Nov 2009 08:46:35 +0000, Ralf Baechle wrote: > > On Thu, Nov 26, 2009 at 04:13:06PM +0100, Takashi Iwai wrote: > > > The non-coherent MIPS arch doesn't give the correct address by a simple > > virt_to_page() for pages allocated via dma_alloc_coherent(). > > > > Original patch by Wu Zhangjin . A proper check of the > > buffer allocation type was added to avoid the wrong conversion. > > The origins of this patch go back far further. The oldest patch I could > find which is a superset of this was written by Atsushi Nemoto and > various incarnations of it have been sumitted to and reject by me > a number of times through the years. > > > Note that this doesn't fix perfectly: the pages should be marked with > > proper pgprot value. This will be done in a future implementation like > > the conversion to dma_mmap_coherent(). > > > > Signed-off-by: Takashi Iwai > > So while this is ugly I don't think this patch will actually make the > the situation worse for any MIPS platform. So with both eyes closed: > > Acked-by: Ralf Baechle I added your ack with the comment about the origins to the GIT commit now. Thanks for closing your eyes ;) Hopefully this hack can be removed again shortly... Takashi