Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751533AbdFIHDW (ORCPT ); Fri, 9 Jun 2017 03:03:22 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:36650 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751505AbdFIHDU (ORCPT ); Fri, 9 Jun 2017 03:03:20 -0400 MIME-Version: 1.0 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> From: Geert Uytterhoeven Date: Fri, 9 Jun 2017 09:03:18 +0200 X-Google-Sender-Auth: 5-vyEGl-rhLK3YyjFndV6kqjUfU Message-ID: Subject: Re: [PATCH 1/2] arch: Define CPU_BIG_ENDIAN for all fixed big endian archs To: Babu Moger Cc: Yoshinori Sato , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1205 Lines: 35 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 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