From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e39.co.us.ibm.com (e39.co.us.ibm.com [32.97.110.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e39.co.us.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 79D0C2C00A9 for ; Thu, 3 Oct 2013 16:20:36 +1000 (EST) Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 3 Oct 2013 00:20:33 -0600 Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 6BC4A6E803C for ; Thu, 3 Oct 2013 02:20:31 -0400 (EDT) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by b01cxnp22036.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r936KVPB5439868 for ; Thu, 3 Oct 2013 06:20:32 GMT Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r936KSnT004980 for ; Thu, 3 Oct 2013 00:20:31 -0600 Date: Wed, 2 Oct 2013 23:20:14 -0700 From: Sukadev Bhattiprolu To: Michael Ellerman Subject: Re: [PATCH 6/9][v5] powerpc/perf: Define big-endian version of perf_mem_data_src Message-ID: <20131003062014.GA13237@us.ibm.com> References: <1380672911-12812-1-git-send-email-sukadev@linux.vnet.ibm.com> <1380672911-12812-7-git-send-email-sukadev@linux.vnet.ibm.com> <20131003053944.GD17237@concordia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20131003053944.GD17237@concordia> Cc: Michael Ellerman , linux-kernel@vger.kernel.org, Stephane Eranian , linuxppc-dev@ozlabs.org, Paul Mackerras , Arnaldo Carvalho de Melo , Anshuman Khandual List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Michael Ellerman [michael@ellerman.id.au] wrote: | On Tue, Oct 01, 2013 at 05:15:07PM -0700, Sukadev Bhattiprolu wrote: | > perf_mem_data_src is an union that is initialized via the ->val field | > and accessed via the bitmap fields. For this to work on big endian | > platforms, we also need a big-endian represenation of perf_mem_data_src. | > | > diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h | > index ca1d90b..846f399 100644 | > --- a/include/uapi/linux/perf_event.h | > +++ b/include/uapi/linux/perf_event.h | > @@ -19,6 +19,50 @@ | > #include | > | > /* | > + * Kernel and userspace check for endianness in incompatible ways. | > + * In user space, defines both __BIG_ENDIAN and __LITTLE_ENDIAN | > + * but sets __BYTE_ORDER to one or the other. So user space uses checks are: | | | Why can't you use __BIG_ENDIAN_BITFIELD ? That macro is not available when building the perf tool - bc there is a util/include/asm/byterorder.h which gets included instead of the usual . | | cheers