diff options
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 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; |