]> git.baikalelectronics.ru Git - kernel.git/commit
sched,init: Fix DEBUG_PREEMPT vs early boot
authorPeter Zijlstra <peterz@infradead.org>
Mon, 31 May 2021 10:21:13 +0000 (12:21 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 1 Jun 2021 14:00:11 +0000 (16:00 +0200)
commit37a55016f8e26c19cd1174e67c19187bae18bf9c
treeaaa65f485e131cc6f4d46219a05d9c5050b99189
parentb91c45585a13221c0e74a6f0c836d693b6b5a193
sched,init: Fix DEBUG_PREEMPT vs early boot

Extend 8bf87eaa4957 ("init: Pin init task to the boot CPU, initially")
to cover the new PF_NO_SETAFFINITY requirement.

While there, move wait_for_completion(&kthreadd_done) into kernel_init()
to make it absolutely clear it is the very first thing done by the init
thread.

Fixes: e4d82ba6c0c1 ("lib/smp_processor_id: Use is_percpu_thread() instead of nr_cpus_allowed")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Tested-by: Valentin Schneider <valentin.schneider@arm.com>
Tested-by: Borislav Petkov <bp@alien8.de>
Link: https://lkml.kernel.org/r/YLS4mbKUrA3Gnb4t@hirez.programming.kicks-ass.net
init/main.c
kernel/sched/core.c