Commit 752274c9 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] missing #if for 1000 HZ

From: Albert Cahalan <albert@users.sourceforge.net>

This should improve timekeeping a bit @ 1000 HZ.
parent d2e45eac
......@@ -606,6 +606,15 @@ static void second_overflow(void)
else
time_adj += (time_adj >> 2) + (time_adj >> 5);
#endif
#if HZ == 1000
/* Compensate for (HZ==1000) != (1 << SHIFT_HZ).
* Add 1.5625% and 0.78125% to get 1023.4375; => only 0.05% error (p. 14)
*/
if (time_adj < 0)
time_adj -= (-time_adj >> 6) + (-time_adj >> 7);
else
time_adj += (time_adj >> 6) + (time_adj >> 7);
#endif
}
/* in the NTP reference this is called "hardclock()" */
......
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