Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11762
b: refs/heads/master
c: f014a55
h: refs/heads/master
v: v3
  • Loading branch information
Dave Hansen authored and Linus Torvalds committed Oct 31, 2005
1 parent 5d3e1ed commit 59d6c25
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 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: 750deaa4021da1cf9fdb1e20861a10c76fd7f2bc
refs/heads/master: f014a556e714dfb02502e3be6146a39ca625f33c
24 changes: 17 additions & 7 deletions trunk/arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,24 @@ static void __init limit_regions(unsigned long long size)
}
}
for (i = 0; i < e820.nr_map; i++) {
if (e820.map[i].type == E820_RAM) {
current_addr = e820.map[i].addr + e820.map[i].size;
if (current_addr >= size) {
e820.map[i].size -= current_addr-size;
e820.nr_map = i + 1;
return;
}
current_addr = e820.map[i].addr + e820.map[i].size;
if (current_addr < size)
continue;

if (e820.map[i].type != E820_RAM)
continue;

if (e820.map[i].addr >= size) {
/*
* This region starts past the end of the
* requested size, skip it completely.
*/
e820.nr_map = i;
} else {
e820.nr_map = i + 1;
e820.map[i].size -= current_addr - size;
}
return;
}
}

Expand Down

0 comments on commit 59d6c25

Please sign in to comment.