From: "Zhang, Jun" <jun.zhang@intel.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "x86@kernel.org" <x86@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"Fleming, Matt" <matt.fleming@intel.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [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).
Date: Wed, 31 Oct 2012 05:22:16 +0000 [thread overview]
Message-ID: <88DC34334CA3444C85D647DBFA962C270FD7EB3A@SHSMSX102.ccr.corp.intel.com> (raw)
In-Reply-To: <5090AB3C.5050405@zytor.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3641 bytes --]
Hello, Anvin
You are right. Thanks!
Hello, All
Please review it again. Thanks!
>From bf7506ac7e9ce0df0b915164dbb7a6d858ef2e40 Mon Sep 17 00:00:00 2001
From: jzha144 <jun.zhang@intel.com>
Date: Wed, 31 Oct 2012 08:51:18 +0800
Subject: [PATCH] When we are doing a crash dump, we still need non-E820_RAM
memory type address information in order to do I/O. so only
remove all RAM ranges which need to be dumped.
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..77be839 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();
+
+ /*
+ * We are doing a crash dump, so remove all RAM ranges
+ * as they are the ones that need to be dumped.
+ * We still need all non-RAM information in order to do I/O.
+ */
+ e820_remove_range(0, ULLONG_MAX, E820_RAM, 1);
+ userdef = 1;
+ return 0;
#endif
e820.nr_map = 0;
userdef = 1;
--
1.7.6
Best Regards!
Zhang, jun
-----Original Message-----
From: H. Peter Anvin [mailto:hpa@zytor.com]
Sent: Wednesday, October 31, 2012 12:38 PM
To: Zhang, Jun
Cc: Thomas Gleixner; Ingo Molnar; x86@kernel.org; Andrew Morton; Fleming, Matt; Paul Gortmaker; linux-kernel@vger.kernel.org
Subject: Re: [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).
On 10/30/2012 08:39 PM, Zhang, Jun wrote:
> Hello, Anvin
> Thanks!
>
> Hello, all
> Next is my the latest version, please review it.
> Thanks!
You're still starting in the wrong end which is confusing for the reader.
What you probably want to say is something more like:
"We are doing a crash dump, so remove all RAM ranges as they are the ones that need to be dumped. We still need all non-RAM information in order to do I/O."
At that point it should be pretty obvious that the patch is wrong. What if we are *not* doing a crash dump? Just because crash dump is compiled in doesn't mean that that is what we are doing right now.
-hpa
> From 141546c77ff7be523a9e72f5259df4a6827f2c1a Mon Sep 17 00:00:00
> 2001
> From: jzha144 <jun.zhang@intel.com>
> Date: Wed, 31 Oct 2012 08:51:18 +0800
> Subject: [PATCH] If we are doing a crash dump, we still need non-E820_RAM
> memory type address information, which come from BIOS or
> firmware. for example: PCI_MMCONFIG check this address.
>
> 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..f8672d0 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();
> +
> + /*
> + * If we are doing a crash dump, we still need non-E820_RAM
> + * memory type address information. so we only remove
> + * E820_RAM type.
> + */
> + e820_remove_range(0, ULLONG_MAX, E820_RAM, 1);
> + userdef = 1;
> + return 0;
> #endif
> e820.nr_map = 0;
> userdef = 1;
>
--
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2012-10-31 5:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 1:26 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 [this message]
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
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=88DC34334CA3444C85D647DBFA962C270FD7EB3A@SHSMSX102.ccr.corp.intel.com \
--to=jun.zhang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@redhat.com \
--cc=paul.gortmaker@windriver.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®