X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fpowerpc%2Fkernel%2Fmachine_kexec.c;h=ac2a21f45c757a41f8ab639abca5a449d6576207;hb=54622f10a6aabb8bb2bdacf3dd070046f03dc246;hp=2d202f274e7384722a0584a224b415420ee5ed11;hpb=2e561c7b7e705b619122e5386d6f99f28f2b6e5a;p=linux-2.6-omap-h63xx.git diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index 2d202f274e7..ac2a21f45c7 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c @@ -48,7 +48,7 @@ void machine_kexec_cleanup(struct kimage *image) * Do not allocate memory (or fail in any way) in machine_kexec(). * We are past the point of no return, committed to rebooting now. */ -NORET_TYPE void machine_kexec(struct kimage *image) +void machine_kexec(struct kimage *image) { if (ppc_md.machine_kexec) ppc_md.machine_kexec(image); @@ -74,25 +74,27 @@ void __init reserve_crashkernel(void) ret = parse_crashkernel(boot_command_line, lmb_phys_mem_size(), &crash_size, &crash_base); if (ret == 0 && crash_size > 0) { - if (crash_base == 0) - crash_base = KDUMP_KERNELBASE; crashk_res.start = crash_base; - } else { - /* handle the device tree */ - crash_size = crashk_res.end - crashk_res.start + 1; + crashk_res.end = crash_base + crash_size - 1; } - if (crash_size == 0) + if (crashk_res.end == crashk_res.start) { + crashk_res.start = crashk_res.end = 0; return; + } /* We might have got these values via the command line or the * device tree, either way sanitise them now. */ + crash_size = crashk_res.end - crashk_res.start + 1; + +#ifndef CONFIG_RELOCATABLE if (crashk_res.start != KDUMP_KERNELBASE) printk("Crash kernel location must be 0x%x\n", KDUMP_KERNELBASE); crashk_res.start = KDUMP_KERNELBASE; +#endif crash_size = PAGE_ALIGN(crash_size); crashk_res.end = crashk_res.start + crash_size - 1;