All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH v2] make use of .startof.() and .sizeof.() assembler expressions
Date: Tue, 30 Aug 2016 13:50:14 +0100	[thread overview]
Message-ID: <bf1a1491-c6fe-bfc5-b2b7-018f9b49d17d@arm.com> (raw)
In-Reply-To: <57BD6C6A020000780010876B@prv-mh.provo.novell.com>

Hi Jan,

On 24/08/16 08:44, Jan Beulich wrote:
> --- a/xen/arch/arm/device.c
> +++ b/xen/arch/arm/device.c
> @@ -21,8 +21,8 @@
>  #include <xen/errno.h>
>  #include <xen/lib.h>
>
> -extern const struct device_desc _sdevice[], _edevice[];
> -extern const struct acpi_device_desc _asdevice[], _aedevice[];
> +extern const struct device_desc _sdevice[] asm(".startof.(.dev.info)");
> +extern const struct device_desc _edevice[];
>
>  int __init device_init(struct dt_device_node *dev, enum device_class class,
>                         const void *data)
> @@ -51,6 +51,11 @@ int __init device_init(struct dt_device_
>      return -EBADF;
>  }
>
> +#ifdef CONFIG_ACPI

Why did you add the #ifdef CONFIG_ACPI here? It is not explained in the 
commit message.

If you want to add it, it should be a separate patch and we should go 
further by removing the section in the linker script.

> +
> +extern const struct acpi_device_desc _asdevice[] asm(".startof.(.adev.info)");
> +extern const struct acpi_device_desc _aedevice[];
> +
>  int __init acpi_device_init(enum device_class class, const void *data, int class_type)
>  {
>      const struct acpi_device_desc *desc;
> @@ -68,6 +73,8 @@ int __init acpi_device_init(enum device_
>      return -EBADF;
>  }
>
> +#endif
> +
>  enum device_class device_get_class(const struct dt_device_node *dev)
>  {
>      const struct device_desc *desc;
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -2058,7 +2058,7 @@ static void __init find_gnttab_region(st
>       * enough space for a large grant table
>       */
>      kinfo->gnttab_start = __pa(_stext);
> -    kinfo->gnttab_size = (_etext - _stext) & PAGE_MASK;
> +    kinfo->gnttab_size = _sizeof_text & PAGE_MASK;
>
>      /* Make sure the grant table will fit in the region */
>      if ( (kinfo->gnttab_size >> PAGE_SHIFT) < max_grant_frames )
> --- a/xen/arch/arm/platform.c
> +++ b/xen/arch/arm/platform.c
> @@ -22,7 +22,8 @@
>  #include <xen/init.h>
>  #include <asm/psci.h>
>
> -extern const struct platform_desc _splatform[], _eplatform[];
> +extern const struct platform_desc _splatform[] asm(".startof.(.arch.info)");
> +extern const struct platform_desc _eplatform[];
>
>  /* Pointer to the current platform description */
>  static const struct platform_desc *platform;
> --- a/xen/arch/arm/xen.lds.S
> +++ b/xen/arch/arm/xen.lds.S
> @@ -31,7 +31,6 @@ SECTIONS
>    . = XEN_VIRT_START;
>    _start = .;
>    .text : /* XXX should be AT ( XEN_PHYS_START ) */ {
> -        _stext = .;            /* Text section */

I don't see any removal of _stext in xen/arch/arm/alternative.c.

>         *(.text)
>         *(.text.cold)
>         *(.text.unlikely)
> @@ -42,7 +41,6 @@ SECTIONS
>
>    . = ALIGN(PAGE_SIZE);
>    .rodata : {
> -        _srodata = .;          /* Read-only data */
>          /* Bug frames table */
>         __start_bug_frames = .;
>         *(.bug_frames.0)
> @@ -104,21 +102,18 @@ SECTIONS
>
>    . = ALIGN(8);
>    .arch.info : {
> -      _splatform = .;
>        *(.arch.info)
>        _eplatform = .;
>    } :text
>
>    . = ALIGN(8);
>    .dev.info : {
> -      _sdevice = .;
>        *(.dev.info)
>        _edevice = .;
>    } :text
>
>    . = ALIGN(8);
>    .adev.info : {
> -      _asdevice = .;
>        *(.adev.info)
>        _aedevice = .;
>    } :text
> @@ -126,7 +121,6 @@ SECTIONS
>    . = ALIGN(PAGE_SIZE);             /* Init code and data */
>    __init_begin = .;
>    .init.text : {
> -       _sinittext = .;
>         *(.init.text)
>         _einittext = .;
>    } :text
> @@ -174,7 +168,6 @@ SECTIONS
>    __init_end = .;
>
>    .bss : {                     /* BSS */
> -       __bss_start = .;
>         *(.bss.stack_aligned)
>         . = ALIGN(PAGE_SIZE);
>         *(.bss.page_aligned)
> @@ -186,7 +179,6 @@ SECTIONS
>         *(.bss.percpu.read_mostly)
>         . = ALIGN(SMP_CACHE_BYTES);
>         __per_cpu_data_end = .;
> -       __bss_end = .;
>    } :text
>    _end = . ;

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-08-30 12:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24  7:44 [PATCH v2] make use of .startof.() and .sizeof.() assembler expressions Jan Beulich
2016-08-30 12:50 ` Julien Grall [this message]
2016-08-30 13:09   ` Jan Beulich
2016-08-30 13:18     ` Julien Grall
2016-08-30 15:15       ` Jan Beulich
2016-08-30 16:01         ` Julien Grall
2016-08-31 15:31 ` Andrew Cooper
2016-08-31 15:51   ` Jan Beulich

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=bf1a1491-c6fe-bfc5-b2b7-018f9b49d17d@arm.com \
    --to=julien.grall@arm.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.