UML has HZ == 20. When I built test9, I ran into trouble with this new block
in include/linux/timex.h:
#if HZ >= 24 && HZ < 48
# define SHIFT_HZ 5
#elif HZ >= 48 && HZ < 96
# define SHIFT_HZ 6
...
I added the obvious 12 <= HZ < 24 lines and got this from kernel/timer.c:
timer.c:446: warning: right shift count is negative
timer.c:449: warning: right shift count is negative
Those lines are these:
time_adj -= -ltemp >> (SHIFT_USEC + SHIFT_HZ - SHIFT_SCALE);
time_adj += ltemp >> (SHIFT_USEC + SHIFT_HZ - SHIFT_SCALE);
When you chase down the constants (the others are in timex.h, too), the shift
value turns out to be:
16 + SHIFT_HZ - 22
16 + SHIFT_HZ - 22 >= 0 implies SHIFT_HZ >= 6.
Now, my questions are:
What's the reasoning behind these magic numbers? The comment associated with
those constants is less than illumunating IMHO.
Is there anything wrong with HZ < 48? If not, what's the right way to get it
without upsetting the compiler?
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:12 EST