Commit f657ad6a authored by Hongzhan Chen's avatar Hongzhan Chen Committed by Jan Kiszka

cobalt/timer: dovetail: handle ONESHOT_STOPPED mode

Force the next tick to be programmed in the hardware as a result of
leaving the ONESHOT_STOPPED
Signed-off-by: default avatarHongzhan Chen <hongzhan.chen@intel.com>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 93e7b348
......@@ -9,4 +9,8 @@ int pipeline_install_tick_proxy(void);
void pipeline_uninstall_tick_proxy(void);
struct xnsched;
inline bool pipeline_must_force_program_tick(struct xnsched *sched);
#endif /* !_COBALT_KERNEL_IPIPE_TICK_H */
......@@ -84,6 +84,11 @@ void xn_core_tick(struct clock_event_device *dummy) /* hard irqs off */
xnintr_core_clock_handler();
}
inline bool pipeline_must_force_program_tick(struct xnsched *sched)
{
return sched->lflags & XNTSTOP;
}
static int proxy_set_oneshot_stopped(struct clock_event_device *proxy_dev)
{
struct clock_event_device *real_dev;
......@@ -105,6 +110,7 @@ static int proxy_set_oneshot_stopped(struct clock_event_device *proxy_dev)
xnlock_get_irqsave(&nklock, s);
sched = xnsched_current();
xntimer_stop(&sched->htimer);
sched->lflags |= XNTSTOP;
if (sched->lflags & XNIDLE) {
real_dev = dev->real_device;
......
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