linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] To crash dump, we need keep other memory type except E820_RAM, because other type come from BIOS or firmware is used by other code(for example: PCI_MMCONFIG).
@ 2012-10-31  1:26 Zhang, Jun
  2012-10-31  2:46 ` H. Peter Anvin
  0 siblings, 1 reply; 15+ messages in thread
From: Zhang, Jun @ 2012-10-31  1:26 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86@kernel.org,
	Andrew Morton, Fleming, Matt, Paul Gortmaker,
	linux-kernel@vger.kernel.org
  Cc: Zhang, Jun

>From aebc336baa7ec2d4ccb6f21166770c7d2ee26cba Mon Sep 17 00:00:00 2001
From: jzha144 <jun.zhang@intel.com>
Date: Wed, 31 Oct 2012 08:51:18 +0800
Subject: [PATCH] To crash dump, we need keep other memory type except
 E820_RAM, because other type come from BIOS or firmware is
 used by other code(for example: PCI_MMCONFIG).

Signed-off-by: jzha144 <jun.zhang@intel.com>
---
 arch/x86/kernel/e820.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index df06ade..8760427 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -851,6 +851,15 @@ static int __init parse_memmap_opt(char *p)
 		 * reset.
 		 */
 		saved_max_pfn = e820_end_of_ram_pfn();
+
+		/*
+		 * To CRASH DUMP, only remove E820_RAM.
+		 *  some other memory typecome from BIOS or firmware,
+		 * it must be same with system kernel.
+		 */
+		e820_remove_range(0, ULLONG_MAX, E820_RAM, 1);
+		userdef = 1;
+		return 0;
 #endif
 		e820.nr_map = 0;
 		userdef = 1;
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-11-05  2:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31  1:26 [PATCH] To crash dump, we need keep other memory type except E820_RAM, because other type come from BIOS or firmware is used by other code(for example: PCI_MMCONFIG) Zhang, Jun
2012-10-31  2:46 ` H. Peter Anvin
2012-10-31  3:39   ` Zhang, Jun
2012-10-31  4:38     ` H. Peter Anvin
2012-10-31  5:22       ` Zhang, Jun
2012-10-31  5:38         ` H. Peter Anvin
2012-11-01  2:15           ` Zhang, Jun
2012-11-01  4:20             ` H. Peter Anvin
2012-11-01  8:49               ` Zhang, Jun
2012-11-02 15:08                 ` Paul Gortmaker
2012-11-02 16:37                 ` H. Peter Anvin
2012-11-05  1:37                   ` [PATCH] crash dump: don't delete non-E820_RAM during init Zhang, Jun
2012-11-05  2:39                     ` H. Peter Anvin
2012-11-05  2:57                       ` Zhang, Jun
2012-11-05  2:59                         ` H. Peter Anvin

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).