*/
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+# include <linux/sched/task_stack.h> /* for task_pt_regs() */
+#endif
#include <arch/arm/probes/probes.h>
#include <arch/arm/probes/probes_arm.h>
#include <linux/string.h>
#include <linux/namei.h>
#include <linux/slab.h>
+#include <linux/dcache.h>
#include <linux/limits.h>
#include <kprobe/swap_ktd.h>
#include <us_manager/pf/pf_group.h>
*/
-#include <linux/sched.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+# include <linux/sched.h>
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) */
+# include <linux/sched/task_stack.h>
+#endif /* LINUX_VERSION_CODE */
+
#include <linux/module.h>
#include "swap_td_raw.h"
return out_of_line_wait_on_atomic_t(val, action, mode);
}
-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) */
-
-#include <linux/wait.h>
-
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) */
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
+# include <linux/wait.h>
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) */
+# include <linux/wait_bit.h>
+#endif /* LINUX_VERSION_CODE */
#endif /* _SWAP_WAIT_H */
* Timer-based sampling module.
*/
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+# include <linux/sched/task_stack.h> /* for task_pt_regs() */
+#endif
+
#include <linux/ptrace.h>
#include <linux/module.h>
#include <master/swap_initializer.h>
*/
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+# include <linux/sched/task_stack.h> /* need for task_pt_regs() */
+#endif /* LINUX_VERSION_CODE */
#include <linux/init.h> /* need for asm/traps.h */
#include <linux/sched.h> /* need for asm/traps.h */
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
# include <linux/sched/mm.h>
+# include <linux/sched/task.h>
+# include <linux/sched/signal.h>
#endif
#include "pf_group.h"
#include "proc_filters.h"
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
# include <linux/sched/mm.h>
+# include <linux/sched/task.h>
#endif
#include <kprobe/swap_ktd.h>
#include <us_manager/us_slot_manager.h>