]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: warn about RAM pages in ioremap()
authorIngo Molnar <mingo@elte.hu>
Mon, 3 Mar 2008 08:37:41 +0000 (09:37 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:52 +0000 (17:40 +0200)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/ioremap.c

index e5608d380176e4bf0e0a3b3f1d0286094641593d..3d0a589d92c40ebcf33882bf9d1b331894953037 100644 (file)
@@ -149,9 +149,11 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
        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)))
+               int is_ram = page_is_ram(pfn);
+
+               if (is_ram && pfn_valid(pfn) && !PageReserved(pfn_to_page(pfn)))
                        return NULL;
+               WARN_ON_ONCE(is_ram);
        }
 
        switch (mode) {