[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86802c441001121501v57b61815lc4b4c6d86dc5818d@mail.gmail.com>
Date: Tue, 12 Jan 2010 15:01:47 -0800
From: Yinghai Lu <yinghai@...nel.org>
To: Wu Fengguang <fengguang.wu@...el.com>, Ingo Molnar <mingo@...e.hu>,
"H. Peter Anvin" <hpa@...or.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
"Zheng, Shaohui" <shaohui.zheng@...el.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"y-goto@...fujitsu.com" <y-goto@...fujitsu.com>,
Dave Hansen <haveblue@...ibm.com>,
"x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH - resend] Memory-Hotplug: Fix the bug on interface
/dev/mem for 64-bit kernel(v1)
On Tue, Jan 12, 2010 at 5:35 AM, Wu Fengguang <fengguang.wu@...el.com> wrote:
> On Tue, Jan 12, 2010 at 10:39:03AM +0800, KAMEZAWA Hiroyuki wrote:
>> On Tue, 12 Jan 2010 10:33:08 +0800
>> Wu Fengguang <fengguang.wu@...el.com> wrote:
>>
>> > Sure, here it is :)
>> > ---
>> > x86: use the generic page_is_ram()
>> >
>> > The generic resource based page_is_ram() works better with memory
>> > hotplug/hotremove. So switch the x86 e820map based code to it.
>> >
>> > CC: Andi Kleen <andi@...stfloor.org>
>> > CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
>> > Signed-off-by: Wu Fengguang <fengguang.wu@...el.com>
>>
>> Ack.
>
> Thank you.
>
>>
>> > +#ifdef CONFIG_X86
>> > + /*
>> > + * A special case is the first 4Kb of memory;
>> > + * This is a BIOS owned area, not kernel ram, but generally
>> > + * not listed as such in the E820 table.
>> > + */
>> > + if (pfn == 0)
>> > + return 0;
>> > +
>> > + /*
>> > + * Second special case: Some BIOSen report the PC BIOS
>> > + * area (640->1Mb) as ram even though it is not.
>> > + */
>> > + if (pfn >= (BIOS_BEGIN >> PAGE_SHIFT) &&
>> > + pfn < (BIOS_END >> PAGE_SHIFT))
>> > + return 0;
>> > +#endif
>>
>> I'm glad if this part is sorted out in clean way ;)
>
> Two possible solutions are:
>
> - to exclude the above two ranges directly in e820 map;
> - to not add the above two ranges into iomem_resource.
>
> Yinghai, do you have any suggestions?
> We want to get rid of the two explicit tests from page_is_ram().
please check attached patch.
YH
View attachment "remove_bios_begin_end.patch" of type "text/x-diff" (4087 bytes)
Powered by blists - more mailing lists