We have a kernel module which is used on both real time (RT) and non-real time Linux kernel. Module uses the function get_user_pages_remote. However, there is a version check since the module needs to work for older kernels:
#if(LINUX_VERSION_CODE > KERNEL_VERSION(4,4,41)) res = get_user_pages_remote(...); #else res = get_user_pages(...); #endif
I'm trying to build this module for kernel 4.4.88-18-rt, but it does not have get_user_pages_remote(...) API. Any suggestion on how to handle this?
- Should I check for rt version and use get_user_pages ?
- Is there a wrapper API common to all kernels which will internally call correct API?