aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index cb8a15c19583..c71bcd549241 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -193,7 +193,8 @@ struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer,
193 * Switch the timer base to the current CPU when possible. 193 * Switch the timer base to the current CPU when possible.
194 */ 194 */
195static inline struct hrtimer_clock_base * 195static inline struct hrtimer_clock_base *
196switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base) 196switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base,
197 int pinned)
197{ 198{
198 struct hrtimer_clock_base *new_base; 199 struct hrtimer_clock_base *new_base;
199 struct hrtimer_cpu_base *new_cpu_base; 200 struct hrtimer_cpu_base *new_cpu_base;
@@ -907,9 +908,9 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
907 ret = remove_hrtimer(timer, base); 908 ret = remove_hrtimer(timer, base);
908 909
909 /* Switch the timer base, if necessary: */ 910 /* Switch the timer base, if necessary: */
910 new_base = switch_hrtimer_base(timer, base); 911 new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED);
911 912
912 if (mode == HRTIMER_MODE_REL) { 913 if (mode & HRTIMER_MODE_REL) {
913 tim = ktime_add_safe(tim, new_base->get_time()); 914 tim = ktime_add_safe(tim, new_base->get_time());
914 /* 915 /*
915 * CONFIG_TIME_LOW_RES is a temporary way for architectures 916 * CONFIG_TIME_LOW_RES is a temporary way for architectures