From: Paul Jackson Date: Sun, 22 Jun 2008 14:22:02 +0000 (-0700) Subject: x86 boot: x86_64 efi compiler warning fix X-Git-Tag: v2.6.27-rc1~1106^2~195 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=05486fa7e631a3be31a0bbc5a575a389a1609e94;p=linux-2.6-omap-h63xx.git x86 boot: x86_64 efi compiler warning fix Fix a compiler warning. Rather than always casting a u32 to a pointer (which generates a warning on x86_64 systems) instead separate the x86_32 and x86_64 assignments entirely with ifdefs. Until other recent changes to this code, it used to have x86_64 separated like this. Signed-off-by: Paul Jackson Cc: "Yinghai Lu" Cc: "Jack Steiner" Cc: "Mike Travis" Cc: "Huang Cc: Ying" Cc: "Andi Kleen" Cc: "Andrew Morton" Cc: Paul Jackson Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c index 473c89fe507..a03ca36a302 100644 --- a/arch/x86/kernel/efi.c +++ b/arch/x86/kernel/efi.c @@ -242,9 +242,11 @@ void __init efi_reserve_early(void) { unsigned long pmap; +#ifdef CONFIG_X86_32 pmap = boot_params.efi_info.efi_memmap; -#ifdef CONFIG_X86_64 - pmap += (__u64)boot_params.efi_info.efi_memmap_hi << 32; +#else + pmap = (boot_params.efi_info.efi_memmap | + ((__u64)boot_params.efi_info.efi_memmap_hi<<32)); #endif memmap.phys_map = (void *)pmap; memmap.nr_map = boot_params.efi_info.efi_memmap_size / @@ -284,10 +286,12 @@ void __init efi_init(void) int i = 0; void *tmp; +#ifdef CONFIG_X86_32 efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab; -#ifdef CONFIG_X86_64 - efi_phys.systab = (void *)efi_phys.systab + - ((__u64)boot_params.efi_info.efi_systab_hi<<32); +#else + efi_phys.systab = (efi_system_table_t *) + (boot_params.efi_info.efi_systab | + ((__u64)boot_params.efi_info.efi_systab_hi<<32)); #endif efi.systab = early_ioremap((unsigned long)efi_phys.systab,