[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: can device drivers return non-ram via vm_ops->nopage?
From: Chris Wedgwood <cw () f00f ! org>
Date: 2004-03-21 7:00:16
Message-ID: 20040321070016.GB8130 () pain ! stupidest ! org
[Download RAW message or body]
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/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic