diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-05-17 21:16:11 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-05-19 01:02:18 -0400 |
commit | 35dd54326e857f1648c7cc1028e8d5e1dbe04992 (patch) | |
tree | dea05effa25bc751d1b777a0b80f0f46d3ff0b8e /arch/powerpc/kernel/prom_init.c | |
parent | 473104134b35ce1c3ca77b738c561d6c215adc1b (diff) |
[PATCH] powerpc: Move crashkernel= handling into the kernel.
This was missing a quilt ref.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index a52377c68fc6..2442361772e2 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -200,11 +200,6 @@ static unsigned long __initdata alloc_bottom; | |||
200 | static unsigned long __initdata rmo_top; | 200 | static unsigned long __initdata rmo_top; |
201 | static unsigned long __initdata ram_top; | 201 | static unsigned long __initdata ram_top; |
202 | 202 | ||
203 | #ifdef CONFIG_KEXEC | ||
204 | static unsigned long __initdata prom_crashk_base; | ||
205 | static unsigned long __initdata prom_crashk_size; | ||
206 | #endif | ||
207 | |||
208 | static struct mem_map_entry __initdata mem_reserve_map[MEM_RESERVE_MAP_SIZE]; | 203 | static struct mem_map_entry __initdata mem_reserve_map[MEM_RESERVE_MAP_SIZE]; |
209 | static int __initdata mem_reserve_cnt; | 204 | static int __initdata mem_reserve_cnt; |
210 | 205 | ||
@@ -591,35 +586,6 @@ static void __init early_cmdline_parse(void) | |||
591 | RELOC(iommu_force_on) = 1; | 586 | RELOC(iommu_force_on) = 1; |
592 | } | 587 | } |
593 | #endif | 588 | #endif |
594 | |||
595 | #ifdef CONFIG_KEXEC | ||
596 | /* | ||
597 | * crashkernel=size@addr specifies the location to reserve for | ||
598 | * crash kernel. | ||
599 | */ | ||
600 | opt = strstr(RELOC(prom_cmd_line), RELOC("crashkernel=")); | ||
601 | if (opt) { | ||
602 | opt += 12; | ||
603 | RELOC(prom_crashk_size) = | ||
604 | prom_memparse(opt, (const char **)&opt); | ||
605 | |||
606 | if (ALIGN(RELOC(prom_crashk_size), 0x1000000) != | ||
607 | RELOC(prom_crashk_size)) { | ||
608 | prom_printf("Warning: crashkernel size is not " | ||
609 | "aligned to 16MB\n"); | ||
610 | } | ||
611 | |||
612 | /* | ||
613 | * At present, the crash kernel always run at 32MB. | ||
614 | * Just ignore whatever user passed. | ||
615 | */ | ||
616 | RELOC(prom_crashk_base) = 0x2000000; | ||
617 | if (*opt == '@') { | ||
618 | prom_printf("Warning: PPC64 kdump kernel always runs " | ||
619 | "at 32 MB\n"); | ||
620 | } | ||
621 | } | ||
622 | #endif | ||
623 | } | 589 | } |
624 | 590 | ||
625 | #ifdef CONFIG_PPC_PSERIES | 591 | #ifdef CONFIG_PPC_PSERIES |
@@ -1122,12 +1088,6 @@ static void __init prom_init_mem(void) | |||
1122 | prom_printf(" alloc_top_hi : %x\n", RELOC(alloc_top_high)); | 1088 | prom_printf(" alloc_top_hi : %x\n", RELOC(alloc_top_high)); |
1123 | prom_printf(" rmo_top : %x\n", RELOC(rmo_top)); | 1089 | prom_printf(" rmo_top : %x\n", RELOC(rmo_top)); |
1124 | prom_printf(" ram_top : %x\n", RELOC(ram_top)); | 1090 | prom_printf(" ram_top : %x\n", RELOC(ram_top)); |
1125 | #ifdef CONFIG_KEXEC | ||
1126 | if (RELOC(prom_crashk_base)) { | ||
1127 | prom_printf(" crashk_base : %x\n", RELOC(prom_crashk_base)); | ||
1128 | prom_printf(" crashk_size : %x\n", RELOC(prom_crashk_size)); | ||
1129 | } | ||
1130 | #endif | ||
1131 | } | 1091 | } |
1132 | 1092 | ||
1133 | 1093 | ||
@@ -2187,10 +2147,6 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2187 | */ | 2147 | */ |
2188 | prom_init_mem(); | 2148 | prom_init_mem(); |
2189 | 2149 | ||
2190 | #ifdef CONFIG_KEXEC | ||
2191 | if (RELOC(prom_crashk_base)) | ||
2192 | reserve_mem(RELOC(prom_crashk_base), RELOC(prom_crashk_size)); | ||
2193 | #endif | ||
2194 | /* | 2150 | /* |
2195 | * Determine which cpu is actually running right _now_ | 2151 | * Determine which cpu is actually running right _now_ |
2196 | */ | 2152 | */ |
@@ -2243,16 +2199,6 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2243 | } | 2199 | } |
2244 | #endif | 2200 | #endif |
2245 | 2201 | ||
2246 | #ifdef CONFIG_KEXEC | ||
2247 | if (RELOC(prom_crashk_base)) { | ||
2248 | prom_setprop(_prom->chosen, "/chosen", "linux,crashkernel-base", | ||
2249 | PTRRELOC(&prom_crashk_base), | ||
2250 | sizeof(RELOC(prom_crashk_base))); | ||
2251 | prom_setprop(_prom->chosen, "/chosen", "linux,crashkernel-size", | ||
2252 | PTRRELOC(&prom_crashk_size), | ||
2253 | sizeof(RELOC(prom_crashk_size))); | ||
2254 | } | ||
2255 | #endif | ||
2256 | /* | 2202 | /* |
2257 | * Fixup any known bugs in the device-tree | 2203 | * Fixup any known bugs in the device-tree |
2258 | */ | 2204 | */ |