aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/intel.c17
-rw-r--r--arch/x86/kernel/traps_32.c14
2 files changed, 15 insertions, 16 deletions
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index dc4e08147b1f..cc8c501b9f39 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -8,6 +8,7 @@
8#include <linux/module.h> 8#include <linux/module.h>
9 9
10#include <asm/processor.h> 10#include <asm/processor.h>
11#include <asm/pgtable.h>
11#include <asm/msr.h> 12#include <asm/msr.h>
12#include <asm/uaccess.h> 13#include <asm/uaccess.h>
13 14
@@ -19,8 +20,6 @@
19#include <mach_apic.h> 20#include <mach_apic.h>
20#endif 21#endif
21 22
22extern int trap_init_f00f_bug(void);
23
24#ifdef CONFIG_X86_INTEL_USERCOPY 23#ifdef CONFIG_X86_INTEL_USERCOPY
25/* 24/*
26 * Alignment at which movsl is preferred for bulk memory copies. 25 * Alignment at which movsl is preferred for bulk memory copies.
@@ -95,6 +94,20 @@ static int __cpuinit num_cpu_cores(struct cpuinfo_x86 *c)
95 return 1; 94 return 1;
96} 95}
97 96
97#ifdef CONFIG_X86_F00F_BUG
98static void __cpuinit trap_init_f00f_bug(void)
99{
100 __set_fixmap(FIX_F00F_IDT, __pa(&idt_table), PAGE_KERNEL_RO);
101
102 /*
103 * Update the IDT descriptor and reload the IDT so that
104 * it uses the read-only mapped virtual address.
105 */
106 idt_descr.address = fix_to_virt(FIX_F00F_IDT);
107 load_idt(&idt_descr);
108}
109#endif
110
98static void __cpuinit init_intel(struct cpuinfo_x86 *c) 111static void __cpuinit init_intel(struct cpuinfo_x86 *c)
99{ 112{
100 unsigned int l2 = 0; 113 unsigned int l2 = 0;
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index 05c27ecaf2a7..0fce34226b7d 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -1112,20 +1112,6 @@ asmlinkage void math_emulate(long arg)
1112 1112
1113#endif /* CONFIG_MATH_EMULATION */ 1113#endif /* CONFIG_MATH_EMULATION */
1114 1114
1115#ifdef CONFIG_X86_F00F_BUG
1116void __init trap_init_f00f_bug(void)
1117{
1118 __set_fixmap(FIX_F00F_IDT, __pa(&idt_table), PAGE_KERNEL_RO);
1119
1120 /*
1121 * Update the IDT descriptor and reload the IDT so that
1122 * it uses the read-only mapped virtual address.
1123 */
1124 idt_descr.address = fix_to_virt(FIX_F00F_IDT);
1125 load_idt(&idt_descr);
1126}
1127#endif
1128
1129/* 1115/*
1130 * This needs to use 'idt_table' rather than 'idt', and 1116 * This needs to use 'idt_table' rather than 'idt', and
1131 * thus use the _nonmapped_ version of the IDT, as the 1117 * thus use the _nonmapped_ version of the IDT, as the