Re: Question about pci_alloc_consistent() return address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[+cc Christoph]

On Thu, Nov 14, 2019 at 02:21:21PM +0530, Muni Sekhar wrote:
>  I’m using pci_alloc_consistent() in PCIe driver. My PCIe device only
> works 64 bit data  boundary transactions.
> 
> Is there a way to make sure pci_alloc_consistent() always returns
> 64-bit aligned address?

See Documentation/DMA-API-HOWTO.txt.  pci_alloc_consistent() is
implemented in terms of dma_alloc_coherent(), and that doc says
regions returned from dma_alloc_coherent() are guaranteed to be at
least PAGE_SIZE-aligned.

Are you seeing otherwise, or are you just making sure?  The dma_pool
interface for allocating smaller regions has a way to request the
alignment you need.

Bjorn



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux