On Mon, 2016-04-18 at 14:54 -0700, bruce_leon...@selinc.com wrote: > > On the DMA transactions that work, the virtual address I hand to > dma_map_single() is something like 0xe0840000 and the dma_addr_t result is > 0x10840000 which is less than my 512Mb limit. On the transactions that > don't work, the virtual address is 0xd5390000 with the mapped result being > 0x25390000, which is past my upper bound on my RAM. In fact it's not even > in my memory map, there's a hole there.
Where does this virtual address come from ? The kernel has two types of virtual addresses. Those coming from the linear mapping (the stuff you get from kmalloc() for example, or get_pages()) which can be translated using that simple substraction. The other is the vmalloc space, and that is a non-linear mapping of random pages. If your vaddr comes from the latter it can't be passed to dma_map_single as-is, you need to get to the underlying pages first. Ben. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev