clock: initialize dummy clocksource statically
Assigning the dummy clocksource in a initcall has the problem that
get_time_ns() crashes before that initcall is executed. This happens
when dmesg support is enabled in conjunction with CONFIG_DEBUG_INITCALLS.
In this case the dmesg code wants to have the timestamp of a log
message.
Solve this by setting the current clocksource to the dummy clock
statically and not at runtime. This way we always have a dummy
clock available.

Fixes:
commit 8972eb7
Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Date:   Fri Mar 3 13:34:02 2017 +0100

    clocksource: move dummy clock source to init_clock

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 587afe8 commit e5f2191e7b6920e67dd45b34d9b1c86d04456ffa
@Sascha Hauer Sascha Hauer authored on 5 May 2017
Showing 1 changed file
View
common/clock.c