arm/efi: Enable runtime call flag checking
[cascardo/linux.git] / arch / arm / include / asm / efi.h
index e0eea72..a708fa1 100644 (file)
 #include <asm/mach/map.h>
 #include <asm/mmu_context.h>
 #include <asm/pgtable.h>
+#include <asm/ptrace.h>
 
 #ifdef CONFIG_EFI
 void efi_init(void);
 
 int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md);
+int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);
 
-#define efi_call_virt(f, ...)                                          \
-({                                                                     \
-       efi_##f##_t *__f;                                               \
-       efi_status_t __s;                                               \
-                                                                       \
-       efi_virtmap_load();                                             \
-       __f = efi.systab->runtime->f;                                   \
-       __s = __f(__VA_ARGS__);                                         \
-       efi_virtmap_unload();                                           \
-       __s;                                                            \
-})
+#define arch_efi_call_virt_setup()     efi_virtmap_load()
+#define arch_efi_call_virt_teardown()  efi_virtmap_unload()
 
-#define __efi_call_virt(f, ...)                                                \
+#define arch_efi_call_virt(f, args...)                                 \
 ({                                                                     \
        efi_##f##_t *__f;                                               \
-                                                                       \
-       efi_virtmap_load();                                             \
        __f = efi.systab->runtime->f;                                   \
-       __f(__VA_ARGS__);                                               \
-       efi_virtmap_unload();                                           \
+       __f(args);                                                      \
 })
 
+#define ARCH_EFI_IRQ_FLAGS_MASK \
+       (PSR_J_BIT | PSR_E_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT | \
+        PSR_T_BIT | MODE_MASK)
+
 static inline void efi_set_pgd(struct mm_struct *mm)
 {
        check_and_switch_context(mm, NULL);
@@ -59,7 +53,16 @@ void efi_virtmap_unload(void);
 
 /* arch specific definitions used by the stub code */
 
-#define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__)
+#define efi_call_early(f, ...)         sys_table_arg->boottime->f(__VA_ARGS__)
+#define __efi_call_early(f, ...)       f(__VA_ARGS__)
+#define efi_is_64bit()                 (false)
+
+struct screen_info *alloc_screen_info(efi_system_table_t *sys_table_arg);
+void free_screen_info(efi_system_table_t *sys_table, struct screen_info *si);
+
+static inline void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
+{
+}
 
 /*
  * A reasonable upper bound for the uncompressed kernel size is 32 MBytes,