remarkable-linux/arch
Babu Moger 4c97a0c8fe arch: define CPU_BIG_ENDIAN for all fixed big endian archs
Patch series "Define CPU_BIG_ENDIAN or warn for inconsistencies", v3.

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 don't define
CPU_BIG_ENDIAN and clears the wrong byte.

Define CPU_BIG_ENDIAN for all the fixed big endian architecture to fix it.

Also found few more references of this config parameter in
drivers/of/base.c
drivers/of/fdt.c
drivers/tty/serial/earlycon.c
drivers/tty/serial/serial_core.c
Be aware that this may cause regressions if someone has worked-around
problems in the above code already. Remove the work-around.

Here is our original discussion
https://lkml.org/lkml/2017/5/24/620

Link: http://lkml.kernel.org/r/1499358861-179979-2-git-send-email-babu.moger@oracle.com
Signed-off-by: Babu Moger <babu.moger@oracle.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Stafford Horne <shorne@gmail.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-09-08 18:26:48 -07:00
..
alpha alpha: add support for memset16 2017-09-08 18:26:48 -07:00
arc MMC core: 2017-09-07 12:24:50 -07:00
arm ARM: implement memset32 & memset64 2017-09-08 18:26:48 -07:00
arm64 treewide: make "nr_cpu_ids" unsigned 2017-09-08 18:26:48 -07:00
blackfin Merge branches 'doc.2017.08.17a', 'fixes.2017.08.17a', 'hotplug.2017.07.25b', 'misc.2017.08.17a', 'spin_unlock_wait_no.2017.08.17a', 'srcu.2017.07.27c' and 'torture.2017.07.24c' into HEAD 2017-08-17 08:10:04 -07:00
c6x c6x: Convert to using %pOF instead of full_name 2017-08-24 09:35:40 -04:00
cris cris: Mark _stext and _end as char-arrays, not single char variables 2017-08-10 16:28:53 +02:00
frv arch: define CPU_BIG_ENDIAN for all fixed big endian archs 2017-09-08 18:26:48 -07:00
h8300 arch: define CPU_BIG_ENDIAN for all fixed big endian archs 2017-09-08 18:26:48 -07:00
hexagon Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 11:52:29 -07:00
ia64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-09-06 14:45:08 -07:00
m32r Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-09-06 14:45:08 -07:00
m68k arch: define CPU_BIG_ENDIAN for all fixed big endian archs 2017-09-08 18:26:48 -07:00
metag metag/numa: remove the unused parent_node() macro 2017-09-06 17:27:24 -07:00
microblaze DeviceTree updates for 4.14: 2017-09-07 14:43:33 -07:00
mips vga: optimise console scrolling 2017-09-08 18:26:48 -07:00
mn10300 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-09-06 14:45:08 -07:00
nios2 nios2: move generic-y of exported headers to uapi/asm/Kbuild 2017-07-11 21:33:43 +09:00
openrisc arch: define CPU_BIG_ENDIAN for all fixed big endian archs 2017-09-08 18:26:48 -07:00
parisc arch: define CPU_BIG_ENDIAN for all fixed big endian archs 2017-09-08 18:26:48 -07:00
powerpc treewide: make "nr_cpu_ids" unsigned 2017-09-08 18:26:48 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-09-06 14:45:08 -07:00
score Merge branch 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-06 22:07:44 -07:00
sh Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-09-06 14:45:08 -07:00
sparc arch: define CPU_BIG_ENDIAN for all fixed big endian archs 2017-09-08 18:26:48 -07:00
tile treewide: make "nr_cpu_ids" unsigned 2017-09-08 18:26:48 -07:00
um Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 09:52:57 -07:00
unicore32 unicore32: move generic-y of exported headers to uapi/asm/Kbuild 2017-07-11 21:33:52 +09:00
x86 treewide: make "nr_cpu_ids" unsigned 2017-09-08 18:26:48 -07:00
xtensa Merge branch 'akpm' (patches from Andrew) 2017-09-06 20:49:49 -07:00
.gitignore
Kconfig - For the randstruct plugin, enable automatic randomization of structures 2017-09-07 20:30:19 -07:00