From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp121.sbc.mail.sp1.yahoo.com ([69.147.64.94]) by bombadil.infradead.org with smtp (Exim 4.68 #1 (Red Hat Linux)) id 1Jhvnv-0004HP-90 for linux-mtd@lists.infradead.org; Fri, 04 Apr 2008 23:58:43 +0000 From: David Brownell To: Josh Boyer Subject: Re: [PATCH] jffs2 summary allocation Date: Fri, 4 Apr 2008 16:58:38 -0700 References: <713171.37644.qm@web26213.mail.ukl.yahoo.com> <200804041609.41092.david-b@pacbell.net> <1207351282.3224.79.camel@vader.jdub.homelinux.org> In-Reply-To: <1207351282.3224.79.camel@vader.jdub.homelinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200804041658.38499.david-b@pacbell.net> Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Michael Trimarchi , spi-devel-general@lists.sourceforge.net, Andrew Morton , dwmw2@infradead.org, linux-arm-kernel@lists.arm.linux.org.uk List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Friday 04 April 2008, Josh Boyer wrote: > > >   ... This means specifically that you may _not_ use the > >   memory/addresses returned from vmalloc() for DMA.  ... > > > > So I'm rather surprised to see *ANY* kernel code trying to do > > that.  That rule has been in effect for many, many years now. > > I don't think it was intentional.  You're going through several layers > here: > > JFFS2 -> mtd parts -> mtd dataflash -> atmel_spi. > > Typically MTD drivers aren't doing DMAs to flash and JFFS2 has no idea > which particular chip driver is being used because it's abstracted by > MTD. That's true ... although I can imagine using DMA to avoid dcache trashing if its setup cost is low enough, with either NAND or NOR chips. Still: in this context vmalloc() is wrong. - Dave From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Subject: Re: [PATCH] jffs2 summary allocation Date: Fri, 4 Apr 2008 16:58:38 -0700 Message-ID: <200804041658.38499.david-b@pacbell.net> References: <713171.37644.qm@web26213.mail.ukl.yahoo.com> <200804041609.41092.david-b@pacbell.net> <1207351282.3224.79.camel@vader.jdub.homelinux.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Michael Trimarchi , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Andrew Morton , dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org To: Josh Boyer Return-path: In-Reply-To: <1207351282.3224.79.camel-ao9So7SQ8LBXjJKHA5322XviChZXdy27@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Friday 04 April 2008, Josh Boyer wrote: > = > > =A0 ... This means specifically that you may _not_ use the > > =A0 memory/addresses returned from vmalloc() for DMA. =A0... > > = > > So I'm rather surprised to see *ANY* kernel code trying to do > > that. =A0That rule has been in effect for many, many years now. > = > I don't think it was intentional. =A0You're going through several layers > here: > = > JFFS2 -> mtd parts -> mtd dataflash -> atmel_spi. > = > Typically MTD drivers aren't doing DMAs to flash and JFFS2 has no idea > which particular chip driver is being used because it's abstracted by > MTD. That's true ... although I can imagine using DMA to avoid dcache trashing if its setup cost is low enough, with either NAND or NOR chips. Still: in this context vmalloc() is wrong. - Dave ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference = Register now and save $200. Hurry, offer ends at 11:59 p.m., = Monday, April 7! Use priority code J8TLD2. = http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java= one From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753143AbYDDX6x (ORCPT ); Fri, 4 Apr 2008 19:58:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751680AbYDDX6n (ORCPT ); Fri, 4 Apr 2008 19:58:43 -0400 Received: from smtp121.sbc.mail.sp1.yahoo.com ([69.147.64.94]:34449 "HELO smtp121.sbc.mail.sp1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751544AbYDDX6m (ORCPT ); Fri, 4 Apr 2008 19:58:42 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=pacbell.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Subject:Date:User-Agent:Cc:References:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id; b=0pkk+JC+UzlTizSfXRIZvvAmG1+Alo4xb/oOhdp+zL9HvE3gzAhitfP0puoxJfa5kiHHfQ9dyemMlGxp0KtwF71hIZjSAXGSFgQ1Ju2rAV4nHeEE2YvXyqKANGfm7gZs1e8zg2h52XZ0+Ih3Q8mYdPV8WKmMowmRRSlNYkY3z5E= ; X-YMail-OSG: PimQd6IVM1nC1Y9VvyM1gBLTzxPhtU5q0BRzG6lgmJyfN177g.jl5svWE_GyBe2VELPtOG4_cA-- X-Yahoo-Newman-Property: ymail-3 From: David Brownell To: Josh Boyer Subject: Re: [PATCH] jffs2 summary allocation Date: Fri, 4 Apr 2008 16:58:38 -0700 User-Agent: KMail/1.9.6 Cc: linux-arm-kernel@lists.arm.linux.org.uk, Andrew Morton , Michael Trimarchi , dwmw2@infradead.org, spi-devel-general@lists.sourceforge.net, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org References: <713171.37644.qm@web26213.mail.ukl.yahoo.com> <200804041609.41092.david-b@pacbell.net> <1207351282.3224.79.camel@vader.jdub.homelinux.org> In-Reply-To: <1207351282.3224.79.camel@vader.jdub.homelinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200804041658.38499.david-b@pacbell.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 04 April 2008, Josh Boyer wrote: > > >   ... This means specifically that you may _not_ use the > >   memory/addresses returned from vmalloc() for DMA.  ... > > > > So I'm rather surprised to see *ANY* kernel code trying to do > > that.  That rule has been in effect for many, many years now. > > I don't think it was intentional.  You're going through several layers > here: > > JFFS2 -> mtd parts -> mtd dataflash -> atmel_spi. > > Typically MTD drivers aren't doing DMAs to flash and JFFS2 has no idea > which particular chip driver is being used because it's abstracted by > MTD. That's true ... although I can imagine using DMA to avoid dcache trashing if its setup cost is low enough, with either NAND or NOR chips. Still: in this context vmalloc() is wrong. - Dave