提交 659bc17b 编写于 作者: P pang.xunlei 提交者: John Stultz

time: Complete NTP adjustment threshold judging conditions

The clocksource mult-adjustment threshold is [mult-maxadj, mult+maxadj],
timekeeping_adjust() only deals with the upper threshold, but misses the
lower threshold.

This patch adds the lower threshold judging condition.
Signed-off-by: Npang.xunlei <pang.xunlei@linaro.org>
[jstultz: Minor fix for > 80 char line]
Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
上级 6067dc5a
...@@ -1403,7 +1403,8 @@ static void timekeeping_adjust(struct timekeeper *tk, s64 offset) ...@@ -1403,7 +1403,8 @@ static void timekeeping_adjust(struct timekeeper *tk, s64 offset)
} }
if (unlikely(tk->tkr.clock->maxadj && if (unlikely(tk->tkr.clock->maxadj &&
(tk->tkr.mult > tk->tkr.clock->mult + tk->tkr.clock->maxadj))) { (abs(tk->tkr.mult - tk->tkr.clock->mult)
> tk->tkr.clock->maxadj))) {
printk_once(KERN_WARNING printk_once(KERN_WARNING
"Adjusting %s more than 11%% (%ld vs %ld)\n", "Adjusting %s more than 11%% (%ld vs %ld)\n",
tk->tkr.clock->name, (long)tk->tkr.mult, tk->tkr.clock->name, (long)tk->tkr.mult,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册