]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: default corruption check to off, but put parameter default in Kconfig
authorJeremy Fitzhardinge <jeremy@goop.org>
Sun, 7 Sep 2008 09:37:32 +0000 (02:37 -0700)
committerIngo Molnar <mingo@elte.hu>
Sun, 7 Sep 2008 15:40:02 +0000 (17:40 +0200)
Default the low memory corruption check to off, but make the default setting of
the memory_corruption_check kernel parameter a config parameter.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/Kconfig
arch/x86/kernel/setup.c

index cbee4199689ce4e94c4418216aca57f7290d682e..7820d447bb8d31f71c40b1347ca94d8cf2a9649f 100644 (file)
@@ -1061,7 +1061,6 @@ config HIGHPTE
 
 config X86_CHECK_BIOS_CORRUPTION
         bool "Check for low memory corruption"
 
 config X86_CHECK_BIOS_CORRUPTION
         bool "Check for low memory corruption"
-       default y
        help
         Periodically check for memory corruption in low memory, which
         is suspected to be caused by BIOS.  Even when enabled in the
        help
         Periodically check for memory corruption in low memory, which
         is suspected to be caused by BIOS.  Even when enabled in the
@@ -1082,6 +1081,14 @@ config X86_CHECK_BIOS_CORRUPTION
         you can use memmap= to prevent the kernel from using that
         memory.
 
         you can use memmap= to prevent the kernel from using that
         memory.
 
+config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
+        bool "Set the default setting of memory_corruption_check"
+       depends on X86_CHECK_BIOS_CORRUPTION
+       default y
+       help
+        Set whether the default state of memory_corruption_check is
+        on or off.
+
 config MATH_EMULATION
        bool
        prompt "Math emulation" if X86_32
 config MATH_EMULATION
        bool
        prompt "Math emulation" if X86_32
index 27ae912888555b559caeeaad02bc98a92ee38ee0..ec7e56c1b9843df4ad142cb03ad50eda985cc769 100644 (file)
@@ -587,7 +587,8 @@ struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
 #ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
 #define MAX_SCAN_AREAS 8
 
 #ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
 #define MAX_SCAN_AREAS 8
 
-static int __read_mostly memory_corruption_check = 0;
+static int __read_mostly memory_corruption_check = -1;
+
 static unsigned __read_mostly corruption_check_size = 64*1024;
 static unsigned __read_mostly corruption_check_period = 60; /* seconds */
 
 static unsigned __read_mostly corruption_check_size = 64*1024;
 static unsigned __read_mostly corruption_check_period = 60; /* seconds */
 
@@ -634,6 +635,16 @@ static void __init setup_bios_corruption_check(void)
 {
        u64 addr = PAGE_SIZE;   /* assume first page is reserved anyway */
 
 {
        u64 addr = PAGE_SIZE;   /* assume first page is reserved anyway */
 
+       if (memory_corruption_check == -1) {
+               memory_corruption_check =
+#ifdef CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
+                       1
+#else
+                       0
+#endif
+                       ;
+       }
+
        if (corruption_check_size == 0)
                memory_corruption_check = 0;
 
        if (corruption_check_size == 0)
                memory_corruption_check = 0;