linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* get_xip_page() uncertainity
@ 2007-06-08  0:50 Jared Hulbert
  0 siblings, 0 replies; only message in thread
From: Jared Hulbert @ 2007-06-08  0:50 UTC (permalink / raw)
  To: linux-kernel

I am trying to create valid "struct page* (*get_xip_page)(struct
address_space *, sector_t, int)" to use the filemap_xip.c.

I've been trying to do it as follows:

virtual = ioremap(physical,size);

struct page* my_get_xip_page(struct address_space *mapping, sector_t
sector, int create)
{
  unsigned long offset;
  /*extract offset from mapping and sector*/
  return virt_to_page(virtual + offset);
}

I believe this to be fundamentally flawed.  While this works for
xip_file_read(), it does not work for xip_file_mmap().  I'm not sure I
understand the correct way to do this.  But I assume the problem, and
have some evidence to support it, is that virt_to_page() is not
returning a vaild page struct.

How can I get a valid page struct?  The memory is not RAM but Flash.
It is addressable like RAM and I want userspace to use it like
readonly RAM.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-08  0:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-08  0:50 get_xip_page() uncertainity Jared Hulbert

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).