Commit 47baab89 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Linus Torvalds

[PATCH] x86_64 gettimeofday bug.

Found by inspection of of the x86_64 gettimeofday.

The problem is that the code always records the maximum value
but it is not reset on the next clock tick.  As written, I see it
keeping the maximum number of microseconds since the last clock tick.
parent 1965fabe
......@@ -214,6 +214,7 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
hpet.ticks = min_t(long, max_t(long, (t - hpet.last_tsc) * (1000000L / HZ) / (1000000L / HZ - hpet.offset),
cpu_khz * 1000/HZ * 15 / 16), cpu_khz * 1000/HZ * 16 / 15);
hpet.last_tsc = t;
timeoffset = 0;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment