25 #ifndef __MOTR_NET_LNET_KLNET_DRV_H__ 26 #define __MOTR_NET_LNET_KLNET_DRV_H__ 28 #include <linux/version.h> 145 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) 146 #define WRITABLE_USER_PAGE_GET(uaddr, pg) \ 147 get_user_pages((unsigned long) (uaddr), 1, FOLL_WRITE, &(pg), NULL) 149 #define WRITABLE_USER_PAGE_GET(uaddr, pg) \ 150 get_user_pages(current, current->mm, (unsigned long) (uaddr), \ 151 1, 1, 0, &(pg), NULL) 155 #define WRITABLE_USER_PAGE_PUT(pg) \ 157 struct page *__pg = (pg); \ 158 if (!PageReserved(__pg)) \ 159 SetPageDirty(__pg); \ M0_INTERNAL int nlx_dev_init(void)
M0_INTERNAL void nlx_dev_fini(void)