Lines Matching defs:counter

80 	uint32_t	countbase;	/* HPET counter base value */
89 sbintime_t callout_sbt; /* time when counter==compval */
97 static void vhpet_start_timer(struct vhpet *vhpet, int n, uint32_t counter,
165 * meaningless when the counter is disabled. Make sure
251 vhpet_adjust_compval(struct vhpet *vhpet, int n, uint32_t counter)
265 * In this scenario the 'counter' is ahead of 'compval'. To find
267 * number space between 'compval' and 'counter' into 'comprate'
269 * of 'counter'.
271 compnext = compval + ((counter - compval) / comprate + 1) * comprate;
280 uint32_t counter;
304 panic("vhpet(%p) callout with counter disabled", vhpet);
306 counter = vhpet_counter(vhpet, &now);
307 vhpet_start_timer(vhpet, n, counter, now);
326 * the next interrupt has to wait for the counter to wrap around.
336 vhpet_start_timer(struct vhpet *vhpet, int n, uint32_t counter, sbintime_t now)
341 vhpet_adjust_compval(vhpet, n, counter);
351 delta = (vhpet->timer[n].compval - counter) * vhpet->freq_sbt;
366 * Restart the timers based on the value of the main counter
375 vhpet_stop_counting(struct vhpet *vhpet, uint32_t counter, sbintime_t now)
379 vhpet->countbase = counter;
475 uint32_t isr_clear_mask, old_compval, old_comprate, counter;
513 * Get the most recent value of the counter before updating
519 counter = vhpet_counter(vhpet, nowptr);
534 vhpet_stop_counting(vhpet, counter, now);
553 /* Zero-extend the counter to 64-bits before updating it */
600 counter = vhpet_counter(vhpet, &now);
601 vhpet_start_timer(vhpet, i, counter,