From: David Woodhouse <dwmw2@infradead.org>
To: Greg Ungerer <gerg@snapgear.com>
Cc: linux-kernel@vger.kernel.org, David McCullough <davidm@snapgear.com>
Subject: Re: [PATCH]: uClinux (MMU-less) patches against 2.5.28
Date: Fri, 26 Jul 2002 09:19:19 +0100 [thread overview]
Message-ID: <9143.1027671559@redhat.com> (raw)
In-Reply-To: <3D40A3E4.9050703@snapgear.com>
gerg@snapgear.com said:
> You may have noticed some MAGIC_ROM_PTR patches in the mtd driver
> code in this patch. This is to allow XIP for applications. We have
> been support XIP for quite some time on uClinux, it works really well.
> A problem we have experienced with MTD is that the nature of
> asynchronous writing to FLASH does not play nice with apps runing XIP.
> Any thoughts on how to deal with this?
Other than burying my head in the sand and hoping that someone starts
making dual-port flash? Sort of...
XIP of the kernel makes it harder, of course -- writing to the chip you're
running the _kernel_ from turns your entire text segment into status words,
so really I can't see any alternative but to copy the flash manipulation
routines into RAM, disable all interrupts, and get on with it.
If we're talking about XIP of just userspace pages, I have a vague plan for
that which may be slightly more feasible. If it holds up to the cold light
of day, perhaps you can help adjust it to work with uClinux.
The plan is to hand out pages to be mapped into userspace (or indeed kernel
space -- JFFS2 can speed up mounts this way too), but which get marked
absent when the flash driver talks to the chip. If your applications then
take a page fault, you can either suspend the operation or just make them
wait till it's complete.
The actual implementation of this should be relatively simple. We can
provide a generic_mtd_vm_ops and the chip drivers just need to know about
an extra state for 'mapped' and have a method to enter that state, and a
callback for when they want to _leave_ that state. Oh, and a way to get the
raw physical address for a given range of flash.
It occurs to me that this doesn't work too well without an MMU though. Got
any better ideas? Could we disable entire processes when one of their pages
is inaccessible?
--
dwmw2
next prev parent reply other threads:[~2002-07-26 8:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-25 6:56 [PATCH]: uClinux (MMU-less) patches against 2.5.28 Greg Ungerer
2002-07-25 14:52 ` David Woodhouse
2002-07-26 0:08 ` Greg Ungerer
2002-07-26 1:20 ` Greg Ungerer
2002-07-26 8:19 ` David Woodhouse [this message]
2002-07-26 10:39 ` Alan Cox
2002-07-26 9:39 ` David Woodhouse
2002-07-26 10:56 ` Alan Cox
2002-07-26 9:58 ` David Woodhouse
2002-07-26 14:50 ` Alan Cox
2002-07-26 14:03 ` David Woodhouse
2002-07-26 17:11 ` Alan Cox
2002-07-26 16:01 ` David Woodhouse
2002-07-26 17:27 ` Alan Cox
2002-07-26 16:27 ` David Woodhouse
2002-07-26 15:08 ` gerg
2002-07-26 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=9143.1027671559@redhat.com \
--to=dwmw2@infradead.org \
--cc=davidm@snapgear.com \
--cc=gerg@snapgear.com \
--cc=linux-kernel@vger.kernel.org \
/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