Messages in this thread | | | From | (H. Peter Anvin) | Subject | Re: chasing the four level page table | Date | Sat, 15 Jan 2005 02:54:15 +0000 (UTC) |
| |
Followup to: <9e47339105010721225c0cfb32@mail.gmail.com> By author: Jon Smirl <jonsmirl@gmail.com> In newsgroup: linux.dev.kernel > > On Thu, 6 Jan 2005 16:41:59 -0500, Dave Jones <davej@redhat.com> wrote: > > No other device driver is also doing such lowlevel stuff with > > page tables directly afaics. drivers/char/drm seem to be the only drivers > > using [pgd|pmd|pte]_offset() routines. > > On 6 Jan 2005 20:38:27 +0100, Andi Kleen <ak@muc.de> wrote: > > Perhaps we should add a get_user_phys() or somesuch for this. > > I think this is a case where the memory manager is missing a function > that DRM needs. If there was a get_user_phys() function DRM wouldn't > need to walk the page tables. >
FWIW, the Nvidia device driver wrapper also has this issue.
There seems to be at least two classes of device drivers -- graphics and RDMA -- which have a genuine need to DMA user pages, after appropriate locking, of course.
At that point we're better off having the mm export the right functionality to keep device driver authors from doing it wrong.
-hpa - 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/
| |