linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Vince Weaver <vince@deater.net>
Cc: Anton Blanchard <anton@au1.ibm.com>,
	linux-kernel@vger.kernel.org,
	Stephane Eranian <eranian@google.com>,
	linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
	Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
	Anshuman Khandual <khandual@linux.vnet.ibm.com>
Subject: Re: [PATCH 5/7] powerpc/perf: Define big-endian version of perf_mem_data_src
Date: Mon, 12 Aug 2013 09:57:58 +1000	[thread overview]
Message-ID: <20130811235758.GA29824@concordia> (raw)
In-Reply-To: <alpine.DEB.2.02.1308102232120.4119@pianoman.cluster.toy>

On Sat, Aug 10, 2013 at 10:34:58PM -0400, Vince Weaver wrote:
> On Sat, 10 Aug 2013, Sukadev Bhattiprolu wrote:
> 
> > 
> >  include/uapi/linux/perf_event.h |   55 +++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 55 insertions(+), 0 deletions(-)
> 
> > +#define __PERF_LE	1234
> > +#define __PERF_BE	4321
> > +
> > +#if defined(__KERNEL__)
> 
> I could be wrong, but I thought files under uapi weren't supposed to 
> contain __KERNEL__ code.  Wasn't that the whole point of uapi?

Yes.
 
> Also having the perf_event interface depend on endianess just seems like a 
> complicated mess.  Can't we just declare the interface to be a certain 
> endianess and have the kernel byte-swap as necessary?

Yes I think so. The interface is already defined and it's little endian,
so on big endian we just need to swap.

The only part I'm not clear on is how things are handled in perf
userspace, it seems to already do some byte swapping.

cheers

  parent reply	other threads:[~2013-08-11 23:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-10 17:48 [PATCH 0/7]: Enable 'perf mem' command for Power Sukadev Bhattiprolu
2013-08-10 17:49 ` [PATCH 1/7] powerpc/perf: Rename Power8 macros to start with PME Sukadev Bhattiprolu
2013-08-10 17:50 ` [PATCH 2/7] powerpc/perf: Export Power8 generic events in sysfs Sukadev Bhattiprolu
2013-08-10 17:50 ` [PATCH 3/7] powerpc/perf: Create mem-loads/mem-stores events for Power8 Sukadev Bhattiprolu
2013-08-10 17:51 ` [PATCH 4/7] powerpc/perf: Create mem-loads/mem-stores events for Power7 Sukadev Bhattiprolu
2013-08-10 17:51 ` [PATCH 5/7] powerpc/perf: Define big-endian version of perf_mem_data_src Sukadev Bhattiprolu
2013-08-11  2:34   ` Vince Weaver
2013-08-11 17:15     ` Sukadev Bhattiprolu
2013-08-11 23:57     ` Michael Ellerman [this message]
2013-08-12  3:19       ` Vince Weaver
2013-08-10 17:52 ` [PATCH 6/7] powerpc/perf: Export Power8 memory hierarchy info to user space Sukadev Bhattiprolu
2013-08-10 17:52 ` [PATCH 7/7] powerpc/perf: Export Power7 " Sukadev Bhattiprolu

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=20130811235758.GA29824@concordia \
    --to=michael@ellerman.id.au \
    --cc=anton@au1.ibm.com \
    --cc=eranian@google.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sukadev@linux.vnet.ibm.com \
    --cc=vince@deater.net \
    /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).