diff options
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index df47316f1aee..32b5b05082ea 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1224,14 +1224,6 @@ static void __init prom_init_mem(void) | |||
1224 | 1224 | ||
1225 | RELOC(alloc_bottom) = PAGE_ALIGN((unsigned long)&RELOC(_end) + 0x4000); | 1225 | RELOC(alloc_bottom) = PAGE_ALIGN((unsigned long)&RELOC(_end) + 0x4000); |
1226 | 1226 | ||
1227 | /* Check if we have an initrd after the kernel, if we do move our bottom | ||
1228 | * point to after it | ||
1229 | */ | ||
1230 | if (RELOC(prom_initrd_start)) { | ||
1231 | if (RELOC(prom_initrd_end) > RELOC(alloc_bottom)) | ||
1232 | RELOC(alloc_bottom) = PAGE_ALIGN(RELOC(prom_initrd_end)); | ||
1233 | } | ||
1234 | |||
1235 | /* | 1227 | /* |
1236 | * If prom_memory_limit is set we reduce the upper limits *except* for | 1228 | * If prom_memory_limit is set we reduce the upper limits *except* for |
1237 | * alloc_top_high. This must be the real top of RAM so we can put | 1229 | * alloc_top_high. This must be the real top of RAM so we can put |
@@ -1269,6 +1261,15 @@ static void __init prom_init_mem(void) | |||
1269 | RELOC(alloc_top) = RELOC(rmo_top); | 1261 | RELOC(alloc_top) = RELOC(rmo_top); |
1270 | RELOC(alloc_top_high) = RELOC(ram_top); | 1262 | RELOC(alloc_top_high) = RELOC(ram_top); |
1271 | 1263 | ||
1264 | /* | ||
1265 | * Check if we have an initrd after the kernel but still inside | ||
1266 | * the RMO. If we do move our bottom point to after it. | ||
1267 | */ | ||
1268 | if (RELOC(prom_initrd_start) && | ||
1269 | RELOC(prom_initrd_start) < RELOC(rmo_top) && | ||
1270 | RELOC(prom_initrd_end) > RELOC(alloc_bottom)) | ||
1271 | RELOC(alloc_bottom) = PAGE_ALIGN(RELOC(prom_initrd_end)); | ||
1272 | |||
1272 | prom_printf("memory layout at init:\n"); | 1273 | prom_printf("memory layout at init:\n"); |
1273 | prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit)); | 1274 | prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit)); |
1274 | prom_printf(" alloc_bottom : %x\n", RELOC(alloc_bottom)); | 1275 | prom_printf(" alloc_bottom : %x\n", RELOC(alloc_bottom)); |