From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wCby33ZYJzDq9m for ; Wed, 26 Apr 2017 20:32:59 +1000 (AEST) From: Michael Ellerman To: Hari Bathini Cc: linuxppc-dev , Michal =?utf-8?Q?Such=C3=A1nek?= , Mahesh J Salgaonkar Subject: Re: [PATCH v3 1/2] powerpc/fadump: reduce memory consumption for capture kernel In-Reply-To: <149319210065.14869.5547128856388591456.stgit@hbathini.in.ibm.com> References: <149319210065.14869.5547128856388591456.stgit@hbathini.in.ibm.com> Date: Wed, 26 Apr 2017 20:32:55 +1000 Message-ID: <87o9vj1mso.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hari Bathini 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