Nick Piggin wrote:
What about
int get_xip_mem(mapping, pgoff, create, void **kaddr, unsigned long *pfn)
get_xip_mem(mapping, pgoff, create, &addr, &pfn);
if (pagefault)
vm_insert_mixed(vma, vaddr, pfn);
else if (read/write) {
memcpy(kaddr, blah, sizeof);
My simple brd driver can easily do
*kaddr = page_address(page);
*pfn = page_to_pfn(page);
This should work for you too?
Looks good to me. Otoh, if there is an easy way to fix virt_to_phys()
I would like that better.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html