diff options
author | Paul Jackson <pj@sgi.com> | 2008-06-22 10:22:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:50:29 -0400 |
commit | 05486fa7e631a3be31a0bbc5a575a389a1609e94 (patch) | |
tree | 64ce389b609d0db3c39c7aa2e9249d3b1cb22c09 /arch/x86/kernel/efi.c | |
parent | 157fabf09594ab064b7ae92c81942af4b94663cb (diff) |
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 <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: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/efi.c')
-rw-r--r-- | arch/x86/kernel/efi.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c index 473c89fe5073..a03ca36a302c 100644 --- a/arch/x86/kernel/efi.c +++ b/arch/x86/kernel/efi.c | |||
@@ -242,9 +242,11 @@ void __init efi_reserve_early(void) | |||
242 | { | 242 | { |
243 | unsigned long pmap; | 243 | unsigned long pmap; |
244 | 244 | ||
245 | #ifdef CONFIG_X86_32 | ||
245 | pmap = boot_params.efi_info.efi_memmap; | 246 | pmap = boot_params.efi_info.efi_memmap; |
246 | #ifdef CONFIG_X86_64 | 247 | #else |
247 | pmap += (__u64)boot_params.efi_info.efi_memmap_hi << 32; | 248 | pmap = (boot_params.efi_info.efi_memmap | |
249 | ((__u64)boot_params.efi_info.efi_memmap_hi<<32)); | ||
248 | #endif | 250 | #endif |
249 | memmap.phys_map = (void *)pmap; | 251 | memmap.phys_map = (void *)pmap; |
250 | memmap.nr_map = boot_params.efi_info.efi_memmap_size / | 252 | memmap.nr_map = boot_params.efi_info.efi_memmap_size / |
@@ -284,10 +286,12 @@ void __init efi_init(void) | |||
284 | int i = 0; | 286 | int i = 0; |
285 | void *tmp; | 287 | void *tmp; |
286 | 288 | ||
289 | #ifdef CONFIG_X86_32 | ||
287 | efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab; | 290 | efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab; |
288 | #ifdef CONFIG_X86_64 | 291 | #else |
289 | efi_phys.systab = (void *)efi_phys.systab + | 292 | efi_phys.systab = (efi_system_table_t *) |
290 | ((__u64)boot_params.efi_info.efi_systab_hi<<32); | 293 | (boot_params.efi_info.efi_systab | |
294 | ((__u64)boot_params.efi_info.efi_systab_hi<<32)); | ||
291 | #endif | 295 | #endif |
292 | 296 | ||
293 | efi.systab = early_ioremap((unsigned long)efi_phys.systab, | 297 | efi.systab = early_ioremap((unsigned long)efi_phys.systab, |