struct dma_buf *dbuf = dma_buf_get(fd);
My question is how can I map this dma_buf to my kernel address space so that my driver code can access (read/write) this buffer?
I think I need to use dma_buf_kmap.
But what should I pass to the 2nd parameter of dma_buf_kmap, the api specified the 2nd parameter is (the page in
PAGE_SIZE units to map) dma_buf_kmap?
https://www.kernel.org/doc/htmldocs/device-drivers/API-dma-buf-kmap.html
I want the whole dma_buf to be accessible.