]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] Fix crashkernel= handling when no crashkernel= specified
authorMichael Ellerman <michael@ellerman.id.au>
Wed, 30 Apr 2008 04:47:12 +0000 (14:47 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 30 Apr 2008 09:49:48 +0000 (19:49 +1000)
commitf57d5eadb5b16521f947cbd1430ec10cd36294ad
tree63899a91d207c3b72ddae1984742e1438b4a7e9b
parent0d1d36b0204d45a84357d509d9147947d527d4f2
[POWERPC] Fix crashkernel= handling when no crashkernel= specified

Commit 43ae16ea51d7ad5ba535e3f17d58f49d8542f8f4 (Use extended crashkernel
command line on ppc64), changed the logic in reserve_crashkernel()
which deals with the crashkernel= command line option.

This introduced a bug in the case when there is no crashkernel= option,
or it is incorrect.  We would fall through and calculate the crash_size
based on the existing values in crashk_res.  If both start and end are 0,
the default, we calculate the crash_size as 1 byte - which is wrong.

Rework the logic so that we use crashk_res, regardless of whether it's
set by the command line or via the device tree (see prom.c).  Then check
if we have an empty range (end == start), and if so make sure to set
both end and start to zero (this is checked in machine_kexec_64.c).  Then
we calculate the crash_size once we know we have a non-zero range.

Finally we always want to warn the user if they specify a base != 32MB,
so remove the special case for that in the command line parsing case.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/machine_kexec.c