]> git.hungrycats.org Git - linux/commit
[IA64] Fix boot problems when using "mem=" boot parameter.
authorYanmin Zhang <yanmin.zhang@intel.com>
Wed, 25 Aug 2004 17:54:46 +0000 (17:54 +0000)
committerTony Luck <tony.luck@intel.com>
Wed, 25 Aug 2004 17:54:46 +0000 (17:54 +0000)
commit04362c4c457fe43c41bc8d4debba56273e6cdd8d
treeaf6d74668ef5bceb44792f64775ff8d059167644
parent65fd90f1492898e695a33ce4b164e02f157246e3
[IA64] Fix boot problems when using "mem=" boot parameter.

My tiger-4 machine has 16GB memory. Kernel 2.6.8 fails to boot on it
when command line parameter mem=8G, and it also fails when mem being
set to other value, such as 7G, 10G.

Basically, in function efi_memmap_walk, md->num_pages might be decreased
if mem_limit is set, and then at the next time when efi_memmap_walk is
called, trim_top might trim the md again because of IA64_GRANULE_SIZE
alignment, then another md which is beyond mem_limit at the beginning
will be chosen, and its physical page number is larger than max_pfn. Then,
a BUG check is triggered.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Yao Jun <junx.yao@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/efi.c