lkml.org 
[lkml]   [2001]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Mounting a in-ROM filesystem efficiently
Date


brad@ltc.com said:
> have maintained, on and off, a patch to crafms that supports
> traditional cramfs decompress-and-read/run-from-RAM, plus direct
> mmaping with no decompression and read/run straight out of ROM:

> http://www.ltc.com/~brad/mips/cramfs-linear-root-xip-linux-2.4.9-2.diff

+ if (remap_page_range(vma->vm_start, KSEG0ADDR(address), length,
+ vma->vm_page_prot))

Cute, but not very generic. The approach I was contemplating was to
allocate a set of 'struct page's for the pages containing XIP data, then
add those pages to the page cache manually on read_inode().

It's a shame that ->readpage() doesn't get to say 'actually I used my own
page for that, I didn't want one allocated for me'.

Extending the MTD API to return a set of pages representing a particular
device, and handling the locking so that we don't try to write to the chips
while pages are mapped, will also be necessary if we want to do it with
flash chips that are used for anything else.

--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.392 / U:0.672 seconds]
©2003-2014 Jasper Spaans. Advertise on this site