[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86802c440806261922n3f13b454o5e543e28d9a34e8e@mail.gmail.com>
Date: Thu, 26 Jun 2008 19:22:03 -0700
From: "Yinghai Lu" <yhlu.kernel@...il.com>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, andi@...stfloor.org,
mingo@...hat.com, tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] x86 boot: add E820_RESVD_KERN
On Thu, Jun 26, 2008 at 2:47 AM, Yinghai Lu <yhlu.kernel@...il.com> wrote:
> On Thu, Jun 26, 2008 at 12:48 AM, Huang, Ying <ying.huang@...el.com> wrote:
>> On Thu, 2008-06-26 at 00:25 -0700, Yinghai Lu wrote:
>> [...]
>>> > if (pfn >= limit_pfn)
>>> > @@ -977,7 +978,7 @@ u64 __init early_reserve_e820(u64 startt
>>> > return 0;
>>> >
>>> > addr = round_down(start + size - sizet, align);
>>> > - e820_update_range(addr, sizet, E820_RAM, E820_RESERVED);
>>> > + e820_update_range(addr, sizet, E820_RAM, E820_RESVD_KERN);
>>>
>>> this line is not needed.
>>
>> Why? Memory reserved by early_rserved_e820 should not be saved during
>> hibernation? shoudl not be saved by kdump?
>>
>>> > printk(KERN_INFO "update e820 for early_reserve_e820\n");
>>> > update_e820();
>>> >
>>> > @@ -1191,6 +1192,7 @@ void __init e820_reserve_resources(void)
>>> > res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map);
>>> > for (i = 0; i < e820.nr_map; i++) {
>>> > switch (e820.map[i].type) {
>>> > + case E820_RESVD_KERN:
>>> > case E820_RAM: res->name = "System RAM"; break;
>>> > case E820_ACPI: res->name = "ACPI Tables"; break;
>>> > case E820_NVS: res->name = "ACPI Non-volatile Storage"; break;
>>> >
>>> > --
>>>
>>> please move reserve_setup_data() from head.c/head64.c to setup32/64.c
>>> or merged setup.c
>>
>> OK.
>>
>>> also need to change reserve_early in reserve_setup_data to
>>> e820_update_range(,,E820_RAM, E820_RESEVED_EXTRA).
>>
>> Does this means reserve_early() should be replaced by
>> e820_update_range()?
>
> Yes. in your case.
>
>>
>>> calling reserve_setup_data() should around early_reserve_e820_mpc_new.
>>
>> I think reserve_xxx should be called before first find_e820_area() to
>> minimize the possibility of conflict.
> You already call e820_update_range, that could prevent find_e820_area
> to get confused.
some like the attach patch...
you still can merge parse_setup_data parse_e820_ext
also entries in parse_e820_ext is not initialized..., __copy_e820_map
will do nothing.
YH
View attachment "reserve_setup_data.patch" of type "text/x-patch" (4372 bytes)
Powered by blists - more mailing lists