diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-09-10 17:03:53 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2019-09-15 21:37:13 +0200 |
commit | 278911ee89fa0f35127c0194010ffe2c17c2e3af (patch) | |
tree | f4a92533886f20c19d1e15ebde453c6fab6c6fb9 /arch/um/kernel/process.c | |
parent | eec94b8acb03aaaa6fb050883624381f5c07a3f0 (diff) | |
download | linux-278911ee89fa0f35127c0194010ffe2c17c2e3af.tar.gz |
um: time-travel: Restrict time update in IRQ handler
We currently do the time updates in the timer handler, even if
we just call the timer handler ourselves. In basic mode we must
in fact do it there since otherwise the OS timer signal won't
move time forward, but in inf-cpu mode we don't need to, and
it's harder to understand.
Restrict the update there to basic mode, adding a comment, and
do it before calling the timer_handler() in inf-cpu mode.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel/process.c')
-rw-r--r-- | arch/um/kernel/process.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index cf242fc5fe94..094028720567 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -220,10 +220,13 @@ static void time_travel_sleep(unsigned long long duration) if (time_travel_timer_mode == TT_TMR_ONESHOT) time_travel_set_timer_mode(TT_TMR_DISABLED); /* - * time_travel_time will be adjusted in the timer - * IRQ handler so it works even when the signal - * comes from the OS timer + * In basic mode, time_travel_time will be adjusted in + * the timer IRQ handler so it works even when the signal + * comes from the OS timer, see there. */ + if (time_travel_mode != TT_MODE_BASIC) + time_travel_set_time(time_travel_timer_expiry); + deliver_alarm(); } else { time_travel_set_time(next); |