Hari Bathini <hbath...@linux.vnet.ibm.com> writes: > On Wednesday 26 April 2017 04:02 PM, Michael Ellerman wrote: >> Hari Bathini <hbath...@linux.vnet.ibm.com> writes: >> >>> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c >>> index 8ff0dd4..87edc7b 100644 >>> --- a/arch/powerpc/kernel/fadump.c >>> +++ b/arch/powerpc/kernel/fadump.c >>> @@ -338,6 +343,36 @@ unsigned long __init arch_reserved_kernel_pages(void) >>> return memblock_reserved_size() / PAGE_SIZE; >>> } >>> >>> +static void __init parse_fadump_append_params(const char *p) >>> +{ >>> + static char fadump_cmdline[COMMAND_LINE_SIZE] __initdata; >>> + char *token; >>> + >>> + strlcpy(fadump_cmdline, p, COMMAND_LINE_SIZE); >>> + token = strchr(fadump_cmdline, ','); >>> + while (token) { >>> + *token = ' '; >>> + token = strchr(token, ','); >>> + } >>> + >>> + pr_info("enforcing additional parameters (%s) passed through " >>> + "'fadump_append=' parameter\n", fadump_cmdline); >>> + parse_early_options(fadump_cmdline); >> Using parse_early_options() means it only works for parameters defined >> with early_param() or __setup() doesn't it? > > Yeah. Actually, is it better to change commandline from "$params > fadump_append=nr_cpus=1,numa=off" > to "$params nr_cpus=1 numa=off" early in the boot process?
It's not better, it's more confusing for a user, because the command line looks different to what they specified. But it might be the only option because I don't know if there's an easy way to trigger parsing for the non-early options. cheers