Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754585AbdCFO77 convert rfc822-to-8bit (ORCPT ); Mon, 6 Mar 2017 09:59:59 -0500 Received: from smtp-out6.electric.net ([192.162.217.189]:51882 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754063AbdCFO7V (ORCPT ); Mon, 6 Mar 2017 09:59:21 -0500 From: David Laight To: "'Peter Zijlstra'" , Madhavan Srinivasan CC: Wang Nan , Alexander Shishkin , "linux-kernel@vger.kernel.org" , Arnaldo Carvalho de Melo , Alexei Starovoitov , Ingo Molnar , "Stephane Eranian" , Sukadev Bhattiprolu , "linuxppc-dev@lists.ozlabs.org" Subject: RE: [PATCH v2 1/6] powerpc/perf: Define big-endian version of perf_mem_data_src Thread-Topic: [PATCH v2 1/6] powerpc/perf: Define big-endian version of perf_mem_data_src Thread-Index: AQHSlmwffsC2bg2AT0+z8aU3pnFo4aGH52CA Date: Mon, 6 Mar 2017 14:59:07 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFE78C84@AcuExch.aculab.com> References: <1488796993-25495-1-git-send-email-maddy@linux.vnet.ibm.com> <1488796993-25495-2-git-send-email-maddy@linux.vnet.ibm.com> <20170306112228.GZ6515@twins.programming.kicks-ass.net> In-Reply-To: <20170306112228.GZ6515@twins.programming.kicks-ass.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 869 Lines: 19 From: Peter Zijlstra > Sent: 06 March 2017 11:22 > To: Madhavan Srinivasan > Cc: Wang Nan; Alexander Shishkin; linux-kernel@vger.kernel.org; Arnaldo Carvalho de Melo; Alexei > Starovoitov; Ingo Molnar; Stephane Eranian; Sukadev Bhattiprolu; linuxppc-dev@lists.ozlabs.org > Subject: Re: [PATCH v2 1/6] powerpc/perf: Define big-endian version of perf_mem_data_src > > On Mon, Mar 06, 2017 at 04:13:08PM +0530, Madhavan Srinivasan wrote: > > From: Sukadev Bhattiprolu > > > > 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. > > Doesn't this break interpreting the data on a different endian machine? Best to avoid bitfields if you ever care about the bit order. David