From: Dario Faggioli <dario.faggioli@citrix.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>, xen-devel@lists.xen.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
Roger Pau Monne <roger.paumonne@citrix.com>
Subject: Re: [PATCH v1 1/7] lib: Add a generic implementation of current_text_addr()
Date: Tue, 10 May 2016 10:18:20 +0200 [thread overview]
Message-ID: <1462868300.4858.21.camel@citrix.com> (raw)
In-Reply-To: <1462549688-29263-2-git-send-email-ross.lagerwall@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 1496 bytes --]
[adding Roger]
On Fri, 2016-05-06 at 16:48 +0100, Ross Lagerwall wrote:
> Remove the unused x86 implementation.
>
Hey, this is actually very useful, for another thing I'm working on...
Thanks! :-P
> --- a/xen/common/lib.c
> +++ b/xen/common/lib.c
> @@ -499,6 +499,18 @@ void __init init_constructors(void)
> }
>
> /*
> + * The GCC docs state that the function must be marked noinline to
> have the
> + * expected result:
> + * "When inlining the expected behavior is that the function returns
> the
> + * address of the function that is returned to. To work around this
> behavior
> + * use the noinline function attribute."
> + */
> +noinline void *current_text_addr(void)
> +{
> + return __builtin_return_address(0);
> +}
> +
Since we started to care about clang, what's the situation about it?
From what I read in the links below, it looks like it's similar, and
that noinline would actually be ok there too... in which case, it's
probably worth making the comment either reference both docs, or be a
bit more abstract/generic.
http://lists.llvm.org/pipermail/llvm-dev/2015-December/092893.html
http://llvm.org/docs/LangRef.html#llvm-returnaddress-intrinsic
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-05-10 8:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 15:48 [PATCH v1 0/7] Make building xSplice patches easier Ross Lagerwall
2016-05-06 15:48 ` [PATCH v1 1/7] lib: Add a generic implementation of current_text_addr() Ross Lagerwall
2016-05-10 8:18 ` Dario Faggioli [this message]
2016-05-10 14:34 ` Jan Beulich
2016-05-06 15:48 ` [PATCH v1 2/7] sched: Remove dependency on __LINE__ for release builds Ross Lagerwall
2016-05-10 14:39 ` Jan Beulich
2016-05-06 15:48 ` [PATCH v1 3/7] mm: Use statically defined locking order Ross Lagerwall
2016-05-10 8:25 ` Dario Faggioli
2016-05-10 14:42 ` Jan Beulich
2016-05-10 14:46 ` Andrew Cooper
2016-05-06 15:48 ` [PATCH v1 4/7] page-alloc: Remove dependency on __LINE__ for release builds Ross Lagerwall
2016-05-10 14:40 ` Andrew Cooper
2016-05-10 14:46 ` Jan Beulich
2016-05-06 15:48 ` [PATCH v1 5/7] iommu: " Ross Lagerwall
2016-05-10 14:48 ` Jan Beulich
2016-05-06 15:48 ` [PATCH v1 6/7] acpi: " Ross Lagerwall
2016-05-10 14:52 ` Jan Beulich
2016-05-06 15:48 ` [PATCH v1 7/7] Rename sections for compatibility with -ffunction-sections -fdata-sections Ross Lagerwall
2016-05-10 11:42 ` Julien Grall
2016-05-10 14:24 ` Jan Beulich
2016-05-09 12:43 ` [PATCH v1 0/7] Make building xSplice patches easier Wei Liu
2016-05-10 16:36 ` Konrad Rzeszutek Wilk
2017-01-31 3:05 ` Doug Goldstein
2017-01-31 13:42 ` Ross Lagerwall
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=1462868300.4858.21.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.paumonne@citrix.com \
--cc=ross.lagerwall@citrix.com \
--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).