Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751831AbdFIQkd (ORCPT ); Fri, 9 Jun 2017 12:40:33 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:33820 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751803AbdFIQk3 (ORCPT ); Fri, 9 Jun 2017 12:40:29 -0400 Date: Fri, 09 Jun 2017 12:40:25 -0400 (EDT) Message-Id: <20170609.124025.1597341888979066145.davem@davemloft.net> To: babu.moger@oracle.com Cc: ysato@users.sourceforge.jp, geert@linux-m68k.org, jonas@southpole.se, stefan.kristiansson@saunalahti.fi, shorne@gmail.com, jejb@parisc-linux.org, deller@gmx.de, viro@zeniv.linux.org.uk, mpe@ellerman.id.au, peterz@infradead.org, mingo@redhat.com, jcmvbkbc@gmail.com, linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-m68k@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org Subject: Re: [PATCH 1/2] arch: Define CPU_BIG_ENDIAN for all fixed big endian archs From: David Miller In-Reply-To: <1496960243-196898-2-git-send-email-babu.moger@oracle.com> References: <1496960243-196898-1-git-send-email-babu.moger@oracle.com> <1496960243-196898-2-git-send-email-babu.moger@oracle.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 09 Jun 2017 08:58:48 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 810 Lines: 24 From: Babu Moger Date: Thu, 8 Jun 2017 15:17:22 -0700 > 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 Acked-by: David S. Miller