diff options
author | Rob Herring <rob.herring@calxeda.com> | 2014-04-16 15:45:14 +0530 |
---|---|---|
committer | Ishan Mittal <imittal@nvidia.com> | 2014-04-30 11:39:09 +0530 |
commit | b227a6e55ab6d75fa6a60b97f32a406eb183f1a2 (patch) | |
tree | 9979953c8688036202f1e6c7eb574eb63786f72e | |
parent | bc314a47db2b7a3d3f363643188d2641128a19c1 (diff) |
arm64: set initrd_start/initrd_end for fdt scan
In order to unify the initrd scanning for DT across architectures, make
arm64 use initrd_start and initrd_end instead of the physical addresses.
Conflicts:
arch/arm64/mm/init.c
(cherry picked from commit ec2eaa73b3d21776f46797a2eef983d7be09a964)
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Change-Id: I79f9ae06667dbcc3e4f4c08612a5e4a1f82d7885
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Ishan Mittal <imittal@nvidia.com>
-rw-r--r-- | arch/arm64/mm/init.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 913ab7cc8c31..98b906d8d87c 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -52,12 +52,7 @@ phys_addr_t memstart_addr __read_mostly = 0; phys_addr_t memstart_addr __read_mostly = 0x80000000; #endif -void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) -{ - phys_initrd_start = start; - phys_initrd_size = end - start; -} - +#ifdef CONFIG_BLK_DEV_INITRD static int __init early_initrd(char *p) { unsigned long start, size; @@ -67,12 +62,13 @@ static int __init early_initrd(char *p) if (*endp == ',') { size = memparse(endp + 1, NULL); - phys_initrd_start = start; - phys_initrd_size = size; + initrd_start = (unsigned long)__va(start); + initrd_end = (unsigned long)__va(start + size); } return 0; } early_param("initrd", early_initrd); +#endif #define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT) @@ -145,13 +141,8 @@ void __init arm64_memblock_init(void) /* Register the kernel text, kernel data and initrd with memblock */ memblock_reserve(__pa(_text), _end - _text); #ifdef CONFIG_BLK_DEV_INITRD - if (phys_initrd_size) { - memblock_reserve(phys_initrd_start, phys_initrd_size); - - /* Now convert initrd to virtual addresses */ - initrd_start = __phys_to_virt(phys_initrd_start); - initrd_end = initrd_start + phys_initrd_size; - } + if (initrd_start) + memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start); #endif /* |