Commit 446608f9 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka
Browse files

ipipe: timer: notify co-kernel about entering ONESHOT_STOPPED mode

Although we don't want to disable the hardware not to wreck the
outstanding timing requests managed by the co-kernel, we should
nevertheless notify it about entering the ONESHOT_STOPPED mode, so
that it may disable the host tick emulation.
parent 07247a9e
...@@ -371,6 +371,15 @@ static int do_set_oneshot(struct clock_event_device *cdev) ...@@ -371,6 +371,15 @@ static int do_set_oneshot(struct clock_event_device *cdev)
return 0; return 0;
} }
static int do_set_oneshot_stopped(struct clock_event_device *cdev)
struct ipipe_timer *timer = __ipipe_raw_cpu_read(percpu_timer);
timer->mode_handler(CLOCK_EVT_MODE_SHUTDOWN, cdev);
return 0;
static int do_set_periodic(struct clock_event_device *cdev) static int do_set_periodic(struct clock_event_device *cdev)
{ {
struct ipipe_timer *timer = __ipipe_raw_cpu_read(percpu_timer); struct ipipe_timer *timer = __ipipe_raw_cpu_read(percpu_timer);
...@@ -441,7 +450,7 @@ static void grab_timer(void *arg) ...@@ -441,7 +450,7 @@ static void grab_timer(void *arg)
if (timer->orig_set_state_oneshot) if (timer->orig_set_state_oneshot)
evtdev->set_state_oneshot = do_set_oneshot; evtdev->set_state_oneshot = do_set_oneshot;
if (timer->orig_set_state_oneshot_stopped) if (timer->orig_set_state_oneshot_stopped)
evtdev->set_state_oneshot_stopped = do_set_oneshot; evtdev->set_state_oneshot_stopped = do_set_oneshot_stopped;
if (timer->orig_set_state_shutdown) if (timer->orig_set_state_shutdown)
evtdev->set_state_shutdown = do_set_shutdown; evtdev->set_state_shutdown = do_set_shutdown;
evtdev->set_next_event = data->emutick; evtdev->set_next_event = data->emutick;
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