Limiting SMMU Page Size Change (DMA)

I have a PCIe card with a custom DMA. When SMMU is disabled, I’m getting the pagesize=4K, for dma operation. But when it is enabled, I’m getting pages of size 64K. My hardware doesn’t support 64K pagesize. How can I limit the page size to 4K (when SMMU is enabled)?


Which function is being used to allocate DMA’ble memory?
dma_alloc_coherent() has size as the argument, you can use it to allocate required size of memory.

If you are saying that your HW doesn’t support 64-bit DMA addresses, then you can limit base address allocated for DMA to required bit size using pci_set_consistent_dma_mask() function.

  • Manikanta