public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Bernhard Walle <bwalle@suse.de>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH] x86: only put e820 ram entries in resource tree
Date: Mon, 25 Aug 2008 10:19:01 -0400	[thread overview]
Message-ID: <20080825141901.GE18914@redhat.com> (raw)
In-Reply-To: <1219617897-9870-1-git-send-email-yhlu.kernel@gmail.com>

On Sun, Aug 24, 2008 at 03:44:57PM -0700, Yinghai Lu wrote:
> may need user to have new kexec tools that could create e820 table
> from /sys/firmware/memmap instead of /proc/iomem for second kernel
> 
> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
> Cc: Bernhard Walle <bwalle@suse.de>
> Cc: Vivek Goyal <vgoyal@redhat.com>
> Cc: "Eric W. Biederman" <ebiederm@xmission.com>
> 
> Index: linux-2.6/arch/x86/kernel/e820.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/e820.c
> +++ linux-2.6/arch/x86/kernel/e820.c
> @@ -1279,6 +1279,10 @@ void __init e820_reserve_resources(void)
>  
>  	res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map);
>  	for (i = 0; i < e820.nr_map; i++) {
> +		if (e820.map[i].type != E820_RAM) {
> +			res++;
> +			continue;
> +		}
>  		end = e820.map[i].addr + e820.map[i].size - 1;
>  #ifndef CONFIG_RESOURCES_64BIT
>  		if (end > 0x100000000ULL) {

I think this will wipe out ACPI related entries also from /proc/iomem
and kdump will be broken as second kernel needs to know about the ACPI
areas.

Though, if all these entries are available in /sys/firmware/memap then
probably one can modify kexec-tools to grep RAM entries from /proc/iomem and
rest of the entries from /sys/firmware/memmap.

I would not prefer doing that it makes the logic twisted.

Thanks
Vivek

  parent reply	other threads:[~2008-08-25 15:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-24 22:44 [PATCH] x86: only put e820 ram entries in resource tree Yinghai Lu
2008-08-25  2:52 ` Eric W. Biederman
2008-08-25  3:43   ` Yinghai Lu
2008-08-25  7:17   ` Ingo Molnar
2008-08-25 13:30     ` Eric W. Biederman
2008-08-25 17:08       ` Yinghai Lu
2008-08-25  8:39 ` Bernhard Walle
2008-08-25 17:13   ` Yinghai Lu
2008-08-26  8:20     ` Bernhard Walle
2008-08-25 14:19 ` Vivek Goyal [this message]
2008-08-25 17:11   ` Yinghai Lu

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=20080825141901.GE18914@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bwalle@suse.de \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=yhlu.kernel@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