um: fix time travel mode
Unfortunately, my build fix for when time travel mode isn't
enabled broke time travel mode, because I forgot that we need
to use the timer time after the timer has been marked disabled,
and thus need to leave the time stored instead of zeroing it.
Fix that by splitting the inline into two, so we can call only
the _mode() one in the relevant code path.
Fixes: b482e48d29
("um: fix build without CONFIG_UML_TIME_TRAVEL_SUPPORT")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:

committed by
Richard Weinberger

parent
d1abaeb3be
commit
e0917f8795
@@ -34,10 +34,13 @@ static inline void time_travel_set_time(unsigned long long ns)
|
||||
time_travel_time = ns;
|
||||
}
|
||||
|
||||
static inline void time_travel_set_timer(enum time_travel_timer_mode mode,
|
||||
unsigned long long expiry)
|
||||
static inline void time_travel_set_timer_mode(enum time_travel_timer_mode mode)
|
||||
{
|
||||
time_travel_timer_mode = mode;
|
||||
}
|
||||
|
||||
static inline void time_travel_set_timer_expiry(unsigned long long expiry)
|
||||
{
|
||||
time_travel_timer_expiry = expiry;
|
||||
}
|
||||
#else
|
||||
@@ -50,8 +53,11 @@ static inline void time_travel_set_time(unsigned long long ns)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void time_travel_set_timer(enum time_travel_timer_mode mode,
|
||||
unsigned long long expiry)
|
||||
static inline void time_travel_set_timer_mode(enum time_travel_timer_mode mode)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void time_travel_set_timer_expiry(unsigned long long expiry)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user