From 8b2cb7a8f531d6ca72a8aff873b9bb1c6b3122ba Mon Sep 17 00:00:00 2001 From: "Huang, Ying" Date: Wed, 30 Jan 2008 13:32:11 +0100 Subject: x86: 32-bit EFI runtime service support: fixes in sync with 64-bit support support according to fixes of x86_64 support. - Delete efi_rt_lock because it is used during system early boot, before SMP is initialized. - Change local_flush_tlb() to __flush_tlb_all() to flush global page mapping. - Clean up includes. - Revise Kconfig description. - Enable noefi kernel parameter on i386. Signed-off-by: Huang Ying Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- arch/x86/kernel/efi_32.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'arch/x86/kernel/efi_32.c') diff --git a/arch/x86/kernel/efi_32.c b/arch/x86/kernel/efi_32.c index 30f937116288..afd2c3b039d6 100644 --- a/arch/x86/kernel/efi_32.c +++ b/arch/x86/kernel/efi_32.c @@ -20,27 +20,15 @@ */ #include -#include -#include #include -#include -#include -#include #include -#include #include -#include -#include #include #include #include -#include -#include #include -#define PFX "EFI: " - /* * To make EFI call EFI runtime service in physical addressing mode we need * prelog/epilog before/after the invocation to disable interrupt, to @@ -49,16 +37,14 @@ */ static unsigned long efi_rt_eflags; -static DEFINE_SPINLOCK(efi_rt_lock); static pgd_t efi_bak_pg_dir_pointer[2]; -void efi_call_phys_prelog(void) __acquires(efi_rt_lock) +void efi_call_phys_prelog(void) { unsigned long cr4; unsigned long temp; struct desc_ptr gdt_descr; - spin_lock(&efi_rt_lock); local_irq_save(efi_rt_eflags); /* @@ -88,14 +74,14 @@ void efi_call_phys_prelog(void) __acquires(efi_rt_lock) /* * After the lock is released, the original page table is restored. */ - local_flush_tlb(); + __flush_tlb_all(); gdt_descr.address = __pa(get_cpu_gdt_table(0)); gdt_descr.size = GDT_SIZE - 1; load_gdt(&gdt_descr); } -void efi_call_phys_epilog(void) __releases(efi_rt_lock) +void efi_call_phys_epilog(void) { unsigned long cr4; struct desc_ptr gdt_descr; @@ -119,10 +105,9 @@ void efi_call_phys_epilog(void) __releases(efi_rt_lock) /* * After the lock is released, the original page table is restored. */ - local_flush_tlb(); + __flush_tlb_all(); local_irq_restore(efi_rt_eflags); - spin_unlock(&efi_rt_lock); } /* @@ -135,7 +120,7 @@ void __init efi_map_memmap(void) memmap.map = bt_ioremap((unsigned long) memmap.phys_map, (memmap.nr_map * memmap.desc_size)); if (memmap.map == NULL) - printk(KERN_ERR PFX "Could not remap the EFI memmap!\n"); + printk(KERN_ERR "Could not remap the EFI memmap!\n"); memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size); } -- cgit v1.2.2