forked from hpc/xpmem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patching XPMEM kernel code for 4.11.0
Signed-off-by: Pavel Shamis (Pasha) <[email protected]>
- Loading branch information
Showing
4 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* | ||
* Copyright (c) 2004-2007 Silicon Graphics, Inc. All Rights Reserved. | ||
* Copyright 2009, 2014 Cray Inc. All Rights Reserved | ||
* Copyright 2016 ARM Inc. All Rights Reserved | ||
* Copyright 2016-2017 ARM Inc. All Rights Reserved | ||
* Copyright (c) 2016-2017 Nathan Hjelm <[email protected]> | ||
*/ | ||
|
||
|
@@ -20,6 +20,10 @@ | |
#include "xpmem_internal.h" | ||
#include "xpmem_private.h" | ||
|
||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) | ||
#include <linux/sched/signal.h> | ||
#endif | ||
|
||
/* #of pages rounded up that vaddr and size occupy */ | ||
#undef num_of_pages | ||
#define num_of_pages(v, s) \ | ||
|
@@ -223,7 +227,10 @@ xpmem_pin_page(struct xpmem_thread_group *tg, struct task_struct *src_task, | |
} | ||
|
||
/* get_user_pages() faults and pins the page */ | ||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) | ||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) | ||
ret = get_user_pages_remote (src_task, src_mm, vaddr, 1, FOLL_WRITE | FOLL_FORCE, | ||
&page, NULL, NULL); | ||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) | ||
ret = get_user_pages_remote (src_task, src_mm, vaddr, 1, FOLL_WRITE | FOLL_FORCE, | ||
&page, NULL); | ||
#else | ||
|