linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, "Hugh Dickens" <hugh@veritas.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Alan Jenkins" <alan-jenkins@tuffmail.co.uk>,
	"Rafa? Mi?ecki" <zajec5@gmail.com>
Subject: [PATCH 4/3] x86: default corruption check to off, but put parameter default in Kconfig
Date: Sun, 07 Sep 2008 02:37:32 -0700	[thread overview]
Message-ID: <48C3A0DC.8000206@goop.org> (raw)
In-Reply-To: <20080907091112.GA5574@elte.hu>

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>
---
 arch/x86/Kconfig        |    9 ++++++++-
 arch/x86/kernel/setup.c |   13 ++++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

===================================================================
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1139,7 +1139,6 @@
 
 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
@@ -1159,6 +1158,14 @@
 	 BIOS-originated corruption always affects the same 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
===================================================================
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -590,7 +590,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 */
 
@@ -636,6 +637,16 @@
 static void __init setup_bios_corruption_check(void)
 {
 	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;



  reply	other threads:[~2008-09-07  9:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <patchbomb.1220777491@localhost>
     [not found] ` <72081a970effa1a32861.1220777494@localhost>
2008-09-07  9:11   ` [PATCH 3 of 3] x86: clean up memory corruption check and add more kernel parameters Ingo Molnar
2008-09-07  9:37     ` Jeremy Fitzhardinge [this message]
2008-09-07 15:40       ` [PATCH 4/3] x86: default corruption check to off, but put parameter default in Kconfig Ingo Molnar
     [not found]         ` <20080907155030.GA24741@elte.hu>
2008-09-07 15:51           ` Ingo Molnar
2008-09-07 21:54             ` [PATCH 5/3] x86: fix compile error with corruption checking disabled Jeremy Fitzhardinge
2008-09-08 18:03               ` Ingo Molnar
2008-09-07 15:24 ` [PATCH 0 of 3] Low memory corruption detection and workaround Alan Jenkins
2008-09-08 11:23   ` Nick Piggin
2008-09-08 16:47     ` Jeremy Fitzhardinge
2008-09-08 17:01       ` Alan Cox
2008-09-08 18:44       ` Nick Piggin
2008-09-08 10:52 ` Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48C3A0DC.8000206@goop.org \
    --to=jeremy@goop.org \
    --cc=alan-jenkins@tuffmail.co.uk \
    --cc=hpa@zytor.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).