stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@linux.intel.com>
To: Ingo Molnar <mingo@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Olof Johansson <olof@lixom.net>,
	"H. Peter Anvin" <hpa@linux.intel.com>, <stable@vger.kernel.org>
Subject: [RFC PATCH 1/3] x86, boot: Move setup_bios_corruption_check() later
Date: Mon, 11 Nov 2013 16:16:45 -0800	[thread overview]
Message-ID: <1384215407-22288-2-git-send-email-hpa@linux.intel.com> (raw)
In-Reply-To: <1384215407-22288-1-git-send-email-hpa@linux.intel.com>

From: "H. Peter Anvin" <hpa@linux.intel.com>

setup_bios_corruption_check() tries to claim any low memory regions
that we haven't already reserved.  Make sure we reserve any low memory
regions that we intend to either use or know/assume a priori is bad
*before* we initialize the checker.

Stable team note: adding this to the list to consider for stable
because it generates user-visible nuisance dmesg warnings in some
configurations.  However, it is not urgent and should be allowed to
percolate in Linus' tree for a bit first.

Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/528168CB.7070602@linux.intel.com
Cc: <stable@vger.kernel.org> v3.9+ [not urgent]
---
 arch/x86/kernel/setup.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index f0de629..8c01d6e 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1080,10 +1080,6 @@ void __init setup_arch(char **cmdline_p)
 	/* preallocate 4k for mptable mpc */
 	early_reserve_e820_mpc_new();
 
-#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
-	setup_bios_corruption_check();
-#endif
-
 #ifdef CONFIG_X86_32
 	printk(KERN_DEBUG "initial memory mapped: [mem 0x00000000-%#010lx]\n",
 			(max_pfn_mapped<<PAGE_SHIFT) - 1);
@@ -1100,6 +1096,14 @@ void __init setup_arch(char **cmdline_p)
 
 	setup_real_mode();
 
+	/*
+	 * At this point we should have reserved any low memory regions
+	 * we need to reserve.
+	 */
+#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
+	setup_bios_corruption_check();
+#endif
+
 	memblock_set_current_limit(get_max_mapped());
 	dma_contiguous_reserve(0);
 
-- 
1.8.3.1


           reply	other threads:[~2013-11-12  0:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1384215407-22288-1-git-send-email-hpa@linux.intel.com>]

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=1384215407-22288-2-git-send-email-hpa@linux.intel.com \
    --to=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=olof@lixom.net \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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).