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

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


On Wed, 18 Aug 1999, Peter Desnoyers wrote:
>
> I've got a driver for a native Virtual Interface Architecture device,
> 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.
>
> With a bit of work I think my driver might be bigmem-safe, as although
> it walks the page table, it only translates to DMA-able bus addresses,
> and never to kernel virtual memory addresses. The mmap() solution
> doesn't work here, at least in a way that conforms with the API we're
> trying to implement, because it doesn't allow the application to
> register its own buffers. Physical contiguousness isn't an issue,
> because the hardware can do per-page scatter/gather.

I will NOT allow anything that walks page tables. That's pretty much
completely out of the question. The rawio stuff gives access to the page
tables, and no device will be accepted that does more than that. Page
table walking has always been a complete disaster, and it's much simpler
to just set up the array of physical addresses separately (ie either at
mmap time or through the factilities that rawio does offer).

The intel DMA scatter-gather engine is very useful for doing various
scatter-gather things (and for 32<->64-bit translations), but you should
NOT see it as an excuse for walking the page tables. I will not accept
drivers that do that - it's a maintenance nightmare, and is just basically
a bad idea.

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/