提交 780f98ff 编写于 作者: P Paul Mundt

sh: Account for INITIAL_JIFFIES when using jiffies clocksource.

In the case where we fall back on the generic jiffies clocksource,
INITIAL_JIFFIES needs to be accounted for so that printk times aren't
completely skewed.
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 d9d674e5
...@@ -104,7 +104,7 @@ unsigned long long sched_clock(void) ...@@ -104,7 +104,7 @@ unsigned long long sched_clock(void)
/* jiffies based sched_clock if no clocksource is installed */ /* jiffies based sched_clock if no clocksource is installed */
if (!clocksource_sh.rating) if (!clocksource_sh.rating)
return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); return (jiffies_64 - INITIAL_JIFFIES) * (NSEC_PER_SEC / HZ);
cycles = clocksource_sh.read(&clocksource_sh); cycles = clocksource_sh.read(&clocksource_sh);
return cyc2ns(&clocksource_sh, cycles); return cyc2ns(&clocksource_sh, cycles);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册