From: Artem Bityutskiy <dedekind1@gmail.com>
To: Jason Lunz <lunz@acm.org>
Cc: richard -rw- weinberger <richard.weinberger@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>,
David Woodhouse <dwmw2@infradead.org>,
atom ota <atomota@sleepyhammer.com>,
user-mode-linux-devel@lists.sourceforge.net,
Jeff Dike <jdike@addtoit.com>,
lkml <linux-kernel@vger.kernel.org>,
linux-mtd@lists.infradead.org, Rob Landley <rob@landley.net>
Subject: Re: [PATCH] mtd: allow mtd and jffs2 when ARCH=um
Date: Tue, 14 Dec 2010 18:24:38 +0200 [thread overview]
Message-ID: <1292343878.2538.80.camel@localhost> (raw)
In-Reply-To: <20101207182012.GA10546@falooley.org>
On Tue, 2010-12-07 at 10:20 -0800, Jason Lunz wrote:
> On Tue, Dec 07, 2010 at 10:39:41AM +0100, richard -rw- weinberger wrote:
> > On Tue, Dec 7, 2010 at 8:29 AM, Jason Lunz <lunz@acm.org> wrote:
> > >
> > > Allow parts of drivers/mtd to compile on uml by pushing the HAS_IOMEM
> > > dependencies down closer to the parts of mtd that actually need it.
> > > This allows enough of mtd to build to let jffs2 be used on uml.
> > >
> > > Signed-off-by: Jason Lunz <lunz@acm.org>
> > > ---
> > > arch/um/Kconfig.rest | 4 +---
> > > drivers/mtd/Kconfig | 1 -
> > > drivers/mtd/Makefile | 3 ++-
> > > drivers/mtd/chips/Kconfig | 4 ++++
> > > drivers/mtd/devices/Kconfig | 8 ++++++++
> > > drivers/mtd/maps/Kconfig | 4 ++++
> > > drivers/mtd/mtdchar.c | 4 ++++
> > > drivers/mtd/nand/Kconfig | 3 +++
> > > drivers/mtd/onenand/Kconfig | 3 +++
> > > include/linux/mtd/map.h | 2 ++
> > > 10 files changed, 31 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/arch/um/Kconfig.rest b/arch/um/Kconfig.rest
> > > index 0ccad0f..e34f399 100644
> > > --- a/arch/um/Kconfig.rest
> > > +++ b/arch/um/Kconfig.rest
> > > @@ -28,9 +28,7 @@ source "drivers/scsi/Kconfig"
> > >
> > > source "drivers/md/Kconfig"
> > >
> > > -if BROKEN
> > > - source "drivers/mtd/Kconfig"
> > > -endif
> > > +source "drivers/mtd/Kconfig"
> >
> > drivers/mtd was already marked as broken when we moved over to git (2.6.12-rc2).
> >
> > Do you exactly know why it was marked and fixes this patch all issues?
>
> I don't know exactly why it was originally marked BROKEN. I imagine it
> was because most of the low-level mtd drivers need readb/writeb and
> friends, which don't exist on uml. But now that mtd has virtual ram- and
> blockdev-backed drivers, that's no longer sufficient reason to omit the
> whole subsystem.
>
> I can't claim that this fixes all possible issues of course, but I've
> privately been using this patch to run block2mtd under uml for years. My
> original motivation was to allow the use of jffs2 in a uml-based test
> environment and for that it's worked very well.
But I think your solution is a bit dirty, because it adds a great deal
of little 'if HAS_IOMEM' and '#ifdef CONFIG_HAS_IOMEM' to many places.
This is error-prone.
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.
Anyway, please, think about a solution which needs few changes in UML
code instead of myriads of small little changes in many places.
Thanks!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2010-12-14 16:25 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <22c797d00709272118i33d32b9dy93d5f5ec8f8edd30@mail.gmail.com>
[not found] ` <20071024011712.GA3762@falooley.org>
[not found] ` <1193208689.26096.48.camel@pmac.infradead.org>
2007-10-24 15:54 ` [PATCH] allow use of mtd and jffs2 on uml Jason Lunz
2007-10-24 16:24 ` atom ota
2007-12-27 18:15 ` Jason Lunz
2007-12-28 17:48 ` Sam Ravnborg
2010-12-07 7:29 ` [PATCH] mtd: allow mtd and jffs2 when ARCH=um Jason Lunz
2010-12-07 9:39 ` richard -rw- weinberger
2010-12-07 18:20 ` Jason Lunz
2010-12-14 16:24 ` Artem Bityutskiy [this message]
2010-12-14 19:51 ` Jason Lunz
2010-12-14 20:01 ` Artem Bityutskiy
2010-12-14 21:12 ` Geert Uytterhoeven
2010-12-14 21:23 ` Jason Lunz
2010-12-15 0:40 ` Rob Landley
2010-12-15 0:49 ` Rob Landley
2010-12-15 1:19 ` Jason Lunz
2010-12-15 6:31 ` Rob Landley
2010-12-16 15:18 ` Artem Bityutskiy
2010-12-18 4:08 ` Rob Landley
2010-12-19 17:08 ` Artem Bityutskiy
2010-12-15 8:18 ` Geert Uytterhoeven
2010-12-16 15:25 ` Artem Bityutskiy
2010-12-16 22:01 ` Anatolij Gustschin
2010-12-17 4:27 ` mtd: fix CONFIG_MTD_COMPLEX_MAPPINGS=n compile Jason Lunz
2010-12-19 16:47 ` Artem Bityutskiy
2010-12-19 19:07 ` Jason Lunz
2010-12-20 11:23 ` Artem Bityutskiy
2010-12-20 14:04 ` [PATCH] mtd: allow mtd and jffs2 when ARCH=um Jason Lunz
2010-12-22 14:40 ` Artem Bityutskiy
2011-01-06 15:45 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1292343878.2538.80.camel@localhost \
--to=dedekind1@gmail.com \
--cc=atomota@sleepyhammer.com \
--cc=dwmw2@infradead.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=lunz@acm.org \
--cc=richard.weinberger@gmail.com \
--cc=rob@landley.net \
--cc=sam@ravnborg.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).