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 v3 6/6] xen: arm: Correctly use GLOBAL/ENTRY in head.S, avoid .global
Date: Mon, 21 Jul 2014 15:18:44 +0100	[thread overview]
Message-ID: <53CD2144.2000002@linaro.org> (raw)
In-Reply-To: <1405947600-26047-6-git-send-email-ian.campbell@citrix.com>

Hi Ian,

On 07/21/2014 02:00 PM, Ian Campbell wrote:
> Use ENTRY() for function entry points since it ensures correct
> alignment where GLOBAL() doesn't. The exception is the initial start
> label which must be at offset 0, so just use GLOBAL() to avoid the
> possibility of realignment.
> 
> Since everything happens to already be aligned there should be no
> difference to the actual binary. objdump agrees.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>

Regards,

> ---
> v3: New patch
> ---
>  xen/arch/arm/arm32/head.S |    8 +++-----
>  xen/arch/arm/arm64/head.S |    8 +++-----
>  2 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
> index 14b172f..6573a42 100644
> --- a/xen/arch/arm/arm32/head.S
> +++ b/xen/arch/arm/arm32/head.S
> @@ -76,8 +76,7 @@
>           * It should be linked at XEN_VIRT_START, and loaded at any
>           * 4K-aligned address.  All of text+data+bss must fit in 2MB,
>           * or the initial pagetable code below will need adjustment. */
> -        .global start
> -start:
> +GLOBAL(start)
>          /* zImage magic header, see:
>           * http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html#d0e309
>           */
> @@ -583,16 +582,15 @@ hex:    .ascii "0123456789abcdef"
>  
>  #else  /* CONFIG_EARLY_PRINTK */
>  
> +ENTRY(early_puts)
>  init_uart:
> -.global early_puts
> -early_puts:
>  puts:
>  putn:   mov   pc, lr
>  
>  #endif /* !CONFIG_EARLY_PRINTK */
>  
>  /* This provides a C-API version of __lookup_processor_type */
> -GLOBAL(lookup_processor_type)
> +ENTRY(lookup_processor_type)
>          stmfd sp!, {r4, r10, lr}
>          mov   r10, #0                   /* r10 := offset between virt&phys */
>          bl    __lookup_processor_type
> diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
> index 9497ca1..99cc6e0 100644
> --- a/xen/arch/arm/arm64/head.S
> +++ b/xen/arch/arm/arm64/head.S
> @@ -100,8 +100,7 @@
>           * or the initial pagetable code below will need adjustment.
>           */
>  
> -        .global start
> -start:
> +GLOBAL(start)
>          /*
>           * DO NOT MODIFY. Image header expected by Linux boot-loaders.
>           */
> @@ -604,9 +603,8 @@ hex:    .ascii "0123456789abcdef"
>  
>  #else  /* CONFIG_EARLY_PRINTK */
>  
> +ENTRY(early_puts)
>  init_uart:
> -.global early_puts
> -early_puts:
>  puts:
>  putn:   ret
>  
> @@ -615,7 +613,7 @@ putn:   ret
>  /* This provides a C-API version of __lookup_processor_type
>   * TODO: For now, the implementation return NULL every time
>   */
> -GLOBAL(lookup_processor_type)
> +ENTRY(lookup_processor_type)
>          mov  x0, #0
>          ret
>  
> 


-- 
Julien Grall

      reply	other threads:[~2014-07-21 14:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 12:58 [PATCH v3 0/6] xen: arm: various improvements to boot time page table handling Ian Campbell
2014-07-21 12:59 ` [PATCH v3 1/6] xen: arm: correct whitespace/comments and use #defines in head.S Ian Campbell
2014-07-21 12:59   ` [PATCH v3 2/6] xen: arm: Handle 4K aligned hypervisor load address Ian Campbell
2014-07-21 13:20     ` Tim Deegan
2014-07-21 13:29       ` Ian Campbell
2014-07-21 13:38         ` Tim Deegan
2014-07-21 13:46           ` Ian Campbell
2014-07-21 14:16     ` Julien Grall
2014-07-21 12:59   ` [PATCH v3 3/6] xen: arm: Do not use level 0 section mappings in boot page tables Ian Campbell
2014-07-21 12:59   ` [PATCH v3 4/6] xen: arm: avoid unnecessary additional " Ian Campbell
2014-07-21 12:59   ` [PATCH v3 5/6] xen: arm: ensure that the boot code is <4K in size Ian Campbell
2014-07-21 13:00   ` [PATCH v3 6/6] xen: arm: Correctly use GLOBAL/ENTRY in head.S, avoid .global Ian Campbell
2014-07-21 14:18     ` 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=53CD2144.2000002@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).