diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-02-28 13:10:49 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 15:40:51 (GMT) |
commit | bdd3cee2e4b7279457139058615ced6c2b41e7de (patch) | |
tree | 33ded8c908163e54792cb91ba2eacc144c366abc /arch/x86/mm | |
parent | b089c12b25284a5e31ede7c98936a2b36a41e090 (diff) | |
download | linux-fsl-qoriq-bdd3cee2e4b7279457139058615ced6c2b41e7de.tar.xz |
x86: ioremap(), extend check to all RAM pages
Suggested by Jan Beulich.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/ioremap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 17f5188..e5608d3 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -146,8 +146,9 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size, /* * Don't allow anybody to remap normal RAM that we're using.. */ - for (pfn = phys_addr >> PAGE_SHIFT; pfn < max_pfn_mapped && - (pfn << PAGE_SHIFT) < last_addr; pfn++) { + for (pfn = phys_addr >> PAGE_SHIFT; + (pfn << PAGE_SHIFT) < last_addr; pfn++) { + if (page_is_ram(pfn) && pfn_valid(pfn) && !PageReserved(pfn_to_page(pfn))) return NULL; |