All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
Cc: Tim Deegan <tim@xen.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v3] xen: arm: introduce uImage probe function for Dom0
Date: Tue, 26 Aug 2014 21:44:42 +0100	[thread overview]
Message-ID: <1409085882.28009.41.camel@citrix.com> (raw)
In-Reply-To: <1408614502-17074-1-git-send-email-oleksandr.dmytryshyn@globallogic.com>

On Thu, 2014-08-21 at 12:48 +0300, Oleksandr Dmytryshyn wrote:
> Patch adds a possibility to boot dom0 kernel from uImage.
> This is needed to improve boot-time. Comparing to zImage,
> uImage is not packed, therefore we can save time needed
> to unpack.
> 
> uImage header format:
> http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/image.h
> 
> Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>

Mostly looks good, a few minor things.

> +/*
> + * Uimage CPU Architecture Codes
> + */

I think we can get away with only defining the two arm ones here.

> +    start = be32_to_cpu(uimage.load);
> +    len = be32_to_cpu(uimage.size);
> +
> +    if ( len > size )

Does len include the header? (IOW do you need to subtract sizeof(uimage)
from something?)

> +    info->entry = info->zimage.start;
> +    info->load = kernel_zimage_load;
> +
> +#ifdef CONFIG_ARM_64
> +    if ( uimage->arch == IH_ARCH_ARM )
> +        info->type = DOMAIN_32BIT;
> +    else if ( uimage->arch == IH_ARCH_ARM64 )
> +        info->type = DOMAIN_64BIT;
> +    else

Use switch() rather than a cascade of else if please.

Ian.

  parent reply	other threads:[~2014-08-26 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21  9:48 [PATCH v3] xen: arm: introduce uImage probe function for Dom0 Oleksandr Dmytryshyn
2014-08-26  9:53 ` Andrii Tseglytskyi
2014-08-26 19:47   ` Ian Campbell
2014-08-26 20:44 ` Ian Campbell [this message]
2014-08-27  8:01   ` Oleksandr Dmytryshyn

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=1409085882.28009.41.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=oleksandr.dmytryshyn@globallogic.com \
    --cc=stefano.stabellini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.