Commit 4b0be4f7 authored by Tony Luck's avatar Tony Luck

Merge agluck-lia64.sc.intel.com:/data/home/aegl/BK/work/yanmin

into agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.9
parents 1c23a046 59c77efa
......@@ -357,8 +357,10 @@ efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
if (total_mem >= mem_limit)
continue;
total_mem += (md->num_pages << EFI_PAGE_SHIFT);
if (total_mem > mem_limit)
if (total_mem > mem_limit) {
md->num_pages -= ((total_mem - mem_limit) >> EFI_PAGE_SHIFT);
max_addr = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT);
}
if (md->num_pages == 0)
continue;
......
......@@ -116,19 +116,19 @@ find_bootmap_location (unsigned long start, unsigned long end, void *arg)
range_start = max(start, free_start);
range_end = min(end, rsvd_region[i].start & PAGE_MASK);
free_start = PAGE_ALIGN(rsvd_region[i].end);
if (range_end <= range_start)
continue; /* skip over empty range */
if (range_end - range_start >= needed) {
if (range_end - range_start >= needed) {
bootmap_start = __pa(range_start);
return 1; /* done */
return -1; /* done */
}
/* nothing more available in this segment */
if (range_end == end)
return 0;
free_start = PAGE_ALIGN(rsvd_region[i].end);
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment