From: Julien Grall <julien.grall@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
xen-devel@lists.xensource.com
Cc: ian.campbell@citrix.com
Subject: Re: [PATCH v4 2/2] xen/arm: support gzip compressed kernels
Date: Thu, 3 Sep 2015 19:27:33 +0100 [thread overview]
Message-ID: <55E89115.2040800@citrix.com> (raw)
In-Reply-To: <1441302896-7621-2-git-send-email-stefano.stabellini@eu.citrix.com>
Hi Stefano,
On 03/09/15 18:54, Stefano Stabellini wrote:
> Free the memory used for the compressed kernel and update the relative
> mod->start and mod->size parameters with the uncompressed ones.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> CC: julien.grall@citrix.com
> CC: ian.campbell@citrix.com
With the 2 comments coding style changes, see below:
Reviewed-by: Julien Grall <julien.grall@citrix.com>
[...]
> +static __init int kernel_decompress(struct kernel_info *info,
> + paddr_t *addr, paddr_t *size)
> +{
[...]
> + end = output + (1 << (kernel_order_out + PAGE_SHIFT));
> + /* Need to free pages after output_size here because they won't be
> + * freed by discard_initial_modules */
Multi-line comment on Xen should be:
/*
* Need ...
* freed ...
*/
> + output += (output_size + PAGE_SIZE - 1) & PAGE_MASK;
> + for ( ; output < end; output += PAGE_SIZE )
> + free_domheap_page(virt_to_page(output));
> +
> + return 0;
> +}
> +
> #ifdef CONFIG_ARM_64
> /*
> * Check if the image is a 64-bit Image.
> @@ -463,6 +520,20 @@ int kernel_probe(struct kernel_info *info)
> printk("Loading ramdisk from boot module @ %"PRIpaddr"\n",
> info->initrd_bootmodule->start);
>
> + /* if it is a gzip'ed image, 32bit or 64bit, uncompress it */
> + rc = kernel_decompress(info, &start, &size);
> + if (rc < 0 && rc != -EINVAL)
> + return rc;
> + else if (!rc)
> + {
> + /* Free the original kernel, update the pointers to the
> + * decompressed kernel */
Ditto
> + dt_unreserved_regions(mod->start, mod->start + mod->size,
> + init_domheap_pages, 0);
> + mod->start = start;
> + mod->size = size;
> + }
> +
> #ifdef CONFIG_ARM_64
> rc = kernel_zimage64_probe(info, start, size);
> if (rc < 0)
Regards,
--
Julien Grall
prev parent reply other threads:[~2015-09-03 18:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 17:50 [PATCH v4 0/2] support gzipped kernels on arm Stefano Stabellini
2015-09-03 17:54 ` [PATCH v4 1/2] xen: move perform_gunzip to common Stefano Stabellini
2015-09-03 17:54 ` [PATCH v4 2/2] xen/arm: support gzip compressed kernels Stefano Stabellini
2015-09-03 18:27 ` Julien Grall [this message]
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=55E89115.2040800@citrix.com \
--to=julien.grall@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.