Re: kmap for dma buffer

From: Alan Cox (
Date: Fri Oct 13 2000 - 06:57:20 EST

> For dma transfers to/from user space buffer, one need to lock that user
> space buffer so that it won't be swaped out. and also
> its bus address is obtained by call virt_to_bus and then this bus address
> is written to dma controller.

Thats what the kiovecs deal with yes

> but do we explicitly need to map that user buffer into kernel space by
> calling kmap after obtaining the user buffer's page struct??

Only if you are doing PIO (ie cpu writes to the page). The DMA hardware never
sees the MMU on most machines (it sees a seperate unrelated IOMMU on some

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:24 EST