Hello,
I am writing driver in which I used DMA_ATTR_NO_KERNEL_MAPPING attribute for cma allocation using dma_alloc_attr(), as per kernel docs https://www.kernel.org/doc/Documentation/DMA-attributes.txt buffers allocated with this attribute can be only passed to user space by calling dma_mmap_attrs().
I am writing driver in which I used DMA_ATTR_NO_KERNEL_MAPPING attribute for cma allocation using dma_alloc_attr(), as per kernel docs https://www.kernel.org/doc/Documentation/DMA-attributes.txt buffers allocated with this attribute can be only passed to user space by calling dma_mmap_attrs().
how can I mapped in kernel space (after dma_alloc_attr with DMA_ATTR_NO_KERNEL_MAPPING ) ?
For example.
1. virtual_addr = dma_alloc_attr(device, size,, phys, GFP_KERNEL, DMA_ATTR_NO_KERNEL_MAPPING );
2. Now i can use phys for driver as physical address and i am using in drivers, working fine.
3. Now i want to use virtual address in kernel space(in some cases virtual address required in my driver), not allow to use virtual_addr in kernel space because DMA_ATTR_NO_KERNEL_MAPPING, How can i mapped again to kernel space ?
How can i used DMA_ATTR_NO_KERNEL_MAPPING and mapped some area for kernel space when needed ?
Is there any apis available ? or improvement is required in linux kernel dma-apis ?
Regards,
Pankaj