Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751798AbdFIP4z (ORCPT ); Fri, 9 Jun 2017 11:56:55 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:32796 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751562AbdFIP4x (ORCPT ); Fri, 9 Jun 2017 11:56:53 -0400 Subject: Re: [PATCH 1/2] arch: Define CPU_BIG_ENDIAN for all fixed big endian archs To: Geert Uytterhoeven , "David S. Miller" Cc: Yoshinori Sato , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Helge Deller , Al Viro , Michael Ellerman , Peter Zijlstra , Ingo Molnar , Max Filippov , "linux-kernel@vger.kernel.org" , uclinux-h8-devel@lists.sourceforge.jp, Linux/m68k , openrisc@lists.librecores.org, Parisc List , sparclinux References: <1496960243-196898-1-git-send-email-babu.moger@oracle.com> <1496960243-196898-2-git-send-email-babu.moger@oracle.com> From: Babu Moger Organization: Oracle Corporation Message-ID: <300417cd-2aed-8464-afc3-00bec56d1d4a@oracle.com> Date: Fri, 9 Jun 2017 10:55:13 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1498 Lines: 46 On 6/9/2017 2:03 AM, Geert Uytterhoeven wrote: > On Fri, Jun 9, 2017 at 12:17 AM, Babu Moger wrote: >> While working on enabling queued rwlock on SPARC, found >> this following code in include/asm-generic/qrwlock.h >> which uses CONFIG_CPU_BIG_ENDIAN to clear a byte. >> >> static inline u8 *__qrwlock_write_byte(struct qrwlock *lock) >> { >> return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); >> } >> >> Problem is many of the fixed big endian architectures dont define >> CPU_BIG_ENDIAN and clears the wrong byte. >> >> Define CPU_BIG_ENDIAN for all the fixed big endian architecture. >> >> Here is the orinal discussion >> http://www.spinics.net/lists/devicetree/msg178101.html >> >> Signed-off-by: Babu Moger >> Suggested-by: Arnd Bergmann > Hmm, the link above refers to a mail from me? ;-) > > Acked-by: Geert Uytterhoeven One more question before I resubmit. Dave, I have added CONFIG_CPU_BIG_ENDIAN for sparc via my earlier patch. https://patchwork.ozlabs.org/patch/766735/ Should I exclude sparc here? Thanks Babu > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds