linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: "Vinson Lee" <vlee@twopensource.com>,
	linux-next@vger.kernel.org,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Andi Kleen" <ak@linux.intel.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Jiri Olsa" <jolsa@kernel.org>, "Rabin Vincent" <rabin@rab.in>,
	"Martin Liška" <mliska@suse.cz>
Subject: Re: [PATCH] tools include: Fix strict-aliasing rules breakage "tools/include/linux/compiler.h:66: error: dereferencing pointer ‘res.41’ does break strict-aliasing rules"
Date: Tue, 13 Oct 2015 11:44:10 -0300	[thread overview]
Message-ID: <20151013144410.GR14409@kernel.org> (raw)
In-Reply-To: <20151013085214.GB2705@krava.brq.redhat.com>

Em Tue, Oct 13, 2015 at 10:52:14AM +0200, Jiri Olsa escreveu:
> On Mon, Oct 12, 2015 at 05:48:17PM -0700, Vinson Lee wrote:
> 
> SNIP
> 
> > >                 __builtin_memcpy((void *)res, (const void *)p, size);
> > > @@ -59,11 +64,14 @@ static __always_inline void __read_once_size(const volatile void *p, void *res,
> > >
> > >  static __always_inline void __write_once_size(volatile void *p, void *res, int size)
> > >  {
> > > +       u64_alias_t *u64_p = (u64_alias_t*) p;
> > > +       u64_alias_t *u64_res = (u64_alias_t*) res;
> > > +
> > >         switch (size) {
> > >         case 1: *(volatile __u8 *)p = *(__u8 *)res; break;
> > >         case 2: *(volatile __u16 *)p = *(__u16 *)res; break;
> > >         case 4: *(volatile __u32 *)p = *(__u32 *)res; break;
> > > -       case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
> > > +       case 8: *u64_p = *u64_res; break;
> > >         default:
> > >                 barrier();
> > >                 __builtin_memcpy((void *)p, (const void *)res, size);
> > 
> > 
> > This patch fixes my perf build error with GCC 4.4.
> > 
> > Vinson
> 
> posting complete patch

Applied, with a tested-by Vinson,

thanks,

- Arnaldo

      reply	other threads:[~2015-10-13 14:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 18:28 next-20151007 perf build error "tools/include/linux/compiler.h:66: error: dereferencing pointer ‘res.41’ does break strict-aliasing rules" Vinson Lee
2015-10-07 18:47 ` Arnaldo Carvalho de Melo
2015-10-08  9:12 ` Jiri Olsa
2015-10-13  0:48   ` Vinson Lee
2015-10-13  8:52     ` [PATCH] tools include: Fix strict-aliasing rules breakage " Jiri Olsa
2015-10-13 14:44       ` Arnaldo Carvalho de Melo [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=20151013144410.GR14409@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mliska@suse.cz \
    --cc=rabin@rab.in \
    --cc=vlee@twopensource.com \
    /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).