revert: "x86: ioremap(), extend check to all RAM pages"
authorIngo Molnar <mingo@elte.hu>
Tue, 29 Apr 2008 10:04:51 +0000 (12:04 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Apr 2008 21:15:34 +0000 (23:15 +0200)
Vegard Nossum reported a large (150 seconds) boot delay during bootup,
and bisected it to "x86: ioremap(), extend check to all RAM pages"
(commit bdd3cee2e4b). Revert this commit for now.

Bisected-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/mm/ioremap.c

index 804de18abcc2b47e7cf4e880a9b23ee159091061..0be9f9c59aa6b72d1cf55a0819be146d78f56e61 100644 (file)
@@ -148,8 +148,8 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
        /*
         * Don't allow anybody to remap normal RAM that we're using..
         */
-       for (pfn = phys_addr >> PAGE_SHIFT;
-                               (pfn << PAGE_SHIFT) < last_addr; pfn++) {
+       for (pfn = phys_addr >> PAGE_SHIFT; pfn < max_pfn_mapped &&
+               (pfn << PAGE_SHIFT) < last_addr; pfn++) {
 
                int is_ram = page_is_ram(pfn);