All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Julien Grall <julien.grall@arm.com>
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>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2] make use of .startof.() and .sizeof.() assembler expressions
Date: Tue, 30 Aug 2016 07:09:10 -0600	[thread overview]
Message-ID: <57C5A196020000780010A300@prv-mh.provo.novell.com> (raw)
In-Reply-To: <bf1a1491-c6fe-bfc5-b2b7-018f9b49d17d@arm.com>

>>> On 30.08.16 at 14:50, <julien.grall@arm.com> wrote:
> 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.

.startof.(section_which_not_exist) gives a linker error. And ld
doesn't add to the section table any sections mentioned in the
linker script, but without constituents.

> 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.

While I don't think this needs to be broken out, it certainly can (but
then really there should have been a conditional like the one I
introduce from the beginning, to avoid having dead code in a non-
ACPI enabled binary).

>> --- 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.

Why should that be removed? _stext doesn't cease to exist:

--- a/xen/include/xen/kernel.h
+++ b/xen/include/xen/kernel.h
@@ -71,24 +71,34 @@ extern char _start[], _end[], start[];
     (__p >= _start) && (__p < _end);            \
 })
 
-extern char _stext[], _etext[];
+extern const char _stext[] asm(".startof.(.text)");
+extern const char _etext[];
 #define is_kernel_text(p) ({                    \

Jan


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

  reply	other threads:[~2016-08-30 13:09 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
2016-08-30 13:09   ` Jan Beulich [this message]
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=57C5A196020000780010A300@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.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.