Lines Matching +full:clock +full:- +full:accuracy

46  * improve accuracy by shifting LSH bits, hence calculating:
51 * - (NOM / DEN) fits in (32 - LSH) bits.
52 * - (NOM % DEN) fits in (32 - LSH) bits.
57 /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */
70 /* some arch's have a small-data section that can be accessed register-relative
71 * but that can only take up to, say, 4-byte variables. jiffies being part of
72 * an 8-byte variable may not be correctly accessed unless we force the issue
77 * The 64-bit value is not atomic - you MUST NOT read it
109 ((long)(b) - (long)(a) < 0))
115 ((long)(a) - (long)(b) >= 0))
138 ((__s64)(b) - (__s64)(a) < 0))
144 ((__s64)(a) - (__s64)(b) >= 0))
167 #define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))
178 * at _least_ "jiffies" - so "jiffies+1" had better still
181 #define MAX_JIFFY_OFFSET ((LONG_MAX >> 1)-1)
187 * values the update wall clock code uses as the jiffies size. This value
210 * about 3-4 bits of precision (less for smaller values of HZ).
221 * Often the math we use will expand beyond 32-bits so we tell C how to
222 * do this and pass the 64-bit result of the mpy through the ">> SCALE"
223 * which should take the result back to 32-bits. We want this expansion
229 * For those who want to know, gcc will give a 64-bit result from a "*"
232 * not to confuse it into thinking it really has a 64-bit operand,
237 * couple of bits away from overflowing a 32-bit word, so we MUST use
238 * 64-bits to get the full range time in nanoseconds.
256 #define SEC_JIFFIE_SC (31 - SHIFT_HZ)
257 #if !((((NSEC_PER_SEC << 2) / TICK_NSEC) << (SEC_JIFFIE_SC - 2)) & 0x80000000)
259 #define SEC_JIFFIE_SC (32 - SHIFT_HZ)
264 TICK_NSEC -1) / (u64)TICK_NSEC))
267 TICK_NSEC -1) / (u64)TICK_NSEC))
270 TICK_NSEC -1) / (u64)TICK_NSEC))
274 * that it is a 64-bit value. Since, when it is applied, we are already
278 #define USEC_ROUND (u64)(((u64)1 << USEC_JIFFIE_SC) - 1)
281 * into seconds. The 64-bit case will overflow if we are not careful,
289 (SH_DIV((MAX_JIFFY_OFFSET >> SEC_JIFFIE_SC) * TICK_NSEC, NSEC_PER_SEC, 1) - 1)