Dma_alloc_coherent returns null address

we are developing a kernel module, which uses dma_alloc_coherent for buffer memory, we are inserting the modules after boot and API always returns null.

I added debug prints in include/linux/dma-mapping.h in the kernel and logs are printed during the boot and it does not get printed while inserting the module.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

Hi mohamedhusain1303,
Please share the snippet of code having call ‘dma_alloc_coherent’ or the size and flag used in allocation. Also, please share output of nodes: ‘/proc/meminfo’, ‘/proc/buddyinfo’ & ‘/proc/pagetypeinfo’ before and after your test.