summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGowtham Tammana2017-02-13 15:01:17 -0600
committerGowtham Tammana2017-02-15 14:42:19 -0600
commitaa10cb2c1fd22664df29825f1d40742b3964e481 (patch)
treeb7b30e2dbac153297a5fe424218a897557a53a88
parent7c0f4dc755dc2ecb95195ed42ef24fea16ef2667 (diff)
downloadti-gc320-driver-aa10cb2c1fd22664df29825f1d40742b3964e481.tar.gz
ti-gc320-driver-aa10cb2c1fd22664df29825f1d40742b3964e481.tar.xz
ti-gc320-driver-aa10cb2c1fd22664df29825f1d40742b3964e481.zip
km: Update gup API to k4.9
get_user_pages() API has changed since 4.6 After commit cde70140fed8 ("mm/gup: Overload get_user_pages() functions") in k4.6-rc1 use of current/current-mm as first two arguments deprecated and are inferred for the current task struct. If called for another task, get_user_pages_remote() should be used. After commit 768ae309a976 ("mm: replace get_user_pages() write/force parameters with gup_flags") in k4.9-rc2 `read` and `write` flags are replaced with `gup_flags`. Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
-rwxr-xr-xsrc/hal/os/linux/kernel/gc_hal_kernel_os.c7
-rwxr-xr-xsrc/hal/os/linux/kernel/platform/ti/gc_hal_kernel_platform_j6.c4
2 files changed, 4 insertions, 7 deletions
diff --git a/src/hal/os/linux/kernel/gc_hal_kernel_os.c b/src/hal/os/linux/kernel/gc_hal_kernel_os.c
index 34b50e3..0baa4ca 100755
--- a/src/hal/os/linux/kernel/gc_hal_kernel_os.c
+++ b/src/hal/os/linux/kernel/gc_hal_kernel_os.c
@@ -4740,12 +4740,9 @@ OnError:
4740 /* Get the user pages. */ 4740 /* Get the user pages. */
4741 down_read(&current->mm->mmap_sem); 4741 down_read(&current->mm->mmap_sem);
4742 4742
4743 result = get_user_pages(current, 4743 result = get_user_pages(memory & PAGE_MASK,
4744 current->mm,
4745 memory & PAGE_MASK,
4746 pageCount, 4744 pageCount,
4747 1, 4745 FOLL_WRITE,
4748 0,
4749 pages, 4746 pages,
4750 gcvNULL 4747 gcvNULL
4751 ); 4748 );
diff --git a/src/hal/os/linux/kernel/platform/ti/gc_hal_kernel_platform_j6.c b/src/hal/os/linux/kernel/platform/ti/gc_hal_kernel_platform_j6.c
index 87727fe..015e67c 100755
--- a/src/hal/os/linux/kernel/platform/ti/gc_hal_kernel_platform_j6.c
+++ b/src/hal/os/linux/kernel/platform/ti/gc_hal_kernel_platform_j6.c
@@ -345,8 +345,8 @@ cache_op_on_logical(gctPOINTER logical, gctSIZE_T bytes,
345 /* lock down user memory */ 345 /* lock down user memory */
346 down_read(&current->mm->mmap_sem); 346 down_read(&current->mm->mmap_sem);
347 347
348 numPagesMapped = get_user_pages(current, current->mm, 348 numPagesMapped = get_user_pages(
349 startAddr, pageCount, 1, 0, pages, gcvNULL); 349 startAddr, pageCount, FOLL_WRITE, pages, gcvNULL);
350 350
351 if (numPagesMapped == pageCount) { 351 if (numPagesMapped == pageCount) {
352 for (i = 0; i < pageCount; i++) { 352 for (i = 0; i < pageCount; i++) {