#endif /* CONFIG_X86_32 */
-#define efi_in_nmi() in_nmi()
-
extern struct efi_scratch efi_scratch;
extern void __init efi_set_executable(efi_memory_desc_t *md, bool executable);
extern int __init efi_memblock_x86_reserve_range(void);
* for QueryVariableInfo() and SetVariable(), as these can be reached in NMI
* context through efi_pstore_write().
*/
-#ifndef efi_in_nmi
-#define efi_in_nmi() (0)
-#endif
/*
* As per commit ef68c8f87ed1 ("x86: Serialize EFI time accesses on rtc_lock"),
{
unsigned long flags;
efi_status_t status;
- bool __in_nmi = efi_in_nmi();
- if (!__in_nmi)
- spin_lock_irqsave(&efi_runtime_lock, flags);
+ spin_lock_irqsave(&efi_runtime_lock, flags);
status = efi_call_virt(set_variable, name, vendor, attr, data_size,
data);
- if (!__in_nmi)
- spin_unlock_irqrestore(&efi_runtime_lock, flags);
+ spin_unlock_irqrestore(&efi_runtime_lock, flags);
return status;
}
{
unsigned long flags;
efi_status_t status;
- bool __in_nmi = efi_in_nmi();
if (efi.runtime_version < EFI_2_00_SYSTEM_TABLE_REVISION)
return EFI_UNSUPPORTED;
- if (!__in_nmi)
- spin_lock_irqsave(&efi_runtime_lock, flags);
+ spin_lock_irqsave(&efi_runtime_lock, flags);
status = efi_call_virt(query_variable_info, attr, storage_space,
remaining_space, max_variable_size);
- if (!__in_nmi)
- spin_unlock_irqrestore(&efi_runtime_lock, flags);
+ spin_unlock_irqrestore(&efi_runtime_lock, flags);
return status;
}