Re: kmap for dma buffer

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Fri Oct 13 2000 - 07:57:20 EDT

  • Next message: Alan Cox: "Re: SMP irq sharing problem in 2.2.17"

    > 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
    boxes)

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



    This archive was generated by hypermail 2b29 : Fri Oct 13 2000 - 07:57:21 EDT