Skip to contentSkip to conversation

Clean up x86 write protect test

PATCH New Brian Gerst 1 participant 1 message Sep 27, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Clean up x86 write protect test

This patch changes the write protect test to use vmalloc instead of touching the page tables directly. As a side effect, this allows the test to be run on processors supporting page size extensions, exercising the exception handler code.

Signature · 1 line
						Brian Gerst
arch/i386/kernel/setup.c +1 -1
diff -urN linux-2.4.10/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
@@ -113,7 +113,7 @@
  */
 
 char ignore_irq13;		/* set if exception 16 works */
-struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
+struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, 0, 1, 0, 0, -1 };
 
 unsigned long mmu_cr4_features;
 
arch/i386/mm/init.c +13 -33

97 lines not on this page · raw message

include/asm-i386/bugs.h +3 -0
diff -urN linux-2.4.10/include/asm-i386/bugs.h linux/include/asm-i386/bugs.h
@@ -202,6 +202,8 @@
 #endif
 }
 
+extern void __init test_wp_bit(void);
+
 static void __init check_bugs(void)
 {
 	identify_cpu(&boot_cpu_data);
@@ -210,6 +212,7 @@
 	print_cpu_info(&boot_cpu_data);
 #endif
 	check_config();
+	test_wp_bit();
 	check_fpu();
 	check_hlt();
 	check_popad();