[PATCH][MTD] mtdpart.c: allow other drivers to get physical address of partition
joern at logfs.org
Wed Aug 1 19:31:22 EDT 2007
On Wed, 1 August 2007 13:37:57 -0700, Jared Hulbert wrote:
> > I don't think that one is particular hard to do. All you need is:
> > - count refernces in the driver
> References to what? pages? pfn's?
> > - make the xip code return its references after use
> > - a callback that the driver can call to get its references that are
> > mapped to userland back which would simply boil down to
> > filemap_xip_unmap()
How does filemap_xip_unmap() work and what arguments will it take?
The only implementation I can visualize right now would be to go through
all page mappings for all processes and removing the mapping if it
points to the physical address range in question. Extremely slow and
racing with fork() and clone().
So we would need something better. Just what? Do you have a better
idea already, Carsten?
Don't patch bad code, rewrite it.
-- Kernigham and Pike, according to Rusty
More information about the linux-mtd