[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5090B966.4040605@zytor.com>
Date: Tue, 30 Oct 2012 22:38:46 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: "Zhang, Jun" <jun.zhang@...el.com>
CC: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"x86@...nel.org" <x86@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Fleming, Matt" <matt.fleming@...el.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.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 10:22 PM, Zhang, Jun wrote:
> 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@...el.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@...el.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;
>
The code is still wrong...
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists