mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
[PATCH] libpayload: Fix overflow in _delay function
On faster machines, delta might be more then 32 bits Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3677 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
c53cdd782a
commit
f2433a9d9e
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ unsigned int get_cpu_speed(void)
|
||||||
return cpu_khz;
|
return cpu_khz;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _delay(unsigned int delta)
|
static inline void _delay(unsigned long long delta)
|
||||||
{
|
{
|
||||||
unsigned long long timeout = rdtsc() + delta;
|
unsigned long long timeout = rdtsc() + delta;
|
||||||
while (rdtsc() < timeout) ;
|
while (rdtsc() < timeout) ;
|
||||||
|
|
Loading…
Add table
Reference in a new issue