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] xen: arm: Select ramdisk bootmodule early enough when building dom0
Date: Sat, 26 Jul 2014 22:31:04 +0100	[thread overview]
Message-ID: <53D41E18.8040208@linaro.org> (raw)
In-Reply-To: <e2249c527e99f739553b14f76ab2225d90160a9f.1406361863.git.ian.campbell@citrix.com>

Hi Ian,

On 26/07/14 09:04, Ian Campbell wrote:
> I thought in 0040b649d6df "xen: arm: Only lookup kernel/initrd bootmodule once
> while building dom0" that I had identified place_modules as being soon enough,
> but I was wrong, since write_properties wants to use it sooner.
>
> Select the initrd boot module in kernel_probe at the same time we select the
> kernel to avoid all this.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>

Regards,

> ---
>   xen/arch/arm/kernel.c |    8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
> index 6912abd..31a9a85 100644
> --- a/xen/arch/arm/kernel.c
> +++ b/xen/arch/arm/kernel.c
> @@ -68,7 +68,7 @@ static void place_modules(struct kernel_info *info,
>                             paddr_t kernbase, paddr_t kernend)
>   {
>       /* Align DTB and initrd size to 2Mb. Linux only requires 4 byte alignment */
> -    const struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_RAMDISK);
> +    const struct bootmodule *mod = info->initrd_bootmodule;
>       const paddr_t initrd_len = ROUNDUP(mod ? mod->size : 0, MB(2));
>       const paddr_t dtb_len = ROUNDUP(fdt_totalsize(info->fdt), MB(2));
>       const paddr_t modsize = initrd_len + dtb_len;
> @@ -116,7 +116,6 @@ static void place_modules(struct kernel_info *info,
>
>       info->dtb_paddr = modbase;
>       info->initrd_paddr = info->dtb_paddr + dtb_len;
> -    info->initrd_bootmodule = mod;
>   }
>
>   static paddr_t kernel_zimage_place(struct kernel_info *info)
> @@ -390,6 +389,11 @@ int kernel_probe(struct kernel_info *info)
>
>       printk("Loading kernel from boot module @ %"PRIpaddr"\n", start);
>
> +    info->initrd_bootmodule = boot_module_find_by_kind(BOOTMOD_RAMDISK);
> +    if ( info->initrd_bootmodule )
> +        printk("Loading ramdisk from boot module @ %"PRIpaddr"\n",
> +               info->initrd_bootmodule->start);
> +
>   #ifdef CONFIG_ARM_64
>       rc = kernel_image64_probe(info, start, size);
>       if (rc < 0)
>

-- 
Julien Grall

  reply	other threads:[~2014-07-26 21:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26  8:04 [PATCH] xen: arm: Select ramdisk bootmodule early enough when building dom0 Ian Campbell
2014-07-26 21:31 ` Julien Grall [this message]
2014-07-27  8:42   ` 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=53D41E18.8040208@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).