Forum Discussion
Altera_Forum
Honored Contributor
8 years agoWith the help of Michal Hocko, and Lorenzo Stoakes I found the solution!
Thank you so much guys!! In some newer kernels (I am using 4.8) you can simply use get_user_pages_remote instead get_user_pages. For some kernels, the parameter list is exactly the same!! Be carefull, than recent kernels have a slightly different parameter list, but that I guess that can be easily adapted. To be able to support both (4.4) and (4.8) kernels I modifyed the code as follows... # if LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0) ret = get_user_pages(target_task, target_task->mm, start_page + got * PAGE_SIZE, num_pages - got, 1, 1, p + got, vma); # else ret = get_user_pages_remote(target_task, target_task->mm, start_page + got * PAGE_SIZE, num_pages - got, 1,1, p+got, vma); # endif Now ">aocl diagnose acl0" seems to be working smoothly on 4.8 !!