All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org,
	andre.przywara@linaro.org, xen-devel@lists.xen.org
Subject: Re: [PATCH v2 4/9] xen/arm: do not relocate Xen outside of visible RAM
Date: Fri, 13 Sep 2013 14:06:32 +0100	[thread overview]
Message-ID: <52330DD8.3080807@linaro.org> (raw)
In-Reply-To: <1379072437-28099-4-git-send-email-ian.campbell@citrix.com>

On 09/13/2013 12:40 PM, Ian Campbell wrote:
> Since we do not handle non-contiguous banks of memory lets avoid relocatting
s/relocatting/relocating/
> Xen into such a bank. Avoids issues such as free_init_memory releasing pages
> which are outside of the frametable.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  xen/arch/arm/setup.c |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index ab3d9aa..8d8028c 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -240,17 +240,24 @@ static paddr_t __init get_xen_paddr(void)
>  {
>      struct dt_mem_info *mi = &early_info.mem;
>      paddr_t min_size;
> -    paddr_t paddr = 0;
> +    paddr_t paddr = 0, last_end;
>      int i;
>  
>      min_size = (_end - _start + (XEN_PADDR_ALIGN-1)) & ~(XEN_PADDR_ALIGN-1);
>  
> +    last_end = mi->bank[0].start;
> +
>      /* Find the highest bank with enough space. */
>      for ( i = 0; i < mi->nr_banks; i++ )
>      {
>          const struct membank *bank = &mi->bank[i];
>          paddr_t s, e;
>  
> +        if ( last_end != bank->start )
> +            break;
> +

Can you add a comment in the code to specify that we are relocating Xen
in a "contiguous bank"?

> +        last_end = bank->start + bank->size;
> +
>          if ( bank->size >= min_size )
>          {
>              e = consider_modules(bank->start, bank->start + bank->size,
> 

-- 
Julien Grall

  reply	other threads:[~2013-09-13 13:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 11:40 [PATCH v2 0/9] xen: arm: memory mangement fixes / improvements Ian Campbell
2013-09-13 11:40 ` [PATCH v2 1/9] xen/arm: ensure the xenheap is 32MB aligned Ian Campbell
2013-09-13 11:40 ` [PATCH v2 2/9] xen/arm: DOMHEAP_SECOND_PAGES is arm32 specific Ian Campbell
2013-09-13 12:55   ` Julien Grall
2013-09-13 11:40 ` [PATCH v2 3/9] xen/arm: Reserve FDT via early module mechanism Ian Campbell
2013-09-13 13:04   ` Julien Grall
2013-09-13 13:08     ` Ian Campbell
2013-09-13 11:40 ` [PATCH v2 4/9] xen/arm: do not relocate Xen outside of visible RAM Ian Campbell
2013-09-13 13:06   ` Julien Grall [this message]
2013-09-13 11:40 ` [PATCH v2 5/9] xen/arm: cope with modules outside of "visible" RAM Ian Campbell
2013-09-13 13:08   ` Julien Grall
2013-09-13 11:40 ` [PATCH v2 6/9] xen/arm: Support dtb /memreserve/ regions Ian Campbell
2013-09-13 11:40 ` [PATCH v2 7/9] xen/arm: rename boot misc region to boot reloc now it has a single purpose Ian Campbell
2013-09-13 13:17   ` Julien Grall
2013-09-13 11:40 ` [PATCH v2 8/9] xen/arm: print the location of the Xen heap on 32 bit Ian Campbell
2013-09-13 13:20   ` Julien Grall
2013-09-13 11:40 ` [PATCH v2 9/9] xen: support RAM at addresses 0 and 4096 Ian Campbell
2013-09-13 11:48   ` Keir Fraser
2013-09-13 11:57   ` Jan Beulich
2013-09-13 12:23     ` 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=52330DD8.3080807@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=andre.przywara@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 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.