um: time: Fix read_persistent_clock64() in time-travel
authorJohannes Berg <johannes.berg@intel.com>
Wed, 2 Dec 2020 19:58:05 +0000 (20:58 +0100)
committerRichard Weinberger <richard@nod.at>
Sun, 13 Dec 2020 21:22:41 +0000 (22:22 +0100)
commit2701c1bd91dda815b8541aa8c23e1e548cdb6349
tree95932e9779b22c189d7b2c60f32b37799f5ad920
parent49da38a3ef330b7a1643e12c51913d58158e5abe
um: time: Fix read_persistent_clock64() in time-travel

In time-travel mode, we've relied on read_persistent_clock64()
being called only once at system startup, but this is both the
right thing to call from the pseudo-RTC, and also gets called
by the timekeeping core during suspend/resume.

Thus, fix this to always fall make use of the time_travel_time
in any time-travel mode, initializing time_travel_start at boot
to the right value depending on the time-travel mode.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/kernel/time.c