Skip to content

Commit 417d17e

Browse files
Sainath Grandhilijinxia
authored andcommitted
udelay waits for corresponding number of milliseconds passed to API.
Changed the CYCLES_PER_MS to US_TO_TICKS Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
1 parent 18c355f commit 417d17e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hypervisor/lib/udelay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void udelay(int loop_count)
1111
uint64_t dest_tsc, delta_tsc;
1212

1313
/* Calculate number of ticks to wait */
14-
delta_tsc = CYCLES_PER_MS * loop_count;
14+
delta_tsc = US_TO_TICKS(loop_count);
1515
dest_tsc = rdtsc() + delta_tsc;
1616

1717
/* Loop until time expired */

0 commit comments

Comments
 (0)