diff options
author | Suzuki K. Poulose <suzuki@in.ibm.com> | 2012-05-24 11:39:45 +0530 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2012-07-13 15:32:15 +0900 |
commit | f429692c74c7ebd674b9d378326aab1b5d0225ed (patch) | |
tree | 191b33ebb50d13ac56ba90bafebb912439911311 /kexec/arch/ppc/crashdump-powerpc.c | |
parent | 455d79f57e9367e5c59093fd74798905bd5762fc (diff) |
Do not reserve cpu spin-table for crash kernel
As of now, the kexec reserves the spin-table for all the CPUs
on an SMP machine. The spin-table is pointed to by the
cpu-release-addr property in the device-tree. Reserving the
spin-table in the crash kernel will cause a BUG(), if the table
lies outside the memory reserved for the crashkernel.
Disable reserving the spin-table regions and use maxcpus=1 to
use only the crashing CPU to boot the crash kernel.
Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/ppc/crashdump-powerpc.c')
-rw-r--r-- | kexec/arch/ppc/crashdump-powerpc.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/kexec/arch/ppc/crashdump-powerpc.c b/kexec/arch/ppc/crashdump-powerpc.c index 1bef69b..4c8c75d 100644 --- a/kexec/arch/ppc/crashdump-powerpc.c +++ b/kexec/arch/ppc/crashdump-powerpc.c @@ -262,10 +262,19 @@ static void ulltoa(unsigned long long i, char *str) } } +/* Append str to cmdline */ +static void add_cmdline(char *cmdline, char *str) +{ + int cmdlen = strlen(cmdline) + strlen(str); + if (cmdlen > (COMMAND_LINE_SIZE - 1)) + die("Command line overflow\n"); + strcat(cmdline, str); +} + static int add_cmdline_param(char *cmdline, unsigned long long addr, char *cmdstr, char *byte) { - int cmdlen, len, align = 1024; + int align = 1024; char str[COMMAND_LINE_SIZE], *ptr; /* Passing in =xxxK / =xxxM format. Saves space required in cmdline.*/ @@ -284,11 +293,8 @@ static int add_cmdline_param(char *cmdline, unsigned long long addr, ptr += strlen(str); ulltoa(addr, ptr); strcat(str, byte); - len = strlen(str); - cmdlen = strlen(cmdline) + len; - if (cmdlen > (COMMAND_LINE_SIZE - 1)) - die("Command line overflow\n"); - strcat(cmdline, str); + + add_cmdline(cmdline, str); dbgprintf("Command line after adding elfcorehdr: %s\n", cmdline); @@ -365,6 +371,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline, */ add_cmdline_param(mod_cmdline, elfcorehdr, " elfcorehdr=", "K"); add_cmdline_param(mod_cmdline, saved_max_mem, " savemaxmem=", "M"); + add_cmdline(mod_cmdline, " maxcpus=1"); return 0; } |