summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2019-01-22 13:26:04 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2019-01-29 11:25:41 +0900
commitfce5c936e5b2ae074907ece44a43d593bd4e47b1 (patch)
tree4e242e504dd3232d11fb445222cbd15d57bddbbf
parentd03795bfdb0eb2be59e62c82be8771afcf93ab80 (diff)
downloadlinux-artik7-fce5c936e5b2ae074907ece44a43d593bd4e47b1.tar.gz
linux-artik7-fce5c936e5b2ae074907ece44a43d593bd4e47b1.tar.bz2
linux-artik7-fce5c936e5b2ae074907ece44a43d593bd4e47b1.zip
fix build error about get_user_pages()
Fix build error since changing the arguments of get_user_pages(). Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r--drivers/gator/gator_cookies.c4
-rw-r--r--drivers/gud/MobiCoreDriver/mmu.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gator/gator_cookies.c b/drivers/gator/gator_cookies.c
index cce942043296..2c389f6b3843 100644
--- a/drivers/gator/gator_cookies.c
+++ b/drivers/gator/gator_cookies.c
@@ -13,7 +13,7 @@
/* Kernel version 4.6.0 removes get_user_pages macro. We should use get_user_pages_remote anyway.
(See https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/include/linux/mm.h?id=c12d2da56d0e07d230968ee2305aaa86b93a6832) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
-# define get_user_pages_remote(a,b,c,d,e,f,g,h) get_user_pages(a,b,c,d,e,f,g,h)
+# define get_user_pages_remote(a,b,c,d,e,f,g) get_user_pages(a,b,c,d,e,f,g)
#endif
struct mount {
@@ -254,7 +254,7 @@ static int translate_app_process(const char **text, int cpu, struct task_struct
down_read(&mm->mmap_sem);
while (len) {
- if (get_user_pages_remote(task, mm, addr, 1, 0, 1, &page, &page_vma) <= 0)
+ if (get_user_pages_remote(task, mm, addr, 1, FOLL_FORCE, &page, &page_vma) <= 0)
goto outsem;
maddr = kmap(page);
diff --git a/drivers/gud/MobiCoreDriver/mmu.c b/drivers/gud/MobiCoreDriver/mmu.c
index 104e68f0f067..2102425a031a 100644
--- a/drivers/gud/MobiCoreDriver/mmu.c
+++ b/drivers/gud/MobiCoreDriver/mmu.c
@@ -348,7 +348,7 @@ struct tee_mmu *tee_mmu_create(struct mm_struct *mm,
/* Buffer was allocated in user space */
down_read(&mm->mmap_sem);
gup_ret = get_user_pages(NULL, mm, (uintptr_t)reader,
- pages_nr, write, 0, pages,
+ pages_nr, write ? FOLL_WRITE : 0, pages,
NULL);
up_read(&mm->mmap_sem);
if (gup_ret < 0) {