summaryrefslogtreecommitdiff
path: root/arch/x86/platform/efi/efi_32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-03-03 09:34:33 +0300
committerMatt Fleming <matt.fleming@intel.com>2015-04-01 14:46:22 +0300
commit23a0d4e8fa6d3a1d7fb819f79bcc0a3739c30ba9 (patch)
treea39fccdee6dc1a89756331aac0c4db066060e96c /arch/x86/platform/efi/efi_32.c
parentfed6cefe3b6e862dcc74d07324478caa07e84eaf (diff)
downloadlinux-23a0d4e8fa6d3a1d7fb819f79bcc0a3739c30ba9.tar.xz
efi: Disable interrupts around EFI calls, not in the epilog/prolog calls
Tapasweni Pathak reported that we do a kmalloc() in efi_call_phys_prolog() on x86-64 while having interrupts disabled, which is a big no-no, as kmalloc() can sleep. Solve this by removing the irq disabling from the prolog/epilog calls around EFI calls: it's unnecessary, as in this stage we are single threaded in the boot thread, and we don't ever execute this from interrupt contexts. Reported-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/platform/efi/efi_32.c')
-rw-r--r--arch/x86/platform/efi/efi_32.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
index 40e7cda52936..abecc6e1dc90 100644
--- a/arch/x86/platform/efi/efi_32.c
+++ b/arch/x86/platform/efi/efi_32.c
@@ -33,11 +33,10 @@
/*
* To make EFI call EFI runtime service in physical addressing mode we need
- * prolog/epilog before/after the invocation to disable interrupt, to
- * claim EFI runtime service handler exclusively and to duplicate a memory in
- * low memory space say 0 - 3G.
+ * prolog/epilog before/after the invocation to claim the EFI runtime service
+ * handler exclusively and to duplicate a memory mapping in low memory space,
+ * say 0 - 3G.
*/
-static unsigned long efi_rt_eflags;
void efi_sync_low_kernel_mappings(void) {}
void __init efi_dump_pagetable(void) {}
@@ -61,8 +60,6 @@ void __init efi_call_phys_prolog(void)
{
struct desc_ptr gdt_descr;
- local_irq_save(efi_rt_eflags);
-
load_cr3(initial_page_table);
__flush_tlb_all();
@@ -81,8 +78,6 @@ void __init efi_call_phys_epilog(void)
load_cr3(swapper_pg_dir);
__flush_tlb_all();
-
- local_irq_restore(efi_rt_eflags);
}
void __init efi_runtime_mkexec(void)