]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/x86/mm/ioremap.c
x86/mm: Move warning from __ioremap_check_ram() to the call site
[mirror_ubuntu-artful-kernel.git] / arch / x86 / mm / ioremap.c
index cc5ccc415cc01ef8ea9e58b3f81a281c9ab412bf..fd3df0ddb4d4154bdee8ba2519e4fccb22a4896d 100644 (file)
@@ -63,8 +63,6 @@ static int __ioremap_check_ram(unsigned long start_pfn, unsigned long nr_pages,
                    !PageReserved(pfn_to_page(start_pfn + i)))
                        return 1;
 
-       WARN_ONCE(1, "ioremap on RAM pfn 0x%lx\n", start_pfn);
-
        return 0;
 }
 
@@ -131,8 +129,11 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
                pfn      = phys_addr >> PAGE_SHIFT;
                last_pfn = last_addr >> PAGE_SHIFT;
                if (walk_system_ram_range(pfn, last_pfn - pfn + 1, NULL,
-                                         __ioremap_check_ram) == 1)
+                                         __ioremap_check_ram) == 1) {
+                       WARN_ONCE(1, "ioremap on RAM at 0x%llx - 0x%llx\n",
+                                       phys_addr, last_addr);
                        return NULL;
+               }
        }
        /*
         * Mappings have to be page-aligned