aboutsummaryrefslogtreecommitdiff
path: root/arch/um/include
diff options
context:
space:
mode:
authorJohannes Berg2019-09-10 17:03:52 +0200
committerRichard Weinberger2019-09-15 21:37:13 +0200
commiteec94b8acb03aaaa6fb050883624381f5c07a3f0 (patch)
tree90e4a11640b16618d8180fc0af500be66dbbefc3 /arch/um/include
parent786b2384bf1c1b53dc23dc493aaaae29ef01e6ce (diff)
um: time-travel: Fix periodic timers
Periodic timers are broken, because the also only fire once. As it happens, Linux doesn't care because it only sets the timer to periodic very briefly during boot, and then switches it only between one-shot and off later. Nevertheless, fix the logic (we shouldn't even be looking at time_travel_timer_expiry unless the timer is enabled) and change the code to fire the timer periodically in periodic mode, in case it ever gets used in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/shared/timer-internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/um/include/shared/timer-internal.h b/arch/um/include/shared/timer-internal.h
index 9991ec2371e4..a4d79389b223 100644
--- a/arch/um/include/shared/timer-internal.h
+++ b/arch/um/include/shared/timer-internal.h
@@ -43,6 +43,11 @@ static inline void time_travel_set_timer_expiry(unsigned long long expiry)
{
time_travel_timer_expiry = expiry;
}
+
+static inline void time_travel_set_timer_interval(unsigned long long interval)
+{
+ time_travel_timer_interval = interval;
+}
#else
#define time_travel_mode TT_MODE_OFF
#define time_travel_time 0
@@ -61,6 +66,10 @@ static inline void time_travel_set_timer_expiry(unsigned long long expiry)
{
}
+static inline void time_travel_set_timer_interval(unsigned long long interval)
+{
+}
+
#define time_travel_timer_mode TT_TMR_DISABLED
#endif