> On Wed, 17 Nov 2010,
shaohui.zheng@intel.com wrote:
>
> > Index: linux-hpe4/arch/x86/kernel/e820.c
> > ===================================================================
> > --- linux-hpe4.orig/arch/x86/kernel/e820.c 2010-11-15 17:13:02.483461667 +0800
> > +++ linux-hpe4/arch/x86/kernel/e820.c 2010-11-15 17:13:07.083461581 +0800
> > @@ -971,6 +971,7 @@
> > }
> >
> > static int userdef __initdata;
> > +static u64 max_mem_size __initdata = ULLONG_MAX;
> >
> > /* "mem=nopentium" disables the 4MB page tables. */
> > static int __init parse_memopt(char *p)
> > @@ -989,12 +990,28 @@
> >
> > userdef = 1;
> > mem_size = memparse(p, &p);
> > - e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
> > + e820_remove_range(mem_size, max_mem_size - mem_size, E820_RAM, 1);
> > + max_mem_size = mem_size;
> >
> > return 0;
> > }
>
> This needs memmap= support as well, right?