diff options
author | Huang, Ying <ying.huang@intel.com> | 2008-01-30 07:32:11 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:32:11 -0500 |
commit | 8b2cb7a8f531d6ca72a8aff873b9bb1c6b3122ba (patch) | |
tree | f53edab6bdc4e1f39ef2cea8d13f15242617262e /arch/x86/kernel/efi_32.c | |
parent | bfd074e05bdb69652d24ebc60b126899174ca788 (diff) |
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 <ying.huang@intel.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/efi_32.c')
-rw-r--r-- | arch/x86/kernel/efi_32.c | 25 |
1 files changed, 5 insertions, 20 deletions
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 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/init.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/types.h> | 23 | #include <linux/types.h> |
26 | #include <linux/time.h> | ||
27 | #include <linux/spinlock.h> | ||
28 | #include <linux/bootmem.h> | ||
29 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
30 | #include <linux/module.h> | ||
31 | #include <linux/efi.h> | 25 | #include <linux/efi.h> |
32 | #include <linux/kexec.h> | ||
33 | 26 | ||
34 | #include <asm/setup.h> | ||
35 | #include <asm/io.h> | 27 | #include <asm/io.h> |
36 | #include <asm/page.h> | 28 | #include <asm/page.h> |
37 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable.h> |
38 | #include <asm/processor.h> | ||
39 | #include <asm/desc.h> | ||
40 | #include <asm/tlbflush.h> | 30 | #include <asm/tlbflush.h> |
41 | 31 | ||
42 | #define PFX "EFI: " | ||
43 | |||
44 | /* | 32 | /* |
45 | * To make EFI call EFI runtime service in physical addressing mode we need | 33 | * To make EFI call EFI runtime service in physical addressing mode we need |
46 | * prelog/epilog before/after the invocation to disable interrupt, to | 34 | * prelog/epilog before/after the invocation to disable interrupt, to |
@@ -49,16 +37,14 @@ | |||
49 | */ | 37 | */ |
50 | 38 | ||
51 | static unsigned long efi_rt_eflags; | 39 | static unsigned long efi_rt_eflags; |
52 | static DEFINE_SPINLOCK(efi_rt_lock); | ||
53 | static pgd_t efi_bak_pg_dir_pointer[2]; | 40 | static pgd_t efi_bak_pg_dir_pointer[2]; |
54 | 41 | ||
55 | void efi_call_phys_prelog(void) __acquires(efi_rt_lock) | 42 | void efi_call_phys_prelog(void) |
56 | { | 43 | { |
57 | unsigned long cr4; | 44 | unsigned long cr4; |
58 | unsigned long temp; | 45 | unsigned long temp; |
59 | struct desc_ptr gdt_descr; | 46 | struct desc_ptr gdt_descr; |
60 | 47 | ||
61 | spin_lock(&efi_rt_lock); | ||
62 | local_irq_save(efi_rt_eflags); | 48 | local_irq_save(efi_rt_eflags); |
63 | 49 | ||
64 | /* | 50 | /* |
@@ -88,14 +74,14 @@ void efi_call_phys_prelog(void) __acquires(efi_rt_lock) | |||
88 | /* | 74 | /* |
89 | * After the lock is released, the original page table is restored. | 75 | * After the lock is released, the original page table is restored. |
90 | */ | 76 | */ |
91 | local_flush_tlb(); | 77 | __flush_tlb_all(); |
92 | 78 | ||
93 | gdt_descr.address = __pa(get_cpu_gdt_table(0)); | 79 | gdt_descr.address = __pa(get_cpu_gdt_table(0)); |
94 | gdt_descr.size = GDT_SIZE - 1; | 80 | gdt_descr.size = GDT_SIZE - 1; |
95 | load_gdt(&gdt_descr); | 81 | load_gdt(&gdt_descr); |
96 | } | 82 | } |
97 | 83 | ||
98 | void efi_call_phys_epilog(void) __releases(efi_rt_lock) | 84 | void efi_call_phys_epilog(void) |
99 | { | 85 | { |
100 | unsigned long cr4; | 86 | unsigned long cr4; |
101 | struct desc_ptr gdt_descr; | 87 | struct desc_ptr gdt_descr; |
@@ -119,10 +105,9 @@ void efi_call_phys_epilog(void) __releases(efi_rt_lock) | |||
119 | /* | 105 | /* |
120 | * After the lock is released, the original page table is restored. | 106 | * After the lock is released, the original page table is restored. |
121 | */ | 107 | */ |
122 | local_flush_tlb(); | 108 | __flush_tlb_all(); |
123 | 109 | ||
124 | local_irq_restore(efi_rt_eflags); | 110 | local_irq_restore(efi_rt_eflags); |
125 | spin_unlock(&efi_rt_lock); | ||
126 | } | 111 | } |
127 | 112 | ||
128 | /* | 113 | /* |
@@ -135,7 +120,7 @@ void __init efi_map_memmap(void) | |||
135 | memmap.map = bt_ioremap((unsigned long) memmap.phys_map, | 120 | memmap.map = bt_ioremap((unsigned long) memmap.phys_map, |
136 | (memmap.nr_map * memmap.desc_size)); | 121 | (memmap.nr_map * memmap.desc_size)); |
137 | if (memmap.map == NULL) | 122 | if (memmap.map == NULL) |
138 | printk(KERN_ERR PFX "Could not remap the EFI memmap!\n"); | 123 | printk(KERN_ERR "Could not remap the EFI memmap!\n"); |
139 | 124 | ||
140 | memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size); | 125 | memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size); |
141 | } | 126 | } |