summaryrefslogtreecommitdiffstats
path: root/include/linux/preempt.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-07-26 17:19:37 -0400
committerIngo Molnar <mingo@kernel.org>2019-07-31 13:03:34 -0400
commitc1a280b68d4e6b6db4a65aa7865c22d8789ddf09 (patch)
tree24c5d965843b44cbe654f5bde0cc68583e3e3321 /include/linux/preempt.h
parent2a11c76e5301dddefcb618dac04f74e6314df6bc (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 'include/linux/preempt.h')
-rw-r--r--include/linux/preempt.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index dd92b1a93919..bbb68dba37cc 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -182,7 +182,7 @@ do { \
182 182
183#define preemptible() (preempt_count() == 0 && !irqs_disabled()) 183#define preemptible() (preempt_count() == 0 && !irqs_disabled())
184 184
185#ifdef CONFIG_PREEMPT 185#ifdef CONFIG_PREEMPTION
186#define preempt_enable() \ 186#define preempt_enable() \
187do { \ 187do { \
188 barrier(); \ 188 barrier(); \
@@ -203,7 +203,7 @@ do { \
203 __preempt_schedule(); \ 203 __preempt_schedule(); \
204} while (0) 204} while (0)
205 205
206#else /* !CONFIG_PREEMPT */ 206#else /* !CONFIG_PREEMPTION */
207#define preempt_enable() \ 207#define preempt_enable() \
208do { \ 208do { \
209 barrier(); \ 209 barrier(); \
@@ -217,7 +217,7 @@ do { \
217} while (0) 217} while (0)
218 218
219#define preempt_check_resched() do { } while (0) 219#define preempt_check_resched() do { } while (0)
220#endif /* CONFIG_PREEMPT */ 220#endif /* CONFIG_PREEMPTION */
221 221
222#define preempt_disable_notrace() \ 222#define preempt_disable_notrace() \
223do { \ 223do { \