aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/Kconfig.preempt3
-rw-r--r--kernel/sched.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
index bf987b95b35..24e7cb0ba26 100644
--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -35,6 +35,7 @@ config PREEMPT_VOLUNTARY
35 35
36config PREEMPT 36config PREEMPT
37 bool "Preemptible Kernel (Low-Latency Desktop)" 37 bool "Preemptible Kernel (Low-Latency Desktop)"
38 select PREEMPT_COUNT
38 help 39 help
39 This option reduces the latency of the kernel by making 40 This option reduces the latency of the kernel by making
40 all kernel code (that is not executing in a critical section) 41 all kernel code (that is not executing in a critical section)
@@ -52,3 +53,5 @@ config PREEMPT
52 53
53endchoice 54endchoice
54 55
56config PREEMPT_COUNT
57 bool \ No newline at end of file
diff --git a/kernel/sched.c b/kernel/sched.c
index 01d9536aaa8..90ad7cf2b29 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2843,7 +2843,7 @@ void sched_fork(struct task_struct *p)
2843#if defined(CONFIG_SMP) 2843#if defined(CONFIG_SMP)
2844 p->on_cpu = 0; 2844 p->on_cpu = 0;
2845#endif 2845#endif
2846#ifdef CONFIG_PREEMPT 2846#ifdef CONFIG_PREEMPT_COUNT
2847 /* Want to start with kernel preemption disabled. */ 2847 /* Want to start with kernel preemption disabled. */
2848 task_thread_info(p)->preempt_count = 1; 2848 task_thread_info(p)->preempt_count = 1;
2849#endif 2849#endif