aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/tick-oneshot.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c
index 450c04935b66..06595c64b0c9 100644
--- a/kernel/time/tick-oneshot.c
+++ b/kernel/time/tick-oneshot.c
@@ -23,11 +23,11 @@
23#include "tick-internal.h" 23#include "tick-internal.h"
24 24
25/** 25/**
26 * tick_program_event 26 * tick_program_event internal worker function
27 */ 27 */
28int tick_program_event(ktime_t expires, int force) 28static int __tick_program_event(struct clock_event_device *dev,
29 ktime_t expires, int force)
29{ 30{
30 struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev;
31 ktime_t now = ktime_get(); 31 ktime_t now = ktime_get();
32 32
33 while (1) { 33 while (1) {
@@ -41,6 +41,16 @@ int tick_program_event(ktime_t expires, int force)
41} 41}
42 42
43/** 43/**
44 * tick_program_event
45 */
46int tick_program_event(ktime_t expires, int force)
47{
48 struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev;
49
50 return __tick_program_event(dev, expires, force);
51}
52
53/**
44 * tick_resume_onshot - resume oneshot mode 54 * tick_resume_onshot - resume oneshot mode
45 */ 55 */
46void tick_resume_oneshot(void) 56void tick_resume_oneshot(void)
@@ -61,7 +71,7 @@ void tick_setup_oneshot(struct clock_event_device *newdev,
61{ 71{
62 newdev->event_handler = handler; 72 newdev->event_handler = handler;
63 clockevents_set_mode(newdev, CLOCK_EVT_MODE_ONESHOT); 73 clockevents_set_mode(newdev, CLOCK_EVT_MODE_ONESHOT);
64 clockevents_program_event(newdev, next_event, ktime_get()); 74 __tick_program_event(newdev, next_event, 1);
65} 75}
66 76
67/** 77/**