[PATCH v3 1/2] powerpc/fadump: reduce memory consumption for capture kernel
Michael Ellerman
mpe at ellerman.id.au
Wed Apr 26 20:32:55 AEST 2017
Hari Bathini <hbathini at 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?
That might be OK but at least you need to clearly document it.
cheers
More information about the Linuxppc-dev
mailing list