]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Merge branch 'asm-generic-unaligned' into asm-generic
authorArnd Bergmann <arnd@arndb.de>
Sat, 22 May 2021 06:29:58 +0000 (08:29 +0200)
committerArnd Bergmann <arnd@arndb.de>
Sat, 22 May 2021 06:29:58 +0000 (08:29 +0200)
commit14462376858e35b83932f94616effc2f49fd8494
tree2862696fe10ac599da14c3003c86f3c46d4bc9fa
parentac93d1da649366118eee843d743d2c3d4d5ad9a2
parent803f4e1eab7a8938ba3a3c30dd4eb5e9eeef5e63
Merge branch 'asm-generic-unaligned' into asm-generic

The get_unaligned()/put_unaligned() helpers are traditionally architecture
specific, with the two main variants being the "access-ok.h" version
that assumes unaligned pointer accesses always work on a particular
architecture, and the "le-struct.h" version that casts the data to a
byte aligned type before dereferencing, for architectures that cannot
always do unaligned accesses in hardware.

Based on the discussion linked below, it appears that the access-ok
version is not realiable on any architecture, but the struct version
probably has no downsides. This series changes the code to use the
same implementation on all architectures, addressing the few exceptions
separately.

* asm-generic-unaligned:
  asm-generic: simplify asm/unaligned.h
  asm-generic: uaccess: 1-byte access is always aligned
  netpoll: avoid put_unaligned() on single character
  mwifiex: re-fix for unaligned accesses
  apparmor: use get_unaligned() only for multi-byte words
  partitions: msdos: fix one-byte get_unaligned()
  asm-generic: unaligned always use struct helpers
  asm-generic: unaligned: remove byteshift helpers
  powerpc: use linux/unaligned/le_struct.h on LE power7
  m68k: select CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
  sh: remove unaligned access for sh4a
  openrisc: always use unaligned-struct header
  asm-generic: use asm-generic/unaligned.h for most architectures

Signed-off-by: Arnd Bergmann <arnd@arndb.de>