aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/ioremap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 18:56:05 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 18:56:05 -0500
commitcf8c0d1dbcfaba56adde85b63190a8bceda0cd04 (patch)
tree870e47b308d77527d3e161f86832b66f44dfd45a /arch/x86/mm/ioremap.c
parentd5c67bac833c6c9cc713f6a27daa77dcba898dd8 (diff)
parent156fbc3fbe4ab640297b1ae2092821363840aeb6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (32 commits) x86: fix page_is_ram() thinko x86: fix WARN_ON() message: teach page_is_ram() about the special 4Kb bios data page x86: i8259A: remove redundant irq_descinitialization x86: fix vdso_install breaks user "make install" x86: change IO delay back to 0x80 x86: lds - Use THREAD_SIZE instead of numeric constant x86: lds - Use PAGE_SIZE instead of numeric constant x86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value x86: docs fixes to Documentation/i386/IO-APIC.txt x86: fix printout ugliness in cpu info printk x86: clean up csum-wrappers_64.c some more x86: coding style fixes in arch/x86/lib/csum-wrappers_64.c x86: coding style fixes in arch/x86/lib/io_64.c x86: exclude vsyscall files from stackprotect x86: add pgd_large() on 64-bit, for consistency x86: minor cleanup of comments in processor.h x86: annotate pci/common.s:pci_scan_bus_with_sysdata with __devinit x86: fix section mismatch in head_64.S:initial_code x86: fix section mismatch in srat_64.c:reserve_hotadd x86: fix section mismatch warning in topology.c:arch_register_cpu ...
Diffstat (limited to 'arch/x86/mm/ioremap.c')
-rw-r--r--arch/x86/mm/ioremap.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 9f42d7e9c158..f4c95aec5acb 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -42,6 +42,22 @@ int page_is_ram(unsigned long pagenr)
42 unsigned long addr, end; 42 unsigned long addr, end;
43 int i; 43 int i;
44 44
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 /*
54 * Second special case: Some BIOSen report the PC BIOS
55 * area (640->1Mb) as ram even though it is not.
56 */
57 if (pagenr >= (BIOS_BEGIN >> PAGE_SHIFT) &&
58 pagenr < (BIOS_END >> PAGE_SHIFT))
59 return 0;
60
45 for (i = 0; i < e820.nr_map; i++) { 61 for (i = 0; i < e820.nr_map; i++) {
46 /* 62 /*
47 * Not usable memory: 63 * Not usable memory:
@@ -51,14 +67,6 @@ int page_is_ram(unsigned long pagenr)
51 addr = (e820.map[i].addr + PAGE_SIZE-1) >> PAGE_SHIFT; 67 addr = (e820.map[i].addr + PAGE_SIZE-1) >> PAGE_SHIFT;
52 end = (e820.map[i].addr + e820.map[i].size) >> PAGE_SHIFT; 68 end = (e820.map[i].addr + e820.map[i].size) >> PAGE_SHIFT;
53 69
54 /*
55 * Sanity check: Some BIOSen report areas as RAM that
56 * are not. Notably the 640->1Mb area, which is the
57 * PCI BIOS area.
58 */
59 if (addr >= (BIOS_BEGIN >> PAGE_SHIFT) &&
60 end < (BIOS_END >> PAGE_SHIFT))
61 continue;
62 70
63 if ((pagenr >= addr) && (pagenr < end)) 71 if ((pagenr >= addr) && (pagenr < end))
64 return 1; 72 return 1;