[PATCH 1/2] mtd: physmap: add physmap_unmapped_area() for no-mmu XIP

David Woodhouse dwmw2 at infradead.org
Wed Aug 4 05:33:28 EDT 2010


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 <bernds_cb1 at t-online.de>
> > 
> > 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 <bernds_cb1 at t-online.de>
> > Signed-off-by: Mike Frysinger <vapier at gentoo.org>
> 
> 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 at intel.com                              Intel Corporation





More information about the linux-mtd mailing list