1
0
Fork 0
remarkable-linux/init
Thomas Gleixner 8fb12156b8 init: Pin init task to the boot CPU, initially
Some of the boot code in init_kernel_freeable() which runs before SMP
bringup assumes (rightfully) that it runs on the boot CPU and therefore can
use smp_processor_id() in preemptible context.

That works so far because the smp_processor_id() check starts to be
effective after smp bringup. That's just wrong. Starting with SMP bringup
and the ability to move threads around, smp_processor_id() in preemptible
context is broken.

Aside of that it does not make sense to allow init to run on all CPUs
before sched_smp_init() has been run.

Pin the init to the boot CPU so the existing code can continue to use
smp_processor_id() without triggering the checks when the enabling of those
checks starts earlier.

Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20170516184734.943149935@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-05-23 10:01:34 +02:00
..
Kconfig rcu: Separately compile large rcu_segcblist functions 2017-05-02 07:21:02 -07:00
Makefile kbuild: allow archs to select link dead code/data elimination 2016-09-09 10:47:00 +02:00
calibrate.c kernel: add calibration_delay_done() 2014-06-16 12:47:39 -06:00
do_mounts.c init: reduce rootwait polling interval time to 5ms 2016-12-12 18:55:10 -08:00
do_mounts.h initramfs: use vfs_stat/lstat directly 2017-05-08 17:15:12 -07:00
do_mounts_initrd.c init/do_mounts: initrd_load() can be boolean 2016-01-20 17:09:18 -08:00
do_mounts_md.c init: disable sparse checking of the mount.o source files 2012-05-31 17:49:27 -07:00
do_mounts_rd.c init: use pr_cont() when displaying rotator during ramdisk loading. 2016-11-24 09:32:20 -08:00
init_task.c sched/headers: Prepare to move 'init_task' and 'init_thread_union' from <linux/sched.h> to <linux/sched/task.h> 2017-03-02 08:42:38 +01:00
initramfs.c initramfs: use vfs_stat/lstat directly 2017-05-08 17:15:12 -07:00
main.c init: Pin init task to the boot CPU, initially 2017-05-23 10:01:34 +02:00
noinitramfs.c init: mark __user address space on string literals 2010-10-26 16:52:15 -07:00
version.c locking/atomic, kref: Add KREF_INIT() 2017-01-14 11:37:18 +01:00