public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Babu Moger <babu.moger@oracle.com>
To: 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,
	davem@davemloft.net, viro@zeniv.linux.org.uk
Cc: 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: [PATCH 0/2] Define CPU_BIG_ENDIAN or warn for inconsistencies
Date: Thu,  8 Jun 2017 15:17:21 -0700	[thread overview]
Message-ID: <1496960243-196898-1-git-send-email-babu.moger@oracle.com> (raw)

Found this problem while enabling queued rwlock on SPARC.
The parameter CONFIG_CPU_BIG_ENDIAN is used to clear the
specific byte in qrwlock structure. Without this parameter,
we clear the wrong byte. Here is the code.

static inline u8 *__qrwlock_write_byte(struct qrwlock *lock)
  {
         return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
  }

Here is the previous discussion.
http://www.spinics.net/lists/devicetree/msg178101.html

Based on the discussion, it was decided to add CONFIG_CPU_BIG_ENDIAN
for all the fixed big endian architecture(frv, h8300, m68k, openrisc,
parisc and sparc). And warn if there are inconsistencies in this definition.

Babu Moger (2):
  arch: Define CPU_BIG_ENDIAN for all fixed big endian archs
  include: warn for inconsistent endian config definition

 arch/frv/Kconfig                        |    3 +++
 arch/h8300/Kconfig                      |    3 +++
 arch/m68k/Kconfig                       |    3 +++
 arch/openrisc/Kconfig                   |    3 +++
 arch/parisc/Kconfig                     |    3 +++
 arch/sparc/Kconfig                      |    3 +++
 include/linux/byteorder/big_endian.h    |    4 ++++
 include/linux/byteorder/little_endian.h |    4 ++++
 8 files changed, 26 insertions(+), 0 deletions(-)

             reply	other threads:[~2017-06-08 22:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08 22:17 Babu Moger [this message]
2017-06-08 22:17 ` [PATCH 1/2] arch: Define CPU_BIG_ENDIAN for all fixed big endian archs Babu Moger
2017-06-09  7:03   ` Geert Uytterhoeven
2017-06-09 15:55     ` Babu Moger
2017-06-09 16:40   ` David Miller
2017-06-08 22:17 ` [PATCH 2/2] include: warn for inconsistent endian config definition Babu Moger
2017-06-09  7:05   ` Geert Uytterhoeven
2017-06-09  7:16     ` Geert Uytterhoeven
2017-06-09 13:55       ` Babu Moger
2017-06-09 14:11         ` Geert Uytterhoeven
2017-06-09 14:39           ` Babu Moger
2017-06-10 14:06   ` kbuild test robot
2017-06-12 20:30     ` Babu Moger
2017-06-12 20:51       ` Arnd Bergmann
2017-06-12 20:58         ` Max Filippov
2017-06-12 21:31           ` Babu Moger
2017-06-12 21:24         ` Babu Moger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1496960243-196898-1-git-send-email-babu.moger@oracle.com \
    --to=babu.moger@oracle.com \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=geert@linux-m68k.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=jejb@parisc-linux.org \
    --cc=jonas@southpole.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=openrisc@lists.librecores.org \
    --cc=peterz@infradead.org \
    --cc=shorne@gmail.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=stefan.kristiansson@saunalahti.fi \
    --cc=uclinux-h8-devel@lists.sourceforge.jp \
    --cc=viro@zeniv.linux.org.uk \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox