aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/kernel/efi.c4
-rw-r--r--arch/x86/platform/efi/efi.c4
-rw-r--r--drivers/firmware/efi/efi.c8
-rw-r--r--include/linux/efi.h2
4 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index 4b7df346e388..61eb1d17586a 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -208,7 +208,7 @@ void __init efi_init(void)
208 208
209 memblock_reserve(params.mmap & PAGE_MASK, 209 memblock_reserve(params.mmap & PAGE_MASK,
210 PAGE_ALIGN(params.mmap_size + (params.mmap & ~PAGE_MASK))); 210 PAGE_ALIGN(params.mmap_size + (params.mmap & ~PAGE_MASK)));
211 memmap.phys_map = (void *)params.mmap; 211 memmap.phys_map = params.mmap;
212 memmap.map = early_memremap(params.mmap, params.mmap_size); 212 memmap.map = early_memremap(params.mmap, params.mmap_size);
213 memmap.map_end = memmap.map + params.mmap_size; 213 memmap.map_end = memmap.map + params.mmap_size;
214 memmap.desc_size = params.desc_size; 214 memmap.desc_size = params.desc_size;
@@ -282,7 +282,7 @@ static int __init arm64_enable_runtime_services(void)
282 pr_info("Remapping and enabling EFI services.\n"); 282 pr_info("Remapping and enabling EFI services.\n");
283 283
284 mapsize = memmap.map_end - memmap.map; 284 mapsize = memmap.map_end - memmap.map;
285 memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map, 285 memmap.map = (__force void *)ioremap_cache(memmap.phys_map,
286 mapsize); 286 mapsize);
287 if (!memmap.map) { 287 if (!memmap.map) {
288 pr_err("Failed to remap EFI memory map\n"); 288 pr_err("Failed to remap EFI memory map\n");
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 3e1d09e885c0..ad285404ea7f 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -194,7 +194,7 @@ static void __init do_add_efi_memmap(void)
194int __init efi_memblock_x86_reserve_range(void) 194int __init efi_memblock_x86_reserve_range(void)
195{ 195{
196 struct efi_info *e = &boot_params.efi_info; 196 struct efi_info *e = &boot_params.efi_info;
197 unsigned long pmap; 197 phys_addr_t pmap;
198 198
199 if (efi_enabled(EFI_PARAVIRT)) 199 if (efi_enabled(EFI_PARAVIRT))
200 return 0; 200 return 0;
@@ -209,7 +209,7 @@ int __init efi_memblock_x86_reserve_range(void)
209#else 209#else
210 pmap = (e->efi_memmap | ((__u64)e->efi_memmap_hi << 32)); 210 pmap = (e->efi_memmap | ((__u64)e->efi_memmap_hi << 32));
211#endif 211#endif
212 memmap.phys_map = (void *)pmap; 212 memmap.phys_map = pmap;
213 memmap.nr_map = e->efi_memmap_size / 213 memmap.nr_map = e->efi_memmap_size /
214 e->efi_memdesc_size; 214 e->efi_memdesc_size;
215 memmap.desc_size = e->efi_memdesc_size; 215 memmap.desc_size = e->efi_memdesc_size;
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 31fc864eb037..027ca212179f 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -254,7 +254,7 @@ subsys_initcall(efisubsys_init);
254int __init efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md) 254int __init efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md)
255{ 255{
256 struct efi_memory_map *map = efi.memmap; 256 struct efi_memory_map *map = efi.memmap;
257 void *p, *e; 257 phys_addr_t p, e;
258 258
259 if (!efi_enabled(EFI_MEMMAP)) { 259 if (!efi_enabled(EFI_MEMMAP)) {
260 pr_err_once("EFI_MEMMAP is not enabled.\n"); 260 pr_err_once("EFI_MEMMAP is not enabled.\n");
@@ -286,10 +286,10 @@ int __init efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md)
286 * So just always get our own virtual map on the CPU. 286 * So just always get our own virtual map on the CPU.
287 * 287 *
288 */ 288 */
289 md = early_memremap((phys_addr_t)p, sizeof (*md)); 289 md = early_memremap(p, sizeof (*md));
290 if (!md) { 290 if (!md) {
291 pr_err_once("early_memremap(%p, %zu) failed.\n", 291 pr_err_once("early_memremap(%pa, %zu) failed.\n",
292 p, sizeof (*md)); 292 &p, sizeof (*md));
293 return -ENOMEM; 293 return -ENOMEM;
294 } 294 }
295 295
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 4d01c1033fce..569b5a866bb1 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -680,7 +680,7 @@ typedef struct {
680} efi_system_table_t; 680} efi_system_table_t;
681 681
682struct efi_memory_map { 682struct efi_memory_map {
683 void *phys_map; 683 phys_addr_t phys_map;
684 void *map; 684 void *map;
685 void *map_end; 685 void *map_end;
686 int nr_map; 686 int nr_map;