linux/arch/xtensa/include/asm
Linus Torvalds 4cad671979 asm-generic/unaligned: Unify asm/unaligned.h around struct helper
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.
 
 Link: https://lore.kernel.org/lkml/75d07691-1e4f-741f-9852-38c0b4f520bc@synopsys.com/
 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363
 Link: https://lore.kernel.org/lkml/20210507220813.365382-14-arnd@kernel.org/
 Link: git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git unaligned-rework-v2
 Link: https://lore.kernel.org/lkml/CAHk-=whGObOKruA_bU3aPGZfoDqZM1_9wBkwREp0H0FgR-90uQ@mail.gmail.com/
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmDfFx4ACgkQmmx57+YA
 GNkqzRAAjdlIr8M+xI2CyT0/A9tswYfLMeWejmYopq3zlxI6RnvPiJJDIdY2I8US
 1npIiDo55w061CnXL9rV65ocL3XmGu1mabOvgM6ATsec+8t4WaXBV9tysxTJ9ea0
 ltLTa2P5DXWALvWiVMTME7hFaf1cW+8Uqt3LmXxDp2l5zasXajCHAH6YokON2PfM
 CsaRhwSxIu8Sbnu/IQGBI9JW5UXsBfKSyUwtM0OwP7jFOuIeZ4WBVA+j6UxONnFC
 wouKmAM/ThoOsaV9aP4EZLIfBx8d4/hfYQjZ958kYXurerruYkJeEqdIRbV0QqTy
 2O6ZrJ6uqPlzfWz9h458me2dt98YEtALHV/3DCWUcBfHmUQtxElyJYEhG0YjVF3H
 5RYtjw8Q2LS/QR5ask1Xn0JfT89rRnLi2migAtsA4Ce70JP4Us6wGobkj4SHlgDt
 P7+eVq2Mkhqw/kmV8N4p+ZS5lpkK0JniDN+ONDhkZqHL/zXG/HQzx9wLV69jlvo2
 ASevKxITdi+bKHWs5ANungkBOnBUQZacq46mVyi4HPDwMAFyWvVYTbFumy9koagQ
 o9NEgX3RsZcxxi7bU1xuFPFMLMlUQT3Nb30+84B4fKe9FmvHC1hizTiCnp7q4bZr
 z6a6AMHke7YLqKZOqzTJGRR3lPoZZDCb775SAd70LQp6XPZXOHs=
 =IY5U
 -----END PGP SIGNATURE-----

Merge tag 'asm-generic-unaligned-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull asm/unaligned.h unification from Arnd Bergmann:
 "Unify asm/unaligned.h around struct helper

  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"

Link: https://lore.kernel.org/lkml/75d07691-1e4f-741f-9852-38c0b4f520bc@synopsys.com/
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363
Link: https://lore.kernel.org/lkml/20210507220813.365382-14-arnd@kernel.org/
Link: git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git unaligned-rework-v2
Link: https://lore.kernel.org/lkml/CAHk-=whGObOKruA_bU3aPGZfoDqZM1_9wBkwREp0H0FgR-90uQ@mail.gmail.com/

* tag 'asm-generic-unaligned-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  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
2021-07-02 12:43:40 -07:00
..
asm-offsets.h
asm-uaccess.h get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
asmmacro.h xtensa: move fast exception handlers close to vectors 2020-02-04 21:53:39 -08:00
atomic.h locking/atomic: xtensa: move to ARCH_ATOMIC 2021-05-26 13:20:52 +02:00
barrier.h xtensa: add exclusive atomics support 2019-05-07 10:36:31 -07:00
bitops.h xtensa: use "m" constraint instead of "a" in bitops.h assembly 2019-11-26 11:33:38 -08:00
bootparam.h
bugs.h
cache.h xtensa: add XIP kernel support 2019-11-26 11:33:38 -08:00
cacheasm.h xtensa: increase ranges in ___invalidate_{i,d}cache_all 2018-08-13 20:08:01 -07:00
cacheflush.h xtensa: implement flush_icache_user_range 2020-06-08 11:05:58 -07:00
checksum.h xtensa: propagate the calling conventions change down into csum_partial_copy_generic() 2020-08-20 15:45:21 -04:00
cmpxchg.h locking/atomic: xtensa: move to ARCH_ATOMIC 2021-05-26 13:20:52 +02:00
coprocessor.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
core.h xtensa: clean up optional XCHAL_* definitions 2020-02-01 00:43:28 -08:00
current.h xtensa: consolidate kernel stack size related definitions 2017-12-10 14:48:55 -08:00
delay.h
dma.h
elf.h xtensa: enable CORE_DUMP_USE_REGSET 2018-12-17 13:48:22 -08:00
fixmap.h xtensa/mm/highmem: Make generic kmap_atomic() work correctly 2020-11-16 21:19:24 +01:00
flat.h binfmt_flat: remove the persistent argument from flat_get_addr_from_rp 2019-06-24 09:16:47 +10:00
ftrace.h
futex.h futex: arch_futex_atomic_op_inuser() calling conventions change 2020-03-27 23:58:51 -04:00
highmem.h xtensa/mm/highmem: Make generic kmap_atomic() work correctly 2020-11-16 21:19:24 +01:00
hw_breakpoint.h perf/hw_breakpoint: Remove default hw_breakpoint_arch_parse() 2018-06-26 09:07:58 +02:00
initialize_mmu.h xtensa: drop extraneous register load from initialize_mmu 2021-04-04 15:39:04 -07:00
io.h arch: rely on asm-generic/io.h for default ioremap_* definitions 2019-11-11 21:18:19 +01:00
irq.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
irqflags.h xtensa: replace CONFIG_DEBUG_KERNEL with CONFIG_DEBUG_MISC 2019-05-14 19:52:50 -07:00
jump_label.h xtensa: implement jump_label support 2018-12-20 14:44:38 -08:00
kasan.h xtensa: fix build with KASAN 2018-02-11 09:18:12 -08:00
Kbuild local64.h: make <asm/local64.h> mandatory 2020-12-29 15:36:49 -08:00
kmem_layout.h xtensa: move XCHAL_KIO_* definitions to kmem_layout.h 2019-10-20 23:48:28 -07:00
linkage.h xtensa: clean up functions in assembly code 2017-12-10 14:48:54 -08:00
mmu_context.h xtensa: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:39 +01:00
mmu.h
mxregs.h
nommu_context.h xtensa: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:39 +01:00
page.h arch, mm: remove stale mentions of DISCONIGMEM 2021-06-29 10:53:55 -07:00
pci-bridge.h xtensa: drop ifdef __KERNEL__ from kernel-only headers 2019-05-06 17:48:54 -07:00
pci.h xtensa: drop ifdef __KERNEL__ from kernel-only headers 2019-05-06 17:48:54 -07:00
perf_event.h
pgalloc.h mm/thp: define default pmd_pgtable() 2021-07-01 11:06:03 -07:00
pgtable.h mm: define default value for FIRST_USER_ADDRESS 2021-07-01 11:06:02 -07:00
platform.h xtensa: clean up platform headers 2020-01-31 12:17:25 -08:00
processor.h xtensa: clean up optional XCHAL_* definitions 2020-02-01 00:43:28 -08:00
ptrace.h xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
regs.h xtensa: clean up PS_WOE_BIT usage 2019-09-01 13:11:57 -07:00
seccomp.h xtensa: Enable seccomp architecture tracking 2020-11-20 11:16:35 -08:00
serial.h
shmparam.h
signal.h
smp.h
spinlock_types.h xtensa: use generic spinlock/rwlock implementation 2019-02-07 12:24:20 -08:00
spinlock.h locking/arch: Move qrwlock.h include after qspinlock.h 2021-02-11 07:59:54 -05:00
stackprotector.h xtensa: enable stack protector 2017-12-16 22:37:07 -08:00
stacktrace.h xtensa: move oprofile stack tracing to stacktrace.c 2015-08-17 07:32:49 +03:00
string.h xtensa: shut up gcc-8 warnings 2018-01-02 03:25:41 -08:00
switch_to.h
syscall.h xtensa: clean up system_call/xtensa_rt_sigreturn interaction 2019-11-29 19:37:12 -08:00
sysmem.h xtensa: drop sysmem and switch to memblock 2016-07-24 06:34:00 +03:00
thread_info.h xtensa: add support for TIF_NOTIFY_SIGNAL 2020-11-12 08:45:56 -07:00
timex.h xtensa: clean up WSR*/RSR*/get_sr/set_sr 2018-12-04 14:08:11 -08:00
tlb.h arch/tlb: Clean up simple architectures 2019-04-03 10:32:54 +02:00
tlbflush.h mm: update legacy flush_tlb_* to use vma 2021-06-29 10:53:52 -07:00
traps.h xtensa: drop unused field from the struct exc_table 2018-12-03 01:39:22 -08:00
uaccess.h xtensa: uaccess: Add missing __user to strncpy_from_user() prototype 2020-11-17 05:09:28 -08:00
ucontext.h
unistd.h arch: handle arches who do not yet define clone3 2019-06-21 01:54:53 +02:00
vectors.h xtensa: reorganize vectors placement 2020-02-04 21:57:02 -08:00
vermagic.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00