aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/machine_kexec_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/machine_kexec_64.c')
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index a168514d8609..e6efec788c4d 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -255,11 +255,14 @@ static union thread_union kexec_stack
255/* Our assembly helper, in kexec_stub.S */ 255/* Our assembly helper, in kexec_stub.S */
256extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start, 256extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
257 void *image, void *control, 257 void *image, void *control,
258 void (*clear_all)(void)) ATTRIB_NORET; 258 void (*clear_all)(void),
259 unsigned long kdump_flag) ATTRIB_NORET;
259 260
260/* too late to fail here */ 261/* too late to fail here */
261void default_machine_kexec(struct kimage *image) 262void default_machine_kexec(struct kimage *image)
262{ 263{
264 unsigned long kdump_flag = 0;
265
263 /* prepare control code if any */ 266 /* prepare control code if any */
264 267
265 /* 268 /*
@@ -270,8 +273,10 @@ void default_machine_kexec(struct kimage *image)
270 * using debugger IPI. 273 * using debugger IPI.
271 */ 274 */
272 275
273 if (crashing_cpu == -1) 276 if (crashing_cpu == -1)
274 kexec_prepare_cpus(); 277 kexec_prepare_cpus();
278 else
279 kdump_flag = KDUMP_SIGNATURE;
275 280
276 /* switch to a staticly allocated stack. Based on irq stack code. 281 /* switch to a staticly allocated stack. Based on irq stack code.
277 * XXX: the task struct will likely be invalid once we do the copy! 282 * XXX: the task struct will likely be invalid once we do the copy!
@@ -284,7 +289,7 @@ void default_machine_kexec(struct kimage *image)
284 */ 289 */
285 kexec_sequence(&kexec_stack, image->start, image, 290 kexec_sequence(&kexec_stack, image->start, image,
286 page_address(image->control_code_page), 291 page_address(image->control_code_page),
287 ppc_md.hpte_clear_all); 292 ppc_md.hpte_clear_all, kdump_flag);
288 /* NOTREACHED */ 293 /* NOTREACHED */
289} 294}
290 295
@@ -312,11 +317,24 @@ static struct property kernel_end_prop = {
312static void __init export_htab_values(void) 317static void __init export_htab_values(void)
313{ 318{
314 struct device_node *node; 319 struct device_node *node;
320 struct property *prop;
315 321
316 node = of_find_node_by_path("/chosen"); 322 node = of_find_node_by_path("/chosen");
317 if (!node) 323 if (!node)
318 return; 324 return;
319 325
326 /* remove any stale propertys so ours can be found */
327 prop = of_find_property(node, kernel_end_prop.name, NULL);
328 if (prop)
329 prom_remove_property(node, prop);
330 prop = of_find_property(node, htab_base_prop.name, NULL);
331 if (prop)
332 prom_remove_property(node, prop);
333 prop = of_find_property(node, htab_size_prop.name, NULL);
334 if (prop)
335 prom_remove_property(node, prop);
336
337 /* information needed by userspace when using default_machine_kexec */
320 kernel_end = __pa(_end); 338 kernel_end = __pa(_end);
321 prom_add_property(node, &kernel_end_prop); 339 prom_add_property(node, &kernel_end_prop);
322 340