public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
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>,
	Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH] x86: only put e820 ram entries in resource tree
Date: Sun, 24 Aug 2008 19:52:50 -0700	[thread overview]
Message-ID: <m14p59ztz1.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <1219617897-9870-1-git-send-email-yhlu.kernel@gmail.com> (Yinghai Lu's message of "Sun, 24 Aug 2008 15:44:57 -0700")

Yinghai Lu <yhlu.kernel@gmail.com> writes:

> may need user to have new kexec tools that could create e820 table
> from /sys/firmware/memmap instead of /proc/iomem for second kernel

Nacked-by: "Eric W. Biederman" <ebiederm@xmission.com>

/proc/iomem is mostly about io resources which you have just removed.
It is totally the wrong thing to only register RAM resource!

The use by kexec was and is just taking advantage of something that
already existed.

Eric

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

  reply	other threads:[~2008-08-25  3:04 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 [this message]
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
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=m14p59ztz1.fsf@frodo.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=bwalle@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=vgoyal@redhat.com \
    --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