Re: [PATCH] mtd: allow mtd and jffs2 when ARCH=um
From: David Woodhouse
Date: Thu Jan 06 2011 - 10:45:55 EST
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@xxxxxxxxx Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/