Merge tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[deliverable/linux.git] / arch / x86 / platform / efi / efi_64.c
index 663c282801f3f0eae5be937d647813b0c8989e95..677e29e294732560e2a1e66edbaa57a94b5d5cd9 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/spinlock.h>
 #include <linux/bootmem.h>
 #include <linux/ioport.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/mc146818rtc.h>
 #include <linux/efi.h>
 #include <linux/uaccess.h>
@@ -140,7 +140,7 @@ int __init efi_alloc_page_tables(void)
        if (efi_enabled(EFI_OLD_MEMMAP))
                return 0;
 
-       gfp_mask = GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO;
+       gfp_mask = GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO;
        efi_pgd = (pgd_t *)__get_free_page(gfp_mask);
        if (!efi_pgd)
                return -ENOMEM;
@@ -286,11 +286,6 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
        return 0;
 }
 
-void __init efi_cleanup_page_tables(unsigned long pa_memmap, unsigned num_pages)
-{
-       kernel_unmap_pages_in_pgd(efi_pgd, pa_memmap, num_pages);
-}
-
 static void __init __map_region(efi_memory_desc_t *md, u64 va)
 {
        unsigned long flags = _PAGE_RW;
@@ -467,22 +462,17 @@ extern efi_status_t efi64_thunk(u32, ...);
 #define efi_thunk(f, ...)                                              \
 ({                                                                     \
        efi_status_t __s;                                               \
-       unsigned long flags;                                            \
-       u32 func;                                                       \
-                                                                       \
-       efi_sync_low_kernel_mappings();                                 \
-       local_irq_save(flags);                                          \
+       unsigned long __flags;                                          \
+       u32 __func;                                                     \
                                                                        \
-       efi_scratch.prev_cr3 = read_cr3();                              \
-       write_cr3((unsigned long)efi_scratch.efi_pgt);                  \
-       __flush_tlb_all();                                              \
+       local_irq_save(__flags);                                        \
+       arch_efi_call_virt_setup();                                     \
                                                                        \
-       func = runtime_service32(f);                                    \
-       __s = efi64_thunk(func, __VA_ARGS__);                   \
+       __func = runtime_service32(f);                                  \
+       __s = efi64_thunk(__func, __VA_ARGS__);                         \
                                                                        \
-       write_cr3(efi_scratch.prev_cr3);                                \
-       __flush_tlb_all();                                              \
-       local_irq_restore(flags);                                       \
+       arch_efi_call_virt_teardown();                                  \
+       local_irq_restore(__flags);                                     \
                                                                        \
        __s;                                                            \
 })
This page took 0.025779 seconds and 5 git commands to generate.