diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-08-25 17:47:48 -0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-10-09 12:39:00 -0400 |
commit | ec2eaa73b3d21776f46797a2eef983d7be09a964 (patch) | |
tree | aa79b3e6d57983743344375316f60a08c99e7dc6 /arch/arm64 | |
parent | 65939301acdb1e593fdb424bd356f0b9bc7ba5be (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.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/mm/init.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index de2de5db628d..8261f4e60795 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c | |||
@@ -39,17 +39,9 @@ | |||
39 | 39 | ||
40 | #include "mm.h" | 40 | #include "mm.h" |
41 | 41 | ||
42 | static unsigned long phys_initrd_start __initdata = 0; | ||
43 | static unsigned long phys_initrd_size __initdata = 0; | ||
44 | |||
45 | phys_addr_t memstart_addr __read_mostly = 0; | 42 | phys_addr_t memstart_addr __read_mostly = 0; |
46 | 43 | ||
47 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | 44 | #ifdef CONFIG_BLK_DEV_INITRD |
48 | { | ||
49 | phys_initrd_start = start; | ||
50 | phys_initrd_size = end - start; | ||
51 | } | ||
52 | |||
53 | static int __init early_initrd(char *p) | 45 | static int __init early_initrd(char *p) |
54 | { | 46 | { |
55 | unsigned long start, size; | 47 | unsigned long start, size; |
@@ -59,12 +51,13 @@ static int __init early_initrd(char *p) | |||
59 | if (*endp == ',') { | 51 | if (*endp == ',') { |
60 | size = memparse(endp + 1, NULL); | 52 | size = memparse(endp + 1, NULL); |
61 | 53 | ||
62 | phys_initrd_start = start; | 54 | initrd_start = (unsigned long)__va(start); |
63 | phys_initrd_size = size; | 55 | initrd_end = (unsigned long)__va(start + size); |
64 | } | 56 | } |
65 | return 0; | 57 | return 0; |
66 | } | 58 | } |
67 | early_param("initrd", early_initrd); | 59 | early_param("initrd", early_initrd); |
60 | #endif | ||
68 | 61 | ||
69 | #define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT) | 62 | #define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT) |
70 | 63 | ||
@@ -137,13 +130,8 @@ void __init arm64_memblock_init(void) | |||
137 | /* Register the kernel text, kernel data and initrd with memblock */ | 130 | /* Register the kernel text, kernel data and initrd with memblock */ |
138 | memblock_reserve(__pa(_text), _end - _text); | 131 | memblock_reserve(__pa(_text), _end - _text); |
139 | #ifdef CONFIG_BLK_DEV_INITRD | 132 | #ifdef CONFIG_BLK_DEV_INITRD |
140 | if (phys_initrd_size) { | 133 | if (initrd_start) |
141 | memblock_reserve(phys_initrd_start, phys_initrd_size); | 134 | memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start); |
142 | |||
143 | /* Now convert initrd to virtual addresses */ | ||
144 | initrd_start = __phys_to_virt(phys_initrd_start); | ||
145 | initrd_end = initrd_start + phys_initrd_size; | ||
146 | } | ||
147 | #endif | 135 | #endif |
148 | 136 | ||
149 | /* | 137 | /* |