diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-08-30 11:54:26 -0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-10-09 12:38:59 -0400 |
commit | 65939301acdb1e593fdb424bd356f0b9bc7ba5be (patch) | |
tree | 04f6b61b43bc9b875056c44697471b39046a61a0 /arch/arm/mm | |
parent | 068f6310b965d67d57f89ebf4c539e5933754366 (diff) |
arm: set initrd_start/initrd_end for fdt scan
In order to unify the initrd scanning for DT across architectures, make
arm set initrd_start and initrd_end instead of the physical addresses.
This is aligned with all other architectures.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Acked-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/init.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index febaee7ca57b..9eeb1cd1c401 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -77,11 +77,11 @@ static int __init parse_tag_initrd2(const struct tag *tag) | |||
77 | 77 | ||
78 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); | 78 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); |
79 | 79 | ||
80 | #ifdef CONFIG_OF_FLATTREE | 80 | #if defined(CONFIG_OF_FLATTREE) && defined(CONFIG_BLK_DEV_INITRD) |
81 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | 81 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) |
82 | { | 82 | { |
83 | phys_initrd_start = start; | 83 | initrd_start = (unsigned long)__va(start); |
84 | phys_initrd_size = end - start; | 84 | initrd_end = (unsigned long)__va(end); |
85 | } | 85 | } |
86 | #endif /* CONFIG_OF_FLATTREE */ | 86 | #endif /* CONFIG_OF_FLATTREE */ |
87 | 87 | ||
@@ -351,6 +351,11 @@ void __init arm_memblock_init(struct meminfo *mi, | |||
351 | memblock_reserve(__pa(_stext), _end - _stext); | 351 | memblock_reserve(__pa(_stext), _end - _stext); |
352 | #endif | 352 | #endif |
353 | #ifdef CONFIG_BLK_DEV_INITRD | 353 | #ifdef CONFIG_BLK_DEV_INITRD |
354 | /* FDT scan will populate initrd_start */ | ||
355 | if (initrd_start) { | ||
356 | phys_initrd_start = __virt_to_phys(initrd_start); | ||
357 | phys_initrd_size = initrd_end - initrd_start; | ||
358 | } | ||
354 | if (phys_initrd_size && | 359 | if (phys_initrd_size && |
355 | !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) { | 360 | !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) { |
356 | pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n", | 361 | pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n", |