mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-01 21:23:59 +00:00
This patch represents TSC freqeuency in KHz using a 32-bit unsigned integer. The conversion macros between ticks and us/ms are changed to inline functions to enforce the types of the input parameters. Note that us_to_ticks accepts only uint32_t (~4K us at most) and never overflows. Results of some unit tests on the conversion functions: calibrate_tsc, tsc_khz=1881600 64us -> ticks: 120422 64us -> ticks -> us: 63 511us -> ticks: 961497 511us -> ticks -> us: 510 1280000 ticks -> us: 680 1280000 ticks -> us -> ticks: 1279488 Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com> |
||
---|---|---|
.. | ||
crypto | ||
atomic.h | ||
bits.h | ||
errno.h | ||
list.h | ||
macros.h | ||
mem_mgt.h | ||
rtl.h | ||
spinlock.h | ||
sprintf.h | ||
stdarg.h | ||
types.h | ||
util.h |