From: Tim Deegan Subject: Re: [PATCH 16/16] arm: use /chosen/module1-args for domain 0 command line Date: Thu, 6 Sep 2012 14:50:20 +0100 Message-ID: <20120906135020.GO56463@ocelot.phlegethon.org> References: <1346678886.32462.9.camel@zakaz.uk.xensource.com> <1346679056-8108-16-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1346679056-8108-16-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 13:30 +0000 on 03 Sep (1346679056), Ian Campbell wrote: > Ideally this would use module1-args iff the kernel came from > module1-{start,end} and the existing xen,dom0-bootargs if the kernel > came from flash, but this approach is simpler and has the sme effect > in practice. > > Signed-off-by: Ian Campbell > --- > xen/arch/arm/domain_build.c | 23 ++++++++++++++++++++--- > 1 files changed, 20 insertions(+), 3 deletions(-) > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index e96ed10..2b65637 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -88,6 +88,8 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, > { > int prop; > > + int had_mod1_args = 0; > + > for ( prop = fdt_first_property_offset(fdt, node); > prop >= 0; > prop = fdt_next_property_offset(fdt, prop) ) > @@ -104,15 +106,30 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, > prop_len = fdt32_to_cpu(p->len); > > /* > - * In chosen node: replace bootargs with value from > - * xen,dom0-bootargs. > + * In chosen node: > + * > + * * replace bootargs with value from module1-args, falling > + * back to xen,dom0-bootargs if not present. > + * * remove all other module*. > */ > if ( device_tree_node_matches(fdt, node, "chosen") ) > { > if ( strcmp(prop_name, "bootargs") == 0 ) > continue; > - if ( strcmp(prop_name, "xen,dom0-bootargs") == 0 ) > + if ( strcmp(prop_name, "module1-args") == 0 ) > + { > prop_name = "bootargs"; > + had_mod1_args = 1; > + } > + if ( strncmp(prop_name, "module", strlen("module")) == 0 ) > + continue; ITYM "else if" here, or the module1-args property gets dropped too, doesn't it? Tim. > + if ( strcmp(prop_name, "xen,dom0-bootargs") == 0 ) > + { > + if ( had_mod1_args ) > + continue; > + else > + prop_name = "bootargs"; > + } > } > /* > * In a memory node: adjust reg property. > -- > 1.7.9.1 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel