diff options
Diffstat (limited to 'arch/x86/platform/efi/efi_64.c')
-rw-r--r-- | arch/x86/platform/efi/efi_64.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index ac3aa54e2654..95fd505dfeb6 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c | |||
@@ -82,7 +82,7 @@ void __init efi_call_phys_epilog(void) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size, | 84 | void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size, |
85 | u32 type) | 85 | u32 type, u64 attribute) |
86 | { | 86 | { |
87 | unsigned long last_map_pfn; | 87 | unsigned long last_map_pfn; |
88 | 88 | ||
@@ -92,8 +92,11 @@ void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size, | |||
92 | last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size); | 92 | last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size); |
93 | if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) { | 93 | if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) { |
94 | unsigned long top = last_map_pfn << PAGE_SHIFT; | 94 | unsigned long top = last_map_pfn << PAGE_SHIFT; |
95 | efi_ioremap(top, size - (top - phys_addr), type); | 95 | efi_ioremap(top, size - (top - phys_addr), type, attribute); |
96 | } | 96 | } |
97 | 97 | ||
98 | if (!(attribute & EFI_MEMORY_WB)) | ||
99 | efi_memory_uc((u64)(unsigned long)__va(phys_addr), size); | ||
100 | |||
98 | return (void __iomem *)__va(phys_addr); | 101 | return (void __iomem *)__va(phys_addr); |
99 | } | 102 | } |