Merge tag 'locks-v4.9-1' of git://git.samba.org/jlayton/linux
[cascardo/linux.git] / arch / x86 / include / asm / efi.h
index f14655e..389d700 100644 (file)
@@ -191,14 +191,7 @@ static inline efi_status_t efi_thunk_set_virtual_address_map(
 struct efi_config {
        u64 image_handle;
        u64 table;
-       u64 allocate_pool;
-       u64 allocate_pages;
-       u64 get_memory_map;
-       u64 free_pool;
-       u64 free_pages;
-       u64 locate_handle;
-       u64 handle_protocol;
-       u64 exit_boot_services;
+       u64 boot_services;
        u64 text_output;
        efi_status_t (*call)(unsigned long, ...);
        bool is64;
@@ -218,7 +211,11 @@ static inline bool efi_is_64bit(void)
 }
 
 #define efi_call_early(f, ...)                                         \
-       __efi_early()->call(__efi_early()->f, __VA_ARGS__);
+       __efi_early()->call(efi_is_64bit() ?                            \
+               ((efi_boot_services_64_t *)(unsigned long)              \
+                       __efi_early()->boot_services)->f :              \
+               ((efi_boot_services_32_t *)(unsigned long)              \
+                       __efi_early()->boot_services)->f, __VA_ARGS__)
 
 #define __efi_call_early(f, ...)                                       \
        __efi_early()->call((unsigned long)f, __VA_ARGS__);