diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-12-21 11:09:46 -0500 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-12-29 08:09:08 -0500 |
commit | 518548abd61808ea1e31614ccbdae34d3c32dfa4 (patch) | |
tree | 194de8fb84969924942299ed5ea5cfe20256f05e /arch/x86/platform | |
parent | 77ea8c948953a90401e436e7c05973b2d5529804 (diff) |
x86/efi: Delete superfluous global variables
There's no need to save the runtime map details in global variables, the
values are only required to pass to efi_runtime_map_setup().
And because 'nr_efi_runtime_map' isn't needed, get_nr_runtime_map() can
be deleted along with 'efi_data_len'.
Cc: Dave Young <dyoung@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/platform')
-rw-r--r-- | arch/x86/platform/efi/efi.c | 18 | ||||
-rw-r--r-- | arch/x86/platform/efi/efi_64.c | 1 |
2 files changed, 1 insertions, 18 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 9965ff403c6e..7ed3ecfde98a 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -76,10 +76,7 @@ static __initdata efi_config_table_type_t arch_tables[] = { | |||
76 | {NULL_GUID, NULL, NULL}, | 76 | {NULL_GUID, NULL, NULL}, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static void *efi_runtime_map; | ||
80 | static int nr_efi_runtime_map; | ||
81 | u64 efi_setup; /* efi setup_data physical address */ | 79 | u64 efi_setup; /* efi setup_data physical address */ |
82 | u32 efi_data_len; /* efi setup_data payload length */ | ||
83 | 80 | ||
84 | /* | 81 | /* |
85 | * Returns 1 if 'facility' is enabled, 0 otherwise. | 82 | * Returns 1 if 'facility' is enabled, 0 otherwise. |
@@ -702,15 +699,6 @@ out: | |||
702 | return ret; | 699 | return ret; |
703 | } | 700 | } |
704 | 701 | ||
705 | static void get_nr_runtime_map(void) | ||
706 | { | ||
707 | if (!efi_setup) | ||
708 | return; | ||
709 | |||
710 | nr_efi_runtime_map = (efi_data_len - sizeof(struct efi_setup_data)) / | ||
711 | sizeof(efi_memory_desc_t); | ||
712 | } | ||
713 | |||
714 | void __init efi_init(void) | 702 | void __init efi_init(void) |
715 | { | 703 | { |
716 | efi_char16_t *c16; | 704 | efi_char16_t *c16; |
@@ -718,7 +706,6 @@ void __init efi_init(void) | |||
718 | int i = 0; | 706 | int i = 0; |
719 | void *tmp; | 707 | void *tmp; |
720 | 708 | ||
721 | get_nr_runtime_map(); | ||
722 | #ifdef CONFIG_X86_32 | 709 | #ifdef CONFIG_X86_32 |
723 | if (boot_params.efi_info.efi_systab_hi || | 710 | if (boot_params.efi_info.efi_systab_hi || |
724 | boot_params.efi_info.efi_memmap_hi) { | 711 | boot_params.efi_info.efi_memmap_hi) { |
@@ -933,10 +920,7 @@ static int __init save_runtime_map(void) | |||
933 | count++; | 920 | count++; |
934 | } | 921 | } |
935 | 922 | ||
936 | efi_runtime_map = q; | 923 | efi_runtime_map_setup(q, count, memmap.desc_size); |
937 | nr_efi_runtime_map = count; | ||
938 | efi_runtime_map_setup(efi_runtime_map, nr_efi_runtime_map, | ||
939 | boot_params.efi_info.efi_memdesc_size); | ||
940 | 924 | ||
941 | return 0; | 925 | return 0; |
942 | out: | 926 | out: |
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index 324b65103851..6284f158a47d 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c | |||
@@ -232,5 +232,4 @@ void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size, | |||
232 | void __init parse_efi_setup(u64 phys_addr, u32 data_len) | 232 | void __init parse_efi_setup(u64 phys_addr, u32 data_len) |
233 | { | 233 | { |
234 | efi_setup = phys_addr + sizeof(struct setup_data); | 234 | efi_setup = phys_addr + sizeof(struct setup_data); |
235 | efi_data_len = data_len - sizeof(struct setup_data); | ||
236 | } | 235 | } |