These are missing in some functions. Add them to keep things consistent.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
 #include <libfdt_env.h>
 #include <memalign.h>
 #include <asm/global_data.h>
+#include <asm-generic/sections.h>
+#include <linux/linkage.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
        }
 };
 
-static efi_status_t bootefi_open_dp(void *handle, efi_guid_t *protocol,
+static efi_status_t EFIAPI bootefi_open_dp(void *handle, efi_guid_t *protocol,
                        void **protocol_interface, void *agent_handle,
                        void *controller_handle, uint32_t attributes)
 {
  */
 static unsigned long do_bootefi_exec(void *efi, void *fdt)
 {
-       ulong (*entry)(void *image_handle, struct efi_system_table *st);
+       ulong (*entry)(void *image_handle, struct efi_system_table *st)
+               asmlinkage;
        ulong fdt_pages, fdt_size, fdt_start, fdt_end;
        bootm_headers_t img = { 0 };
 
 
  * Stub implementation for a protocol opener that just returns the handle as
  * interface
  */
-efi_status_t efi_return_handle(void *handle,
+efi_status_t EFIAPI efi_return_handle(void *handle,
                efi_guid_t *protocol, void **protocol_interface,
                void *agent_handle, void *controller_handle,
                uint32_t attributes);
 
        u32 trigger_time;
        u64 trigger_next;
        unsigned long notify_tpl;
-       void (*notify_function) (void *event, void *context);
+       void (EFIAPI *notify_function) (void *event, void *context);
        void *notify_context;
 } efi_event = {
        /* Disable timers on bootup */
 
 static efi_status_t EFIAPI efi_create_event(
                        enum efi_event_type type, ulong notify_tpl,
-                       void (*notify_function) (void *event, void *context),
+                       void (EFIAPI *notify_function) (void *event,
+                                                       void *context),
                        void *notify_context, void **event)
 {
        EFI_ENTRY("%d, 0x%lx, %p, %p", type, notify_tpl, notify_function,
 
        const struct blk_desc *desc;
 };
 
-static efi_status_t efi_disk_open_block(void *handle, efi_guid_t *protocol,
-                       void **protocol_interface, void *agent_handle,
-                       void *controller_handle, uint32_t attributes)
+static efi_status_t EFIAPI efi_disk_open_block(void *handle,
+                       efi_guid_t *protocol, void **protocol_interface,
+                       void *agent_handle, void *controller_handle,
+                       uint32_t attributes)
 {
        struct efi_disk_obj *diskobj = handle;
 
        return EFI_SUCCESS;
 }
 
-static efi_status_t efi_disk_open_dp(void *handle, efi_guid_t *protocol,
+static efi_status_t EFIAPI efi_disk_open_dp(void *handle, efi_guid_t *protocol,
                        void **protocol_interface, void *agent_handle,
                        void *controller_handle, uint32_t attributes)
 {
        return EFI_EXIT(EFI_SUCCESS);
 }
 
-static efi_status_t efi_disk_read_blocks(struct efi_block_io *this,
+static efi_status_t EFIAPI efi_disk_read_blocks(struct efi_block_io *this,
                        u32 media_id, u64 lba, unsigned long buffer_size,
                        void *buffer)
 {
        return EFI_EXIT(r);
 }
 
-static efi_status_t efi_disk_write_blocks(struct efi_block_io *this,
+static efi_status_t EFIAPI efi_disk_write_blocks(struct efi_block_io *this,
                        u32 media_id, u64 lba, unsigned long buffer_size,
                        void *buffer)
 {
 
        return EFI_EXIT(EFI_SUCCESS);
 }
 
-static efi_status_t efi_net_open_dp(void *handle, efi_guid_t *protocol,
+static efi_status_t EFIAPI efi_net_open_dp(void *handle, efi_guid_t *protocol,
                        void **protocol_interface, void *agent_handle,
                        void *controller_handle, uint32_t attributes)
 {
        return EFI_SUCCESS;
 }
 
-static efi_status_t efi_net_open_pxe(void *handle, efi_guid_t *protocol,
+static efi_status_t EFIAPI efi_net_open_pxe(void *handle, efi_guid_t *protocol,
                        void **protocol_interface, void *agent_handle,
                        void *controller_handle, uint32_t attributes)
 {