use ULL for GB and MB macros

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>
This commit is contained in:
Julien Grall authored and Jan Beulich committed 2015-05-22 17:33:39 +02:00
1 parent abcf15fa8f
commit e37ac1386f
3 files changed
+4 -4

No files matched your search

+1 -1
View 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:
+1 -1
View 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++;
+2 -2
View 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__)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.