[PATCH] libpayload: Fix overflow in _delay function
authorJordan Crouse <jordan.crouse@amd.com>
Mon, 20 Oct 2008 17:08:08 +0000 (17:08 +0000)
committerJordan Crouse <jordan.crouse@amd.com>
Mon, 20 Oct 2008 17:08:08 +0000 (17:08 +0000)
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

payloads/libpayload/i386/timer.c

index e1a886e3022435b04e0b10bd7eb7c8bd86e2bea0..3d8607b3cb43ff66193d959f483e9a0f9612284b 100644 (file)
@@ -75,7 +75,7 @@ unsigned int get_cpu_speed(void)
        return cpu_khz;
 }
 
-static inline void _delay(unsigned int delta)
+static inline void _delay(unsigned long long delta)
 {
        unsigned long long timeout = rdtsc() + delta;
        while (rdtsc() < timeout) ;