From: Christopher Li <sparse@chrisli.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH] sparse/parse.c: ignore hotpatch attribute
Date: Wed, 29 Apr 2015 16:22:13 -0700 [thread overview]
Message-ID: <CANeU7QkyX+cPEpBm_rW1JUX64NAZ6YM0KR17r1rfPeDpYC1uGA@mail.gmail.com> (raw)
In-Reply-To: <1430218119-58354-1-git-send-email-heiko.carstens@de.ibm.com>
That patch looks fine.
Can you add some test case for the hot patch as well?
It need to cover the case you run into.
Preferably cover each of the variation of hot patch.
It will be useful when we parse these attributes properly.
Chris
On Tue, Apr 28, 2015 at 3:48 AM, Heiko Carstens
<heiko.carstens@de.ibm.com> wrote:
> gcc knows about a new "hotpatch" attribute which sparse can safely ignore,
> since it modifies only which code will be generated just like the
> "no_instrument_function" attribute.
>
> The gcc hotpatch feature patch:
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=11762b8363737591bfb9c66093bc2edf289b917f
>
> Currently the Linux kernel makes use of this attribute:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=61f552141c9c0e88b3fdc7046265781ffd8fa68a
>
> Without this patch sparse will emit warnings like
> "error: attribute 'hotpatch': unknown attribute"
>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
> parse.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/parse.c b/parse.c
> index b43d6835528b..8afae73d5325 100644
> --- a/parse.c
> +++ b/parse.c
> @@ -540,6 +540,8 @@ const char *ignored_attributes[] = {
> "__gnu_inline__",
> "hot",
> "__hot__",
> + "hotpatch",
> + "__hotpatch__",
> "leaf",
> "__leaf__",
> "l1_text",
> --
> 2.1.4
>
next prev parent reply other threads:[~2015-04-29 23:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 10:48 [PATCH] sparse/parse.c: ignore hotpatch attribute Heiko Carstens
2015-04-29 23:22 ` Christopher Li [this message]
2015-04-30 11:47 ` Heiko Carstens
2015-04-30 15:45 ` Linus Torvalds
2015-04-30 15:50 ` Nicholas Mc Guire
2015-04-30 17:38 ` josh
2015-04-30 17:51 ` Linus Torvalds
2015-04-30 19:41 ` josh
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=CANeU7QkyX+cPEpBm_rW1JUX64NAZ6YM0KR17r1rfPeDpYC1uGA@mail.gmail.com \
--to=sparse@chrisli.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-sparse@vger.kernel.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).