x86/tsc: Fix mark_tsc_unstable()
authorPeter Zijlstra <peterz@infradead.org>
Mon, 30 Apr 2018 10:00:12 +0000 (12:00 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 May 2018 14:10:40 +0000 (16:10 +0200)
commite3b4f79025e0a4eb7e2a2c7d24dadfa1e38893b0
treeeae4409645f748c251d1085c7f00f8dfef71c4f5
parent5b9e886a4af97574ca3ce1147f35545da0e7afc7
x86/tsc: Fix mark_tsc_unstable()

mark_tsc_unstable() also needs to affect tsc_early, Now that
clocksource_mark_unstable() can be used on a clocksource irrespective of
its registration state, use it on both tsc_early and tsc.

This does however require cs->list to be initialized empty, otherwise it
cannot tell the registation state before registation.

Fixes: aa83c45762a2 ("x86/tsc: Introduce early tsc clocksource")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Diego Viola <diego.viola@gmail.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: len.brown@intel.com
Cc: rjw@rjwysocki.net
Cc: rui.zhang@intel.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180430100344.533326547@infradead.org
arch/x86/kernel/tsc.c