lkml.org 
[lkml]   [2013]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] powerpc/perf: Define big-endian version of perf_mem_data_src
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


\
 
 \ /
  Last update: 2013-08-12 02:21    [W:8.599 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site