sched/clock: Use late_initcall() instead of sched_init_smp()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 21 Apr 2017 10:46:57 +0000 (12:46 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 15 May 2017 08:15:21 +0000 (10:15 +0200)
commit2e44b7ddf8ab01cf98106c68388f87af15fbde73
treee0bb9507fc4d61957b10858a2caf87e616c7332a
parentf9fccdb9efef60dbcf84d493514b475c41aa866f
sched/clock: Use late_initcall() instead of sched_init_smp()

Core2 marks its TSC unstable in ACPI Processor Idle, which is probed
after sched_init_smp(). Luckily it appears both acpi_processor and
intel_idle (which has a similar check) are mandatory built-in.

This means we can delay switching to stable until after these drivers
have ran (if they were modules, this would be impossible).

Delay the stable switch to late_initcall() to allow these drivers to
mark TSC unstable and avoid difficult stable->unstable transitions.

Reported-by: Lofstedt, Marta <marta.lofstedt@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J . Wysocki <rafael.j.wysocki@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched/clock.h
kernel/sched/clock.c
kernel/sched/core.c