diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 18:51:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 18:51:46 -0400 |
commit | b9394d8a657cd3c064fa432aa0905c1b58b38fe9 (patch) | |
tree | 5a0c98370f313fa11693ab72eea0dc809fd6567d /arch/x86/platform | |
parent | 126de6b20bfb82cc19012d5048f11f339ae5a021 (diff) | |
parent | 7b2dd6d2c4db3912771bfcfd7ac7264011a3c831 (diff) |
Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86/efi changes from Peter Anvin:
"The bulk of these changes are cleaning up the efivars handling and
breaking it up into a tree of files. There are a number of fixes as
well.
The entire changeset is pretty big, but most of it is code movement.
Several of these commits are quite new; the history got very messed up
due to a mismerge with the urgent changes for rc8 which completely
broke IA64, and so Ingo requested that we rebase it to straighten it
out."
* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
efi: remove "kfree(NULL)"
efi: locking fix in efivar_entry_set_safe()
efi, pstore: Read data from variable store before memcpy()
efi, pstore: Remove entry from list when erasing
efi, pstore: Initialise 'entry' before iterating
efi: split efisubsystem from efivars
efivarfs: Move to fs/efivarfs
efivars: Move pstore code into the new EFI directory
efivars: efivar_entry API
efivars: Keep a private global pointer to efivars
efi: move utf16 string functions to efi.h
x86, efi: Make efi_memblock_x86_reserve_range more readable
efivarfs: convert to use simple_open()
Diffstat (limited to 'arch/x86/platform')
-rw-r--r-- | arch/x86/platform/efi/efi.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index b55d174e5034..6b85db0a7ccc 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -453,24 +453,25 @@ static void __init do_add_efi_memmap(void) | |||
453 | 453 | ||
454 | int __init efi_memblock_x86_reserve_range(void) | 454 | int __init efi_memblock_x86_reserve_range(void) |
455 | { | 455 | { |
456 | struct efi_info *e = &boot_params.efi_info; | ||
456 | unsigned long pmap; | 457 | unsigned long pmap; |
457 | 458 | ||
458 | #ifdef CONFIG_X86_32 | 459 | #ifdef CONFIG_X86_32 |
459 | /* Can't handle data above 4GB at this time */ | 460 | /* Can't handle data above 4GB at this time */ |
460 | if (boot_params.efi_info.efi_memmap_hi) { | 461 | if (e->efi_memmap_hi) { |
461 | pr_err("Memory map is above 4GB, disabling EFI.\n"); | 462 | pr_err("Memory map is above 4GB, disabling EFI.\n"); |
462 | return -EINVAL; | 463 | return -EINVAL; |
463 | } | 464 | } |
464 | pmap = boot_params.efi_info.efi_memmap; | 465 | pmap = e->efi_memmap; |
465 | #else | 466 | #else |
466 | pmap = (boot_params.efi_info.efi_memmap | | 467 | pmap = (e->efi_memmap | ((__u64)e->efi_memmap_hi << 32)); |
467 | ((__u64)boot_params.efi_info.efi_memmap_hi<<32)); | ||
468 | #endif | 468 | #endif |
469 | memmap.phys_map = (void *)pmap; | 469 | memmap.phys_map = (void *)pmap; |
470 | memmap.nr_map = boot_params.efi_info.efi_memmap_size / | 470 | memmap.nr_map = e->efi_memmap_size / |
471 | boot_params.efi_info.efi_memdesc_size; | 471 | e->efi_memdesc_size; |
472 | memmap.desc_version = boot_params.efi_info.efi_memdesc_version; | 472 | memmap.desc_size = e->efi_memdesc_size; |
473 | memmap.desc_size = boot_params.efi_info.efi_memdesc_size; | 473 | memmap.desc_version = e->efi_memdesc_version; |
474 | |||
474 | memblock_reserve(pmap, memmap.nr_map * memmap.desc_size); | 475 | memblock_reserve(pmap, memmap.nr_map * memmap.desc_size); |
475 | 476 | ||
476 | return 0; | 477 | return 0; |