浏览代码

revert: "x86: ioremap(), extend check to all RAM pages"

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>
Ingo Molnar 17 年之前
父节点
当前提交
2544a873ab
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      arch/x86/mm/ioremap.c

+ 2 - 2
arch/x86/mm/ioremap.c

@@ -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..
 	 * 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);
 		int is_ram = page_is_ram(pfn);