use ULL for GB and MB macros
authorJulien Grall <julien.grall@citrix.com>
Fri, 22 May 2015 15:33:39 +0000 (17:33 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 22 May 2015 15:33:39 +0000 (17:33 +0200)
On 32bit, GB(4) doesn't fit on an unsigned long. Modify MB to avoid
further issue.

Also, fix a couple of printf format in x86 which breaks after using
unsigned long long.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
xen/arch/x86/apic.c
xen/arch/x86/io_apic.c
xen/include/xen/config.h

index 499e70f4479cea8934076c214f9fe577b6afe131..2c9ae4ec25a857bd86e2bf346293b101c5332d60 100644 (file)
@@ -992,7 +992,7 @@ void __init init_apic_mappings(void)
         apic_phys = mp_lapic_addr;
 
     set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
-    apic_printk(APIC_VERBOSE, "mapped APIC to %08lx (%08lx)\n", APIC_BASE,
+    apic_printk(APIC_VERBOSE, "mapped APIC to %08Lx (%08lx)\n", APIC_BASE,
                 apic_phys);
 
 __next:
index 6f66562b4f5dc5d90a8e5731628e891c9763caa0..7d4ee5dbcfa030f374d0ea13b4a8e4f5f2738496 100644 (file)
@@ -2546,7 +2546,7 @@ void __init init_ioapic_mappings(void)
             clear_page(__va(ioapic_phys));
         }
         set_fixmap_nocache(idx, ioapic_phys);
-        apic_printk(APIC_VERBOSE, "mapped IOAPIC to %08lx (%08lx)\n",
+        apic_printk(APIC_VERBOSE, "mapped IOAPIC to %08Lx (%08lx)\n",
                     __fix_to_virt(idx), ioapic_phys);
         idx++;
 
index 6478a0aafc166958d701b6ce8bdd2cbde2a5cb6b..f7258c7ff7ce298d878c60a985808844d695635e 100644 (file)
@@ -69,8 +69,8 @@
 #define __force
 #define __bitwise
 
-#define MB(_mb)     (_AC(_mb, UL) << 20)
-#define GB(_gb)     (_AC(_gb, UL) << 30)
+#define MB(_mb)     (_AC(_mb, ULL) << 20)
+#define GB(_gb)     (_AC(_gb, ULL) << 30)
 
 #define __STR(...) #__VA_ARGS__
 #define STR(...) __STR(__VA_ARGS__)