Skip to content

Commit d8a9e6a

Browse files
fenrus75Ingo Molnar
authored andcommitted
x86: fix WARN_ON() message: teach page_is_ram() about the special 4Kb bios data page
This patch teaches page_is_ram() about the fact that the first 4Kb of memory are special on x86, even though the E820 table normally doesn't exclude it. This fixes the WARN_ON() reported by Laurent Riffard who was also very helpful in diagnosing the issue. [ mingo@elte.hu: we are working on doing this properly in the e820 space, but for 2.6.25 this is the better fix. ] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 7c6357d commit d8a9e6a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎arch/x86/mm/ioremap.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ int page_is_ram(unsigned long pagenr)
4242
unsigned long addr, end;
4343
int i;
4444

45+
/*
46+
* A special case is the first 4Kb of memory;
47+
* This is a BIOS owned area, not kernel ram, but generally
48+
* not listed as such in the E820 table.
49+
*/
50+
if (pagenr == 0)
51+
return 0;
52+
53+
4554
for (i = 0; i < e820.nr_map; i++) {
4655
/*
4756
* Not usable memory:

0 commit comments

Comments
 (0)