Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99973
b: refs/heads/master
c: ab67715
h: refs/heads/master
i:
  99971: c6ee7a8
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent 0e61111 commit 320962b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22b45144f67dbaf0705992dc1462de2813fb83a1
refs/heads/master: ab67715c7201be2fe729888a09007b6ba5bb2326
20 changes: 15 additions & 5 deletions trunk/arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,16 +828,26 @@ void __init free_early(u64 start, u64 end)

void __init early_res_to_bootmem(u64 start, u64 end)
{
int i;
int i, count;
u64 final_start, final_end;
for (i = 0; i < MAX_EARLY_RES && early_res[i].end; i++) {

count = 0;
for (i = 0; i < MAX_EARLY_RES && early_res[i].end; i++)
count++;

printk(KERN_INFO "(%d early reservations) ==> bootmem\n", count);
for (i = 0; i < count; i++) {
struct early_res *r = &early_res[i];
printk(KERN_INFO " #%d [ %010llx - %010llx ] %16s", i,
r->start, r->end, r->name);
final_start = max(start, r->start);
final_end = min(end, r->end);
if (final_start >= final_end)
if (final_start >= final_end) {
printk(KERN_CONT "\n");
continue;
printk(KERN_INFO " early res: %d [%llx-%llx] %s\n", i,
final_start, final_end - 1, r->name);
}
printk(KERN_CONT " ===> [ %010llx - %010llx ]\n",
final_start, final_end);
reserve_bootmem_generic(final_start, final_end - final_start,
BOOTMEM_DEFAULT);
}
Expand Down

0 comments on commit 320962b

Please sign in to comment.