diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-07-26 17:19:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-07-31 13:03:34 -0400 |
commit | c1a280b68d4e6b6db4a65aa7865c22d8789ddf09 (patch) | |
tree | 24c5d965843b44cbe654f5bde0cc68583e3e3321 /init | |
parent | 2a11c76e5301dddefcb618dac04f74e6314df6bc (diff) |
sched/preempt: Use CONFIG_PREEMPTION where appropriate
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by
CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same
functionality which today depends on CONFIG_PREEMPT.
Switch the preemption code, scheduler and init task over to use
CONFIG_PREEMPTION.
That's the first step towards RT in that area. The more complex changes are
coming separately.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20190726212124.117528401@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/init_task.c | 2 | ||||
-rw-r--r-- | init/main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/init/init_task.c b/init/init_task.c index 7ab773b9b3cd..bfe06c53b14e 100644 --- a/init/init_task.c +++ b/init/init_task.c | |||
@@ -174,7 +174,7 @@ struct task_struct init_task | |||
174 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 174 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
175 | .ret_stack = NULL, | 175 | .ret_stack = NULL, |
176 | #endif | 176 | #endif |
177 | #if defined(CONFIG_TRACING) && defined(CONFIG_PREEMPT) | 177 | #if defined(CONFIG_TRACING) && defined(CONFIG_PREEMPTION) |
178 | .trace_recursion = 0, | 178 | .trace_recursion = 0, |
179 | #endif | 179 | #endif |
180 | #ifdef CONFIG_LIVEPATCH | 180 | #ifdef CONFIG_LIVEPATCH |
diff --git a/init/main.c b/init/main.c index 96f8d5af52d6..653693da8da6 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -433,7 +433,7 @@ noinline void __ref rest_init(void) | |||
433 | 433 | ||
434 | /* | 434 | /* |
435 | * Enable might_sleep() and smp_processor_id() checks. | 435 | * Enable might_sleep() and smp_processor_id() checks. |
436 | * They cannot be enabled earlier because with CONFIG_PREEMPT=y | 436 | * They cannot be enabled earlier because with CONFIG_PREEMPTION=y |
437 | * kernel_thread() would trigger might_sleep() splats. With | 437 | * kernel_thread() would trigger might_sleep() splats. With |
438 | * CONFIG_PREEMPT_VOLUNTARY=y the init task might have scheduled | 438 | * CONFIG_PREEMPT_VOLUNTARY=y the init task might have scheduled |
439 | * already, but it's stuck on the kthreadd_done completion. | 439 | * already, but it's stuck on the kthreadd_done completion. |