linux-stable/arch/xtensa/kernel
Linus Torvalds 9ba27414f2 fork-v5.9
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCXyge/QAKCRCRxhvAZXjc
 oildAQCCWpnTeXm6hrIE3VZ36X5npFtbaEthdBVAUJM7mo0FYwEA8+Wbnubg6jCw
 mztkXCnTfU7tApUdhKtQzcpEws45/Qk=
 =REE/
 -----END PGP SIGNATURE-----

Merge tag 'fork-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux

Pull fork cleanups from Christian Brauner:
 "This is cleanup series from when we reworked a chunk of the process
  creation paths in the kernel and switched to struct
  {kernel_}clone_args.

  High-level this does two main things:

   - Remove the double export of both do_fork() and _do_fork() where
     do_fork() used the incosistent legacy clone calling convention.

     Now we only export _do_fork() which is based on struct
     kernel_clone_args.

   - Remove the copy_thread_tls()/copy_thread() split making the
     architecture specific HAVE_COYP_THREAD_TLS config option obsolete.

  This switches all remaining architectures to select
  HAVE_COPY_THREAD_TLS and thus to the copy_thread_tls() calling
  convention. The current split makes the process creation codepaths
  more convoluted than they need to be. Each architecture has their own
  copy_thread() function unless it selects HAVE_COPY_THREAD_TLS then it
  has a copy_thread_tls() function.

  The split is not needed anymore nowadays, all architectures support
  CLONE_SETTLS but quite a few of them never bothered to select
  HAVE_COPY_THREAD_TLS and instead simply continued to use copy_thread()
  and use the old calling convention. Removing this split cleans up the
  process creation codepaths and paves the way for implementing clone3()
  on such architectures since it requires the copy_thread_tls() calling
  convention.

  After having made each architectures support copy_thread_tls() this
  series simply renames that function back to copy_thread(). It also
  switches all architectures that call do_fork() directly over to
  _do_fork() and the struct kernel_clone_args calling convention. This
  is a corollary of switching the architectures that did not yet support
  it over to copy_thread_tls() since do_fork() is conditional on not
  supporting copy_thread_tls() (Mostly because it lacks a separate
  argument for tls which is trivial to fix but there's no need for this
  function to exist.).

  The do_fork() removal is in itself already useful as it allows to to
  remove the export of both do_fork() and _do_fork() we currently have
  in favor of only _do_fork(). This has already been discussed back when
  we added clone3(). The legacy clone() calling convention is - as is
  probably well-known - somewhat odd:

    #
    # ABI hall of shame
    #
    config CLONE_BACKWARDS
    config CLONE_BACKWARDS2
    config CLONE_BACKWARDS3

  that is aggravated by the fact that some architectures such as sparc
  follow the CLONE_BACKWARDSx calling convention but don't really select
  the corresponding config option since they call do_fork() directly.

  So do_fork() enforces a somewhat arbitrary calling convention in the
  first place that doesn't really help the individual architectures that
  deviate from it. They can thus simply be switched to _do_fork()
  enforcing a single calling convention. (I really hope that any new
  architectures will __not__ try to implement their own calling
  conventions...)

  Most architectures already have made a similar switch (m68k comes to
  mind).

  Overall this removes more code than it adds even with a good portion
  of added comments. It simplifies a chunk of arch specific assembly
  either by moving the code into C or by simply rewriting the assembly.

  Architectures that have been touched in non-trivial ways have all been
  actually boot and stress tested: sparc and ia64 have been tested with
  Debian 9 images. They are the two architectures which have been
  touched the most. All non-trivial changes to architectures have seen
  acks from the relevant maintainers. nios2 with a custom built
  buildroot image. h8300 I couldn't get something bootable to test on
  but the changes have been fairly automatic and I'm sure we'll hear
  people yell if I broke something there.

  All other architectures that have been touched in trivial ways have
  been compile tested for each single patch of the series via git rebase
  -x "make ..." v5.8-rc2. arm{64} and x86{_64} have been boot tested
  even though they have just been trivially touched (removal of the
  HAVE_COPY_THREAD_TLS macro from their Kconfig) because well they are
  basically "core architectures" and since it is trivial to get your
  hands on a useable image"

* tag 'fork-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
  arch: rename copy_thread_tls() back to copy_thread()
  arch: remove HAVE_COPY_THREAD_TLS
  unicore: switch to copy_thread_tls()
  sh: switch to copy_thread_tls()
  nds32: switch to copy_thread_tls()
  microblaze: switch to copy_thread_tls()
  hexagon: switch to copy_thread_tls()
  c6x: switch to copy_thread_tls()
  alpha: switch to copy_thread_tls()
  fork: remove do_fork()
  h8300: select HAVE_COPY_THREAD_TLS, switch to kernel_clone_args
  nios2: enable HAVE_COPY_THREAD_TLS, switch to kernel_clone_args
  ia64: enable HAVE_COPY_THREAD_TLS, switch to kernel_clone_args
  sparc: unconditionally enable HAVE_COPY_THREAD_TLS
  sparc: share process creation helpers between sparc and sparc64
  sparc64: enable HAVE_COPY_THREAD_TLS
  fork: fold legacy_clone_args_valid() into _do_fork()
2020-08-04 14:47:45 -07:00
..
syscalls vfs: add faccessat2 syscall 2020-05-14 16:44:25 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
align.S xtensa: clean up word alignment macros in assembly code 2017-12-10 14:48:53 -08:00
asm-offsets.c xtensa: drop unused field from the struct exc_table 2018-12-03 01:39:22 -08:00
coprocessor.S xtensa: move fast exception handlers close to vectors 2020-02-04 21:53:39 -08:00
entry.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
head.S xtensa: add XIP kernel support 2019-11-26 11:33:38 -08:00
hw_breakpoint.c xtensa: replace variant/core.h with asm/core.h 2019-05-06 17:48:55 -07:00
irq.c xtensa: drop variant IRQ support 2018-08-20 12:28:05 -07:00
jump_label.c jump_label: move 'asm goto' support test to Kconfig 2019-01-06 09:46:51 +09:00
Makefile xtensa: use the generic uncached segment support 2019-11-11 10:52:18 +01:00
mcount.S xtensa: abstract 'entry' and 'retw' in assembly code 2019-07-08 10:04:48 -07:00
module.c xtensa: clean up custom-controlled debug output 2017-12-16 22:37:08 -08:00
mxhead.S
pci-dma.c dma-direct: make uncached_kernel_address more general 2020-03-16 10:48:09 +01:00
pci.c xtensa: use generic pcibios_set_master and pcibios_enable_device 2019-06-16 23:31:29 -07:00
perf_event.c xtensa: simplify xtensa_pmu_irq_handler 2020-07-08 00:18:15 -07:00
platform.c xtensa: drop empty platform_* functions from platforms 2020-01-31 12:17:28 -08:00
process.c arch: rename copy_thread_tls() back to copy_thread() 2020-07-04 23:41:37 +02:00
ptrace.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
s32c1i_selftest.c xtensa: move S32C1I self-test to a separate file 2016-11-16 15:08:28 -08:00
setup.c xtensa: update *pos in cpuinfo_op.next 2020-07-02 08:35:02 -07:00
signal.c xtensa: clean up system_call/xtensa_rt_sigreturn interaction 2019-11-29 19:37:12 -08:00
smp.c xtensa: replace setup_irq() by request_irq() 2020-03-03 18:40:26 -08:00
stacktrace.c xtensa: add support for call0 ABI in userspace 2019-09-01 13:11:57 -07:00
syscall.c xtensa: implement syscall tracepoints 2018-12-17 13:50:25 -08:00
time.c xtensa: replace setup_irq() by request_irq() 2020-03-03 18:40:26 -08:00
traps.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
vectors.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
vmlinux.lds.S xtensa: reorganize vectors placement 2020-02-04 21:57:02 -08:00
xtensa_ksyms.c xtensa: fix __sync_fetch_and_{and,or}_4 declarations 2020-07-02 08:35:02 -07:00