On Fri, Nov 15, 2019 at 12:47 AM Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote: > > [+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. Thanks for the clarification. I just want to make sure that pci_alloc_consistent() returns 64-bit aligned address. > > Bjorn -- Thanks, Sekhar