aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/ioremap.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-02-28 08:10:49 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:51 -0400
commitbdd3cee2e4b7279457139058615ced6c2b41e7de (patch)
tree33ded8c908163e54792cb91ba2eacc144c366abc /arch/x86/mm/ioremap.c
parentb089c12b25284a5e31ede7c98936a2b36a41e090 (diff)
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/ioremap.c')
-rw-r--r--arch/x86/mm/ioremap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 17f518839028..e5608d380176 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,
146 /* 146 /*
147 * Don't allow anybody to remap normal RAM that we're using.. 147 * Don't allow anybody to remap normal RAM that we're using..
148 */ 148 */
149 for (pfn = phys_addr >> PAGE_SHIFT; pfn < max_pfn_mapped && 149 for (pfn = phys_addr >> PAGE_SHIFT;
150 (pfn << PAGE_SHIFT) < last_addr; pfn++) { 150 (pfn << PAGE_SHIFT) < last_addr; pfn++) {
151
151 if (page_is_ram(pfn) && pfn_valid(pfn) && 152 if (page_is_ram(pfn) && pfn_valid(pfn) &&
152 !PageReserved(pfn_to_page(pfn))) 153 !PageReserved(pfn_to_page(pfn)))
153 return NULL; 154 return NULL;