lkml.org 
[lkml]   [2010]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH - resend] Memory-Hotplug: Fix the bug on interface /dev/mem for 64-bit kernel(v1)
On Mon, 11 Jan 2010 20:43:03 +0800
Wu Fengguang <fengguang.wu@intel.com> wrote:

> > > + /* if add to low memory, update max_low_pfn */
> > > + if (unlikely(start_pfn < limit_low_pfn)) {
> > > + if (end_pfn <= limit_low_pfn)
> > > + max_low_pfn = end_pfn;
> > > + else
> > > + max_low_pfn = limit_low_pfn;
> >
> > X86_64 actually always set max_low_pfn=max_pfn, in setup_arch():
> > [Zheng, Shaohui] there should be some misunderstanding, I read the
> > code carefully, if the total memory is under 4G, it always
> > max_low_pfn=max_pfn. If the total memory is larger than 4G,
> > max_low_pfn means the end of low ram. It set
>
> > max_low_pfn = e820_end_of_low_ram_pfn();.
>
> The above line is very misleading.. In setup_arch(), it will be
> overrode by the following block.
>

Hmmm....could you rewrite /dev/mem to use kernel/resource.c other than
modifing e820 maps. ?
Two reasons.
- e820map is considerted to be stable, read-only after boot.
- We don't need to add more x86 special codes.


Thanks,
-Kame



\
 
 \ /
  Last update: 2010-01-12 01:37    [W:0.087 / U:6.408 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site