mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Vivek Goyal" <vgoyal@redhat.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:11:32 -0700	[thread overview]
Message-ID: <86802c440808251011k5c80a527la5066565b8cff6f5@mail.gmail.com> (raw)
In-Reply-To: <20080825141901.GE18914@redhat.com>

On Mon, Aug 25, 2008 at 7:19 AM, Vivek Goyal <vgoyal@redhat.com> wrote:
> 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.

/sys/firmware/memmap have all of them. though RAM entries from
/proc/iomem could be smaller than that in /sys/firmware/memmap because
of trimming from commandline.

YH

      reply	other threads:[~2008-08-25 17:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-24 22:44 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
2008-08-25 17:11   ` Yinghai Lu [this message]

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=86802c440808251011k5c80a527la5066565b8cff6f5@mail.gmail.com \
    --to=yhlu.kernel@gmail.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=vgoyal@redhat.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

all inboxes | Powered by JetHome®