Home
last modified time | relevance | path

Searched refs:ticks (Results 1 – 25 of 32) sorted by relevance

12

/qemu/tests/qtest/
H A Dtco-test.c40 #define TCO_TICKS_TO_SECS(ticks) (((ticks) * 6) / 10) argument
176 set_tco_timeout(&d, ticks); in test_tco_timeout()
220 set_tco_timeout(&d, ticks); in test_tco_max_timeout()
313 set_tco_timeout(&td, ticks); in test_tco_second_timeout_shutdown()
338 set_tco_timeout(&td, ticks); in test_tco_second_timeout_none()
363 set_tco_timeout(&d, ticks); in test_tco_ticks_counter()
371 ticks--; in test_tco_ticks_counter()
399 uint16_t ticks = 8; in test_tco1_status_bits() local
410 set_tco_timeout(&d, ticks); in test_tco1_status_bits()
428 uint16_t ticks = 8; in test_tco2_status_bits() local
[all …]
H A Dsse-timer-test.c55 static void clock_step_ticks(uint64_t ticks) in clock_step_ticks() argument
62 assert(!(ticks & 3)); in clock_step_ticks()
63 clock_step(FOUR_TICKS * (ticks >> 2)); in clock_step_ticks()
/qemu/system/
H A Dcpu-timers.c45 int64_t ticks = timers_state.cpu_ticks_offset; in cpu_get_ticks_locked() local
47 ticks += cpu_get_host_ticks(); in cpu_get_ticks_locked()
50 if (timers_state.cpu_ticks_prev > ticks) { in cpu_get_ticks_locked()
52 timers_state.cpu_ticks_offset += timers_state.cpu_ticks_prev - ticks; in cpu_get_ticks_locked()
53 ticks = timers_state.cpu_ticks_prev; in cpu_get_ticks_locked()
56 timers_state.cpu_ticks_prev = ticks; in cpu_get_ticks_locked()
57 return ticks; in cpu_get_ticks_locked()
66 int64_t ticks; in cpu_get_ticks() local
69 ticks = cpu_get_ticks_locked(); in cpu_get_ticks()
71 return ticks; in cpu_get_ticks()
/qemu/hw/timer/
H A Dnrf51_timer.c35 static int64_t ticks_to_ns(NRF51TimerState *s, uint32_t ticks) in ticks_to_ns() argument
39 return muldiv64(ticks, NANOSECONDS_PER_SECOND, freq); in ticks_to_ns()
45 uint32_t ticks = ns_to_ticks(s, now - s->update_counter_ns); in update_counter() local
47 s->counter = (s->counter + ticks) % BIT(bitwidths[s->bitmode]); in update_counter()
53 s->update_counter_ns += ticks_to_ns(s, ticks); in update_counter()
54 return ticks; in update_counter()
104 uint32_t ticks; in timer_expire() local
116 ticks = update_counter(s, now); in timer_expire()
119 if (cc_remaining[i] <= ticks) { in timer_expire()
H A Daspeed_timer.c105 uint64_t ticks = muldiv64(delta_ns, rate, NANOSECONDS_PER_SECOND); in calculate_ticks() local
107 return t->reload - MIN(t->reload, ticks); in calculate_ticks()
118 static inline uint64_t calculate_time(struct AspeedTimer *t, uint32_t ticks) in calculate_time() argument
123 delta_ticks = t->reload - MIN(t->reload, ticks); in calculate_time()
188 uint32_t ticks; in aspeed_timer_expire() local
194 ticks = calculate_ticks(t, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)); in aspeed_timer_expire()
196 if (!ticks) { in aspeed_timer_expire()
198 } else if (ticks <= MIN(t->match[0], t->match[1])) { in aspeed_timer_expire()
200 } else if (ticks <= MAX(t->match[0], t->match[1])) { in aspeed_timer_expire()
H A Dsse-counter.c143 uint64_t ticks; in sse_counter_for_timestamp() local
150 ticks = clock_ns_to_ticks(s->clk, now - s->ns_then); in sse_counter_for_timestamp()
163 ticks = muldiv64(ticks, s->cntscr0, 0x01000000); in sse_counter_for_timestamp()
165 return s->ticks_then + ticks; in sse_counter_for_timestamp()
H A Dstm32f2xx_timer.c76 uint64_t ticks; in stm32f2xx_timer_set_alarm() local
86 ticks = s->tim_arr - (now_ticks - s->tick_offset); in stm32f2xx_timer_set_alarm()
88 DB_PRINT("Alarm set in %d ticks\n", (int) ticks); in stm32f2xx_timer_set_alarm()
90 s->hit_time = muldiv64((ticks + (uint64_t) now_ticks) * (s->tim_psc + 1), in stm32f2xx_timer_set_alarm()
H A Dnpcm7xx_timer.c131 int64_t ticks = count; in npcm7xx_timer_count_to_ns() local
133 ticks *= npcm7xx_tcsr_prescaler(t->tcsr); in npcm7xx_timer_count_to_ns()
135 return clock_ticks_to_ns(t->ctrl->clock, ticks); in npcm7xx_timer_count_to_ns()
167 int64_t ticks = cycles * npcm7xx_watchdog_timer_prescaler(t); in npcm7xx_watchdog_timer_reset_cycles() local
168 int64_t ns = clock_ticks_to_ns(t->ctrl->clock, ticks); in npcm7xx_watchdog_timer_reset_cycles()
H A Dsifive_pwm.c76 uint64_t ticks) in sifive_pwm_ticks_to_ns() argument
78 return muldiv64(ticks, NANOSECONDS_PER_SECOND, s->freq_hz); in sifive_pwm_ticks_to_ns()
/qemu/hw/ppc/
H A Dppc_booke.c136 uint64_t delta_tick, ticks = 0; in booke_update_fixed_timer() local
156 ticks = period; in booke_update_fixed_timer()
159 if (ticks + delta_tick < ticks) { in booke_update_fixed_timer()
161 ticks = UINT64_MAX; in booke_update_fixed_timer()
163 ticks += delta_tick; in booke_update_fixed_timer()
166 *next = now + muldiv64(ticks, NANOSECONDS_PER_SECOND, tb_env->tb_freq); in booke_update_fixed_timer()
/qemu/hw/misc/
H A Dmps2-fpgaio.c66 uint64_t ticks = muldiv64(elapsed, s->prescale_clk, NANOSECONDS_PER_SECOND); in resync_counter() local
73 if (ticks == 0) { in resync_counter()
76 } else if (ticks < s->pscntr) { in resync_counter()
78 s->pscntr -= ticks; in resync_counter()
86 s->counter += ticks - s->pscntr; in resync_counter()
108 uint64_t y = ticks - s->pscntr + s->prescale; in resync_counter()
119 s->pscntr_sync_ticks += muldiv64(ticks, NANOSECONDS_PER_SECOND, in resync_counter()
H A Dimx7_snvs.c42 uint64_t ticks = muldiv64(qemu_clock_get_ns(rtc_clock), RTC_FREQ, in imx7_snvs_get_count() local
44 return s->tick_offset + ticks; in imx7_snvs_get_count()
/qemu/hw/rtc/
H A Dpl031.c68 uint32_t ticks; in pl031_set_alarm() local
72 ticks = s->mr - pl031_get_count(s); in pl031_set_alarm()
73 trace_pl031_set_alarm(ticks); in pl031_set_alarm()
74 if (ticks == 0) { in pl031_set_alarm()
79 timer_mod(s->timer, now + (int64_t)ticks * NANOSECONDS_PER_SECOND); in pl031_set_alarm()
H A Dtrace-events19 pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks"
H A Dgoldfish_rtc.c73 uint64_t ticks = goldfish_rtc_get_count(s); in goldfish_rtc_set_alarm() local
76 if (event <= ticks) { in goldfish_rtc_set_alarm()
H A Dls7a_rtc.c95 static uint64_t ticks_to_ns(uint64_t ticks) in ticks_to_ns() argument
97 return ticks * NANOSECONDS_PER_SECOND / LS7A_RTC_FREQ; in ticks_to_ns()
/qemu/docs/specs/
H A Drapl-msr.rst89 dividing the time in clock ticks. The number of clock ticks per second can be
90 found by the sysconf system call. A typical value of clock ticks per second is
91 100. So a core can run a process at the maximum of 100 ticks per second. If a
92 package has 4 cores, 400 ticks maximum can be scheduled on all the cores
96 process with the [pid] as the process ID. It gives the amount of ticks the
104 A 4 cores package can schedule a maximum of 400 ticks per second with 100 ticks
105 per second per core. If a thread was scheduled for 100 ticks between a second
/qemu/hw/adc/
H A Dnpcm7xx_adc.c77 int64_t ticks = cycles; in npcm7xx_adc_start_timer() local
80 ticks *= prescaler; in npcm7xx_adc_start_timer()
81 ns = clock_ticks_to_ns(clk, ticks); in npcm7xx_adc_start_timer()
/qemu/hw/acpi/
H A Dich9_tco.c35 int ticks = tr->tco.tmr & TCO_TMR_MASK; in tco_timer_reload() local
36 int64_t nsec = (int64_t)ticks * TCO_TICK_NSEC; in tco_timer_reload()
38 trace_tco_timer_reload(ticks, nsec / 1000000); in tco_timer_reload()
H A Dtrace-events58 tco_timer_reload(int ticks, int msec) "ticks=%d (%d ms)"
/qemu/include/hw/
H A Dclock.h275 static inline uint64_t clock_ticks_to_ns(const Clock *clk, uint64_t ticks) in clock_ticks_to_ns() argument
286 mulu64(&ns_low, &ns_high, clk->period, ticks); in clock_ticks_to_ns()
/qemu/hw/audio/
H A Dsb16.c797 int64_t ticks; in complete() local
802 ticks = muldiv64(bytes, NANOSECONDS_PER_SECOND, freq); in complete()
803 if (ticks < NANOSECONDS_PER_SECOND / 1024) { in complete()
810 qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + ticks in complete()
814 ldebug ("mix silence %d %d %" PRId64 "\n", samples, bytes, ticks); in complete()
/qemu/hw/arm/
H A Domap1.c605 int64_t now, ticks; in omap_ulpd_pm_write() local
636 ticks = muldiv64(now, 32768, NANOSECONDS_PER_SECOND); in omap_ulpd_pm_write()
637 s->ulpd_pm_regs[0x00 >> 2] = (ticks >> 0) & 0xffff; in omap_ulpd_pm_write()
638 s->ulpd_pm_regs[0x04 >> 2] = (ticks >> 16) & 0xffff; in omap_ulpd_pm_write()
639 if (ticks >> 32) /* OVERFLOW_32K */ in omap_ulpd_pm_write()
644 s->ulpd_pm_regs[0x08 >> 2] = (ticks >> 0) & 0xffff; in omap_ulpd_pm_write()
645 s->ulpd_pm_regs[0x0c >> 2] = (ticks >> 16) & 0xffff; in omap_ulpd_pm_write()
646 if (ticks >> 32) /* OVERFLOW_HI_FREQ */ in omap_ulpd_pm_write()
3551 int64_t on, period = 1, ticks = 1000; in omap_lpg_update() local
3559 period = muldiv64(ticks, per[s->control & 7], /* PERCTRL */ in omap_lpg_update()
[all …]
/qemu/qga/
H A Dqapi-schema.json1697 # @read-ticks: time spent reading(ms)
1699 # @write-ticks: time spent writing(ms)
1701 # @discard-ticks: time spent discarding(ms)
1703 # @flush-ticks: time spent flushing(ms)
1707 # @total-ticks: time spent doing I/Os (ms)
1725 '*read-ticks': 'uint64',
1726 '*write-ticks': 'uint64',
1727 '*discard-ticks': 'uint64',
1728 '*flush-ticks': 'uint64',
1730 '*total-ticks': 'uint64',
[all …]
/qemu/hw/net/
H A Ddp8393x.c332 uint32_t ticks; in dp8393x_set_next_tick() local
340 ticks = dp8393x_wt(s); in dp8393x_set_next_tick()
342 delay = NANOSECONDS_PER_SECOND * ticks / 5000000; in dp8393x_set_next_tick()

12