patch-1.3.48 linux/include/asm-i386/bugs.h

Next file: linux/include/asm-i386/pgtable.h
Previous file: linux/include/asm-alpha/termios.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.47/linux/include/asm-i386/bugs.h linux/include/asm-i386/bugs.h
@@ -110,8 +110,25 @@
 	printk("Ok.\n");
 }
 
+static void check_tlb(void)
+{
+	/*
+	 * The 386 chips don't support TLB finegrained invalidation.
+	 * They will fault when they hit a invlpg instruction.
+	 */
+	if (x86 == 3) {
+#if defined(CONFIG_M486) || defined(CONFIG_M586)
+		printk("CPU is a 386 and this kernel was compiled for 486 or better.\n");
+		printk("Giving up.\n");
+		for (;;) ;
+#endif
+		return;
+	}
+}
+
 static void check_bugs(void)
 {
+	check_tlb();
 	check_fpu();
 	check_hlt();
 	system_utsname.machine[1] = '0' + x86;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this