x86: tsc_timer: Correct overflow in __udelay()
authorSimon Glass <sjg@chromium.org>
Thu, 14 Jan 2021 03:29:45 +0000 (20:29 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 1 Feb 2021 07:11:40 +0000 (15:11 +0800)
commit9edf20f15649cda83214b3b6dc90ca9acff45abb
treeb61e17db1d0ee07f09427a3fe82a71f07c2fbd82
parent12218c1ff41befedd78ed8cfa902f2cc25d05c88
x86: tsc_timer: Correct overflow in __udelay()

At present long delays such as msleep(2000) can cause an overflow in this
function. There is no need for this, since it already uses a 64-bit int.

Add a cast to correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/timer/tsc_timer.c