[PATCH] mtd: allow mtd and jffs2 when ARCH=um

David Woodhouse dwmw2 at infradead.org
Thu Jan 6 10:45:34 EST 2011


On Tue, 2010-12-14 at 11:51 -0800, Jason Lunz wrote:
> 
> > Instead, you should solve this problem in UML code. I do not know how,
> > but may be you can add readb/writeb there which actually do nothing or
> > print a scary warning, or do BUG(), and let things which use them just
> > fail run-time.
> 
> Something like this could work, but it would be error-prone for anyone
> else who attempts using iomem-requiring drivers on uml. Instead of
> getting obvious compile failures we'd have broken drivers that BUG() or
> emit scary warnings. That doesn't seem to me like an improvement. 

Drivers should *never* BUG() or crash, or busy-loop, on getting 0xFF
when they read from hardware. That can happen anyway in some
circumstances.

Doesn't iSeries take this approach?

I don't much like the patch that Artem took into his l2-mtd tree; it
doesn't even let you build mtdchar, which really *ought* to be
permitted. It also didn't allow the nandsim or mtdram devices, which are
purely virtual.

I think I'd prefer something similar to your original, Jason. I don't
think the HAS_IOMEM dependencies have to be *so* complex to maintain. If
anything we're just going to err on the side of inclusion and you'll
occasionally have to send us patches to "hide" things from you again.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation




More information about the linux-mtd mailing list