The device we work at now need to have a user space virtual memory address, we try to use do_mmap() as below:
*uvaddr = (void *)do_mmap(0, 0, size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS, 0);
But we got following error
Unable to handle kernel paging request for data at ad8
Is it okay to use "do_mmap()" in a device driver? If not, any correct way to do it?