diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-05-16 20:42:32 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-05-23 10:01:34 +0200 |
commit | 8fb12156b8db61af3d49f3e5e104568494581d1f (patch) | |
tree | 7a0bbfa7ff1a094ac918e8630f0993faec9c1173 /include/linux/shm.h | |
parent | 8655d5497735b288f8a9b458bd22e7d1bf95bb61 (diff) | |
download | lwn-8fb12156b8db61af3d49f3e5e104568494581d1f.tar.gz lwn-8fb12156b8db61af3d49f3e5e104568494581d1f.zip |
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>
Diffstat (limited to 'include/linux/shm.h')
0 files changed, 0 insertions, 0 deletions