Commit 2c087efa authored by Philippe Gerum's avatar Philippe Gerum
Browse files

ipipe: tick: revive the host tick after device grab

Once the device was grabbed by ipipe_timer_start(), any pending host
tick programmed in the hardware is basically lost, unknown to the
co-kernel implementing the proxy handlers.

Schedule a host event with the latest target time programmed to have
the co-kernel know about the pending tick.
parent 0d283e77
......@@ -387,6 +387,9 @@ static int do_set_shutdown(struct clock_event_device *cdev)
return 0;
int clockevents_program_event(struct clock_event_device *dev,
ktime_t expires, bool force);
int ipipe_timer_start(void (*tick_handler)(void),
void (*emumode)(enum clock_event_mode mode,
struct clock_event_device *cdev),
......@@ -442,6 +445,13 @@ int ipipe_timer_start(void (*tick_handler)(void),
if (desc && irqd_irq_disabled(&desc->irq_data))
if (evtdev->ipipe_stolen && clockevent_state_oneshot(evtdev))
ret = clockevents_program_event(evtdev,
evtdev->next_event, true);
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment