Re: [bigmem-patch] 4GB with Linux on IA32

Linus Torvalds (torvalds@transmeta.com)
Wed, 18 Aug 1999 16:29:12 -0700 (PDT)


On Wed, 18 Aug 1999, Alan Cox wrote:

> > which is this thing Intel has been flogging for a while. The API
> > allows user processes to register arbitrary virtual address ranges for
> > DMA; the driver then pins the pages and loads a map on the adapter
> > with virtual->user translations so that the user process can initiate
> > DMA using virtual addresses.
>
> You have the logic backwards. The way you are operating is almost ok but
> instead of mapping user pages into the kernel and pinning them map kernel
> pages into user space and voila, end of problems

Exactly.

Think of the user address space as the "window" that you get to look at
things - rather than being the things that drives IO, it's the thing that
allows the user to _look_ at IO while it is being driven.

So what a driver should do is to just allocate pages all over the place by
physical address (ie using __get_free_page() or similar), and then add
those pages to the IO window (the intel magic hardware translation thing)
and the user window (so that the user can see and change the pages that
are being used for IO).

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/