diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-10 23:15:14 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-10 23:15:14 -0400 |
commit | 780f98ff1fa9cfcab177f6b5ab09b11321f1e5c8 (patch) | |
tree | 2252bc0f9c1abf04262e4899a62b281beeb90674 /arch/sh/kernel/time.c | |
parent | d9d674e50007362567edb5df65c05dd56a5964bf (diff) |
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: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/time.c')
-rw-r--r-- | arch/sh/kernel/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index e0aa769481ff..a77838f539f8 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c | |||
@@ -104,7 +104,7 @@ unsigned long long sched_clock(void) | |||
104 | 104 | ||
105 | /* jiffies based sched_clock if no clocksource is installed */ | 105 | /* jiffies based sched_clock if no clocksource is installed */ |
106 | if (!clocksource_sh.rating) | 106 | if (!clocksource_sh.rating) |
107 | return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); | 107 | return (jiffies_64 - INITIAL_JIFFIES) * (NSEC_PER_SEC / HZ); |
108 | 108 | ||
109 | cycles = clocksource_sh.read(&clocksource_sh); | 109 | cycles = clocksource_sh.read(&clocksource_sh); |
110 | return cyc2ns(&clocksource_sh, cycles); | 110 | return cyc2ns(&clocksource_sh, cycles); |