KI: add kernel patch for CONFIG_SWAP_HOOK_SWITCH_TO support 89/156489/4
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 16 Oct 2017 17:58:18 +0000 (20:58 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 20 Oct 2017 09:06:02 +0000 (12:06 +0300)
Change-Id: Id47af2199f79dcba96f2a65a3d26d5e7490f9e90
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
kernel_integration/patches/0006-SWAP-DA-add-CONFIG_SWAP_HOOK_SWITCH_TO.patch [new file with mode: 0644]

diff --git a/kernel_integration/patches/0006-SWAP-DA-add-CONFIG_SWAP_HOOK_SWITCH_TO.patch b/kernel_integration/patches/0006-SWAP-DA-add-CONFIG_SWAP_HOOK_SWITCH_TO.patch
new file mode 100644 (file)
index 0000000..85a5b09
--- /dev/null
@@ -0,0 +1,51 @@
+From f96db429459c92474c26e49988d5fb5da0e23972 Mon Sep 17 00:00:00 2001
+From: Your Name <your@email.com>
+Date: Thu, 5 Oct 2017 10:19:51 +0300
+Subject: [PATCH 6/9] SWAP-DA: add CONFIG_SWAP_HOOK_SWITCH_TO
+
+---
+ include/swap/hook_switch_to.h | 11 +++++++++++
+ kernel/sched/core.c           |  2 ++
+ 2 files changed, 13 insertions(+)
+ create mode 100644 include/swap/hook_switch_to.h
+
+diff --git a/include/swap/hook_switch_to.h b/include/swap/hook_switch_to.h
+new file mode 100644
+index 0000000..44bf883
+--- /dev/null
++++ b/include/swap/hook_switch_to.h
+@@ -0,0 +1,11 @@
++#ifndef _LINUX_SWAP_HOOK_SWITCH_TO_H
++#define _LINUX_SWAP_HOOK_SWITCH_TO_H
++
++
++static inline void swap_hook_switch_to(struct task_struct *prev,
++                                     struct task_struct *next)
++{
++}
++
++
++#endif /* _LINUX_SWAP_HOOK_SWITCH_TO_H */
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index c8e2fdd..3b9bd84 100644
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -50,6 +50,7 @@
+ #include <linux/smp.h>
+ #include <linux/threads.h>
+ #include <linux/timer.h>
++#include <swap/hook_switch_to.h>
+ #include <linux/rcupdate.h>
+ #include <linux/cpu.h>
+ #include <linux/cpuset.h>
+@@ -2393,6 +2394,7 @@ context_switch(struct rq *rq, struct task_struct *prev,
+       spin_release(&rq->lock.dep_map, 1, _THIS_IP_);
+       context_tracking_task_switch(prev, next);
++      swap_hook_switch_to(prev, next);
+       /* Here we just switch the register state and the stack. */
+       switch_to(prev, next, prev);
+-- 
+2.1.4
+