python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / catalyst / files / 4.6-void-user_page.patch
blob9915e5b74ea8eb9a5eb48d7bc23a89651ed1fb8e
1 diff --git a/firegl_public.c b/firegl_public.c
2 --- 15.201/common/lib/modules/fglrx/build_mod/firegl_public.c
3 +++ 15.201b/common/lib/modules/fglrx/build_mod/firegl_public.c
4 @@ -3225,7 +3225,11 @@ int ATI_API_CALL KCL_LockUserPages(unsigned long vaddr, unsigned long* page_list
5 int ret;
7 down_read(&current->mm->mmap_sem);
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
9 + ret = get_user_pages(vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
10 +#else
11 ret = get_user_pages(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
12 +#endif
13 up_read(&current->mm->mmap_sem);
15 return ret;
16 @@ -3243,7 +3247,11 @@ int ATI_API_CALL KCL_LockReadOnlyUserPages(unsigned long vaddr, unsigned long* p
17 int ret;
19 down_read(&current->mm->mmap_sem);
20 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
21 + ret = get_user_pages(vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
22 +#else
23 ret = get_user_pages(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
24 +#endif
25 up_read(&current->mm->mmap_sem);
27 return ret;
28 @@ -3254,7 +3262,11 @@ void ATI_API_CALL KCL_UnlockUserPages(unsigned long* page_list, unsigned int pag
29 unsigned int i;
30 for (i=0; i<page_cnt; i++)
32 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
33 + put_page((struct page*)page_list[i]);
34 +#else
35 page_cache_release((struct page*)page_list[i]);
36 +#endif