Skip to contentSkip to conversation

use 64-bit arithmetic in reserve_in_boot_e820()

PATCH New Jan Beulich 1 participant 1 message Jun 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use 64-bit arithmetic in reserve_in_boot_e820()

xen/arch/x86/setup.c +3 -3
Index: 2007-06-18/xen/arch/x86/setup.c
===================================================================
@@ -295,14 +295,14 @@ static struct e820map __initdata boot_e8
 /* Reserve area (@s,@e) in the temporary bootstrap e820 map. */
 static void __init reserve_in_boot_e820(unsigned long s, unsigned long e)
 {
-    unsigned long rs, re;
     int i;
 
     for ( i = 0; i < boot_e820.nr_map; i++ )
     {
         /* Have we found the e820 region that includes the specified range? */
-        rs = boot_e820.map[i].addr;
-        re = boot_e820.map[i].addr + boot_e820.map[i].size;
+        uint64_t rs = boot_e820.map[i].addr;
+        uint64_t re = rs + boot_e820.map[i].size;
+
         if ( (s < rs) || (e > re) )
             continue;