From: Thomas Gleixner <[email protected]>

CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be
removed. Cleanup the leftovers before doing so.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Juri Lelli <[email protected]>
Cc: Vincent Guittot <[email protected]>
Cc: Dietmar Eggemann <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Ben Segall <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Daniel Bristot de Oliveira <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
---
 kernel/sched/core.c | 6 +-----
 lib/Kconfig.debug   | 1 -
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2d95dc3..1c304a1 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3706,8 +3706,7 @@ asmlinkage __visible void schedule_tail(struct 
task_struct *prev)
         * finish_task_switch() for details.
         *
         * finish_task_switch() will drop rq->lock() and lower preempt_count
-        * and the preempt_enable() will end up enabling preemption (on
-        * PREEMPT_COUNT kernels).
+        * and the preempt_enable() will end up enabling preemption.
         */
 
        rq = finish_task_switch(prev);
@@ -7308,9 +7307,6 @@ void __cant_sleep(const char *file, int line, int 
preempt_offset)
        if (irqs_disabled())
                return;
 
-       if (!IS_ENABLED(CONFIG_PREEMPT_COUNT))
-               return;
-
        if (preempt_count() > preempt_offset)
                return;
 
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index d4d0574..52af6ad 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1320,7 +1320,6 @@ config DEBUG_LOCKDEP
 
 config DEBUG_ATOMIC_SLEEP
        bool "Sleep inside atomic section checking"
-       select PREEMPT_COUNT
        depends on DEBUG_KERNEL
        help
          If you say Y here, various routines which may sleep will become very
-- 
2.9.5

Reply via email to