From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [PATCH 1/2] mtd: physmap: add physmap_unmapped_area() for no-mmu XIP From: David Woodhouse To: dedekind1@gmail.com In-Reply-To: <1276352794.19028.122.camel@localhost> References: <1274599824-17530-1-git-send-email-vapier@gentoo.org> <1276352794.19028.122.camel@localhost> Content-Type: text/plain; charset="UTF-8" Date: Wed, 04 Aug 2010 10:33:28 +0100 Message-ID: <1280914408.19499.8.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: Mike Frysinger , uclinux-dev@uclinux.org, Bernd Schmidt , David Howells , Paul Mundt , linux-mtd@lists.infradead.org, Greg Ungerer , uclinux-dist-devel@blackfin.uclinux.org, David McCullough List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, 2010-06-12 at 17:26 +0300, Artem Bityutskiy wrote: > On Sun, 2010-05-23 at 03:30 -0400, Mike Frysinger wrote: > > From: Bernd Schmidt > > > > Currently, romfs XIP doesn't work in flash memory (the kernel crashes > > with a null pointer dereference). The problem is that the mtd physmap > > driver isn't setting up a get_unmapped_area pointer for the mtd > > partitions it creates. > > > > Signed-off-by: Bernd Schmidt > > Signed-off-by: Mike Frysinger > > Pushed both to my l2-mtd-2.6.git / dunno. I'm confused by the second patch -- isn't this done in add_mtd_device() already, according to the device type? You're setting mtd_bdi_ro_mappable indiscriminately for all types of devices. For flash devices, that can be an issue -- if you schedule a userspace process while the kernel is writing to the flash, for example. If you want to allow XIP of writable flash devices, there's more to it than this. -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation