Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85998
b: refs/heads/master
c: 156fbc3
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Feb 19, 2008
1 parent a62813e commit 4238884
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: d8a9e6a51ec58486f850e3606e3fcb86b5b7da41
refs/heads/master: 156fbc3fbe4ab640297b1ae2092821363840aeb6
15 changes: 7 additions & 8 deletions trunk/arch/x86/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ int page_is_ram(unsigned long pagenr)
if (pagenr == 0)
return 0;

/*
* Second special case: Some BIOSen report the PC BIOS
* area (640->1Mb) as ram even though it is not.
*/
if (pagenr >= (BIOS_BEGIN >> PAGE_SHIFT) &&
pagenr < (BIOS_END >> PAGE_SHIFT))
return 0;

for (i = 0; i < e820.nr_map; i++) {
/*
Expand All @@ -60,14 +67,6 @@ int page_is_ram(unsigned long pagenr)
addr = (e820.map[i].addr + PAGE_SIZE-1) >> PAGE_SHIFT;
end = (e820.map[i].addr + e820.map[i].size) >> PAGE_SHIFT;

/*
* Sanity check: Some BIOSen report areas as RAM that
* are not. Notably the 640->1Mb area, which is the
* PCI BIOS area.
*/
if (addr >= (BIOS_BEGIN >> PAGE_SHIFT) &&
end < (BIOS_END >> PAGE_SHIFT))
continue;

if ((pagenr >= addr) && (pagenr < end))
return 1;
Expand Down

0 comments on commit 4238884

Please sign in to comment.