linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Define CPU_BIG_ENDIAN or warn for inconsistencies
@ 2017-06-08 22:17 Babu Moger
  2017-06-08 22:17 ` [PATCH 1/2] arch: Define CPU_BIG_ENDIAN for all fixed big endian archs Babu Moger
  2017-06-08 22:17 ` [PATCH 2/2] include: warn for inconsistent endian config definition Babu Moger
  0 siblings, 2 replies; 17+ messages in thread
From: Babu Moger @ 2017-06-08 22:17 UTC (permalink / raw)
  To: ysato, geert, jonas, stefan.kristiansson, shorne, jejb, deller,
	davem, viro
  Cc: mpe, peterz, mingo, jcmvbkbc, linux-kernel, uclinux-h8-devel,
	linux-m68k, openrisc, linux-parisc, sparclinux

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(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-06-12 21:32 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-08 22:17 [PATCH 0/2] Define CPU_BIG_ENDIAN or warn for inconsistencies Babu Moger
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).