浏览代码

[MIPS] setup.c: get ride of CPHYSADDR()

and use new __pa() implementation instead introduced by the previous
patch. Indeed this macro can be used now even by the 64 bit kernels
with CONFIG_BUILD_ELF64=n config.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Franck Bui-Huu 18 年之前
父节点
当前提交
d4df6d4e7a
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      arch/mips/kernel/setup.c

+ 3 - 3
arch/mips/kernel/setup.c

@@ -204,12 +204,12 @@ static void __init finalize_initrd(void)
 		printk(KERN_INFO "Initrd not found or empty");
 		printk(KERN_INFO "Initrd not found or empty");
 		goto disable;
 		goto disable;
 	}
 	}
-	if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) {
+	if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {
 		printk("Initrd extends beyond end of memory");
 		printk("Initrd extends beyond end of memory");
 		goto disable;
 		goto disable;
 	}
 	}
 
 
-	reserve_bootmem(CPHYSADDR(initrd_start), size);
+	reserve_bootmem(__pa(initrd_start), size);
 	initrd_below_start_ok = 1;
 	initrd_below_start_ok = 1;
 
 
 	printk(KERN_INFO "Initial ramdisk at: 0x%lx (%lu bytes)\n",
 	printk(KERN_INFO "Initial ramdisk at: 0x%lx (%lu bytes)\n",
@@ -260,7 +260,7 @@ static void __init bootmem_init(void)
 	 * of usable memory.
 	 * of usable memory.
 	 */
 	 */
 	reserved_end = init_initrd();
 	reserved_end = init_initrd();
-	reserved_end = PFN_UP(CPHYSADDR(max(reserved_end, (unsigned long)&_end)));
+	reserved_end = PFN_UP(__pa(max(reserved_end, (unsigned long)&_end)));
 
 
 	/*
 	/*
 	 * Find the highest page frame number we have available.
 	 * Find the highest page frame number we have available.