linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h
Date: Fri, 7 Sep 2018 15:58:17 +0200	[thread overview]
Message-ID: <20180907135817.GF24106@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <ae32181d-37b2-1a13-3c72-66775e05ff88@c-s.fr>

On Fri, Sep 07, 2018 at 01:50:18PM +0000, Christophe Leroy wrote:
> 
> 
> On 09/07/2018 01:42 PM, Peter Zijlstra wrote:
> > On Fri, Sep 07, 2018 at 01:27:19PM +0000, Christophe Leroy wrote:
> > > On PPC32, enums are 32 bits, so __PERF_SAMPLE_CALLCHAIN_EARLY is
> > > out of scope. The following sparse warning is encountered:
> > > 
> > >    CHECK   arch/powerpc/kernel/process.c
> > > ./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0)
> > 
> > Urgh... what compiler is that? I've not seen anything like that from the
> > build bots.
> > 
> 
> [root@pc16082vm linux-powerpc]# sparse --version
> 0.5.2
> 
> [root@pc16082vm linux-powerpc]# ppc-linux-gcc --version
> ppc-linux-gcc (GCC) 5.4.0

Ah, that's a sparse warning. But does your GCC agree? The thing is,
sparse uses the C enum spec, but I suspect GCC uses the C++ enum spec
and it all works fine.

  reply	other threads:[~2018-09-07 13:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 13:27 [PATCH] perf: enum overflow in uapi/linux/perf_event.h Christophe Leroy
2018-09-07 13:42 ` Peter Zijlstra
2018-09-07 13:50   ` Christophe Leroy
2018-09-07 13:58     ` Peter Zijlstra [this message]
2018-09-07 14:13       ` Peter Zijlstra
2018-09-07 14:15       ` Christophe LEROY
2018-09-07 14:23         ` Peter Zijlstra
2018-09-07 18:43         ` Luc Van Oostenryck
2018-09-07 23:55           ` Luc Van Oostenryck

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=20180907135817.GF24106@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@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).