|
@@ -8,6 +8,7 @@
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
|
|
|
|
#include <asm/processor.h>
|
|
#include <asm/processor.h>
|
|
|
|
+#include <asm/pgtable.h>
|
|
#include <asm/msr.h>
|
|
#include <asm/msr.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/uaccess.h>
|
|
|
|
|
|
@@ -19,8 +20,6 @@
|
|
#include <mach_apic.h>
|
|
#include <mach_apic.h>
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-extern int trap_init_f00f_bug(void);
|
|
|
|
-
|
|
|
|
#ifdef CONFIG_X86_INTEL_USERCOPY
|
|
#ifdef CONFIG_X86_INTEL_USERCOPY
|
|
/*
|
|
/*
|
|
* Alignment at which movsl is preferred for bulk memory copies.
|
|
* Alignment at which movsl is preferred for bulk memory copies.
|
|
@@ -95,6 +94,20 @@ static int __cpuinit num_cpu_cores(struct cpuinfo_x86 *c)
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_X86_F00F_BUG
|
|
|
|
+static void __cpuinit trap_init_f00f_bug(void)
|
|
|
|
+{
|
|
|
|
+ __set_fixmap(FIX_F00F_IDT, __pa(&idt_table), PAGE_KERNEL_RO);
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Update the IDT descriptor and reload the IDT so that
|
|
|
|
+ * it uses the read-only mapped virtual address.
|
|
|
|
+ */
|
|
|
|
+ idt_descr.address = fix_to_virt(FIX_F00F_IDT);
|
|
|
|
+ load_idt(&idt_descr);
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
+
|
|
static void __cpuinit init_intel(struct cpuinfo_x86 *c)
|
|
static void __cpuinit init_intel(struct cpuinfo_x86 *c)
|
|
{
|
|
{
|
|
unsigned int l2 = 0;
|
|
unsigned int l2 = 0;
|