patch-2.1.75 linux/arch/i386/mm/fault.c
Next file: linux/arch/i386/mm/init.c
Previous file: linux/arch/i386/lib/delay.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Sun Dec 21 17:27:18 1997
- Orig file:
v2.1.74/linux/arch/i386/mm/fault.c
- Orig date:
Wed Nov 26 16:24:01 1997
diff -u --recursive --new-file v2.1.74/linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
@@ -76,8 +76,6 @@
asmlinkage void do_invalid_op (struct pt_regs *, unsigned long);
-extern int pentium_f00f_bug;
-
/*
* This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate
@@ -180,7 +178,7 @@
/*
* Pentium F0 0F C7 C8 bug workaround.
*/
- if (pentium_f00f_bug) {
+ if (boot_cpu_data.f00f_bug) {
unsigned long nr;
nr = (address - (unsigned long) idt) >> 3;
@@ -209,10 +207,16 @@
*
* First we check if it was the bootup rw-test, though..
*/
- if (wp_works_ok < 0 && address == TASK_SIZE && (error_code & 1)) {
- wp_works_ok = 1;
- pg0[0] = pte_val(mk_pte(TASK_SIZE, PAGE_SHARED));
- flush_tlb();
+ if (boot_cpu_data.wp_works_ok < 0 &&
+ address == PAGE_OFFSET && (error_code & 1)) {
+ boot_cpu_data.wp_works_ok = 1;
+ pg0[0] = pte_val(mk_pte(PAGE_OFFSET, PAGE_KERNEL));
+ local_flush_tlb();
+ /*
+ * Beware: Black magic here. The printk is needed here to flush
+ * CPU state on certain buggy processors.
+ */
+ printk("Ok");
goto out;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov