summaryrefslogtreecommitdiff
path: root/include/linux/efi.h
diff options
context:
space:
mode:
authorMatt Fleming <matt@codeblueprint.co.uk>2016-04-25 23:06:39 +0300
committerIngo Molnar <mingo@kernel.org>2016-04-28 12:33:51 +0300
commit884f4f66ffd6ffe632f3a8be4e6d10a858afdc37 (patch)
tree946746ddda7121afca841535be6ce8d2ba7d6032 /include/linux/efi.h
parent78ce248faa3c46e24e9bd42db3ab3650659f16dd (diff)
downloadlinux-884f4f66ffd6ffe632f3a8be4e6d10a858afdc37.tar.xz
efi: Remove global 'memmap' EFI memory map
Abolish the poorly named EFI memory map, 'memmap'. It is shadowed by a bunch of local definitions in various files and having two ways to access the EFI memory map ('efi.memmap' vs. 'memmap') is rather confusing. Furthermore, IA64 doesn't even provide this global object, which has caused issues when trying to write generic EFI memmap code. Replace all occurrences with efi.memmap, and convert the remaining iterator code to use for_each_efi_mem_desc(). Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Luck, Tony <tony.luck@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1461614832-17633-8-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r--include/linux/efi.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 17ef4471e603..c2c0da49876e 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -883,7 +883,7 @@ extern struct efi {
efi_get_next_high_mono_count_t *get_next_high_mono_count;
efi_reset_system_t *reset_system;
efi_set_virtual_address_map_t *set_virtual_address_map;
- struct efi_memory_map *memmap;
+ struct efi_memory_map memmap;
unsigned long flags;
} efi;
@@ -945,7 +945,6 @@ extern void efi_initialize_iomem_resources(struct resource *code_resource,
extern void efi_get_time(struct timespec *now);
extern void efi_reserve_boot_services(void);
extern int efi_get_fdt_params(struct efi_fdt_params *params);
-extern struct efi_memory_map memmap;
extern struct kobject *efi_kobj;
extern int efi_reboot_quirk_mode;
@@ -970,7 +969,7 @@ static inline void efi_fake_memmap(void) { }
* Once the loop finishes @md must not be accessed.
*/
#define for_each_efi_memory_desc(md) \
- for_each_efi_memory_desc_in_map(efi.memmap, md)
+ for_each_efi_memory_desc_in_map(&efi.memmap, md)
/*
* Format an EFI memory descriptor's type and attributes to a user-provided