xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: tim@xen.org, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH v4] xen: arm: Only lookup kernel/initrd bootmodule once while building dom0.
Date: Mon, 21 Jul 2014 13:20:54 +0100	[thread overview]
Message-ID: <53CD05A6.2020203@linaro.org> (raw)
In-Reply-To: <1405944556-8372-1-git-send-email-ian.campbell@citrix.com>

On 07/21/2014 01:09 PM, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> v4: Call the new field kernel_bootmodule for clarity
>     Use the new field throughout kernel.c as well as in domain_build.c
>     Add and use initrd_bootmodule too.
>     Const up the uses
> v3: New patch
> ---
>  xen/arch/arm/domain_build.c |    6 +++---
>  xen/arch/arm/kernel.c       |    2 ++
>  xen/arch/arm/kernel.h       |    1 +
>  3 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 154367e..23261e4 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -405,7 +405,7 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
>      int res = 0;
>      int had_dom0_bootargs = 0;
>  
> -    struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_KERNEL);
> +    const struct bootmodule *mod = kinfo->kernel_bootmodule;
>  
>      if ( mod && mod->cmdline[0] )
>          bootargs = &mod->cmdline[0];
> @@ -455,7 +455,7 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
>  
>      if ( dt_node_path_is_equal(node, "/chosen") )
>      {
> -        struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_RAMDISK);
> +        const struct bootmodule *mod = kinfo->initrd_bootmodule;

Technically speaking, we only execute once this part of the code. So
having a new field in kernel_info doesn't seem useful.

BTW, the function already have a variable "mod" defined at the begining.
I would rename this variable to modinitrd or smth different to shadow
the previous variable.

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-07-21 12:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 12:09 [PATCH v4] xen: arm: Only lookup kernel/initrd bootmodule once while building dom0 Ian Campbell
2014-07-21 12:20 ` Julien Grall [this message]
2014-07-21 12:24   ` Ian Campbell
2014-07-21 12:30     ` Julien Grall
2014-07-24 15:51       ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53CD05A6.2020203@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).