Commit 05486fa7 authored by Paul Jackson's avatar Paul Jackson Committed by Ingo Molnar

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: default avatarPaul Jackson <pj@sgi.com>
Cc: "Yinghai Lu" <yhlu.kernel@gmail.com>
Cc: "Jack Steiner" <steiner@sgi.com>
Cc: "Mike Travis" <travis@sgi.com>
Cc: "Huang
Cc: Ying" <ying.huang@intel.com>
Cc: "Andi Kleen" <andi@firstfloor.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 157fabf0
...@@ -242,9 +242,11 @@ void __init efi_reserve_early(void) ...@@ -242,9 +242,11 @@ void __init efi_reserve_early(void)
{ {
unsigned long pmap; unsigned long pmap;
#ifdef CONFIG_X86_32
pmap = boot_params.efi_info.efi_memmap; pmap = boot_params.efi_info.efi_memmap;
#ifdef CONFIG_X86_64 #else
pmap += (__u64)boot_params.efi_info.efi_memmap_hi << 32; pmap = (boot_params.efi_info.efi_memmap |
((__u64)boot_params.efi_info.efi_memmap_hi<<32));
#endif #endif
memmap.phys_map = (void *)pmap; memmap.phys_map = (void *)pmap;
memmap.nr_map = boot_params.efi_info.efi_memmap_size / memmap.nr_map = boot_params.efi_info.efi_memmap_size /
...@@ -284,10 +286,12 @@ void __init efi_init(void) ...@@ -284,10 +286,12 @@ void __init efi_init(void)
int i = 0; int i = 0;
void *tmp; void *tmp;
#ifdef CONFIG_X86_32
efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab; efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab;
#ifdef CONFIG_X86_64 #else
efi_phys.systab = (void *)efi_phys.systab + efi_phys.systab = (efi_system_table_t *)
((__u64)boot_params.efi_info.efi_systab_hi<<32); (boot_params.efi_info.efi_systab |
((__u64)boot_params.efi_info.efi_systab_hi<<32));
#endif #endif
efi.systab = early_ioremap((unsigned long)efi_phys.systab, efi.systab = early_ioremap((unsigned long)efi_phys.systab,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment