lkml.org 
[lkml]   [2004]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: can device drivers return non-ram via vm_ops->nopage?
On Sun, Mar 21, 2004 at 06:23:22AM +0000, Christoph Hellwig wrote:
> Not sure how you get to fetchop here, but that driver does map ram
> pages so it should take pagefaults and not use remap_page_range().

It's been a while since I looked at this.... the fetchop driver maps
AMO space which is excluded from the EFI memory map (and any SHub
aliases) and thus shouldn't be touching anything normally considered
RAM.
<pause>

Checking the source I see:

if (remap_page_range(vm_start, __pa(maddr), PAGE_SIZE, vma->vm_page_prot)) {
fetchop_free_pages(vma->vm_private_data);
vfree(vdata);
fetchop_update_stats(-1, -pages);
return -EAGAIN;
}
as part of the drivers 'mmap fop'. The underlying page is actually
from region-6 so I'm pretty sure it's safe. If you think it is doing
something weird please let me know.



--cw
-
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 14:01    [from the cache]
©2003-2011 Jasper Spaans