Merge tag 'sh-for-5.9' of git://git.libc.org/linux-sh
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 16 Aug 2020 01:50:32 +0000 (18:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 16 Aug 2020 01:50:32 +0000 (18:50 -0700)
Pull arch/sh updates from Rich Felker:
 "Cleanup, SECCOMP_FILTER support, message printing fixes, and other
  changes to arch/sh"

* tag 'sh-for-5.9' of git://git.libc.org/linux-sh: (34 commits)
  sh: landisk: Add missing initialization of sh_io_port_base
  sh: bring syscall_set_return_value in line with other architectures
  sh: Add SECCOMP_FILTER
  sh: Rearrange blocks in entry-common.S
  sh: switch to copy_thread_tls()
  sh: use the generic dma coherent remap allocator
  sh: don't allow non-coherent DMA for NOMMU
  dma-mapping: consolidate the NO_DMA definition in kernel/dma/Kconfig
  sh: unexport register_trapped_io and match_trapped_io_handler
  sh: don't include <asm/io_trapped.h> in <asm/io.h>
  sh: move the ioremap implementation out of line
  sh: move ioremap_fixed details out of <asm/io.h>
  sh: remove __KERNEL__ ifdefs from non-UAPI headers
  sh: sort the selects for SUPERH alphabetically
  sh: remove -Werror from Makefiles
  sh: Replace HTTP links with HTTPS ones
  arch/sh/configs: remove obsolete CONFIG_SOC_CAMERA*
  sh: stacktrace: Remove stacktrace_ops.stack()
  sh: machvec: Modernize printing of kernel messages
  sh: pci: Modernize printing of kernel messages
  ...

13 files changed:
1  2 
arch/m68k/Kconfig
arch/sh/include/asm/io.h
arch/sh/include/asm/sparsemem.h
arch/sh/include/asm/string_32.h
arch/sh/kernel/machvec.c
arch/sh/kernel/process_32.c
arch/sh/kernel/ptrace_32.c
arch/sh/mm/fault.c
arch/sh/mm/init.c
arch/sh/mm/ioremap_fixed.c
arch/um/Kconfig
kernel/dma/Kconfig
tools/testing/selftests/seccomp/seccomp_bpf.c

@@@ -14,8 -14,10 +14,9 @@@ config M68
        select HAVE_AOUT if MMU
        select HAVE_ASM_MODVERSIONS
        select HAVE_DEBUG_BUGVERBOSE
 -      select HAVE_COPY_THREAD_TLS
        select GENERIC_IRQ_SHOW
        select GENERIC_ATOMIC64
+       select NO_DMA if !MMU && !COLDFIRE
        select HAVE_UID16
        select VIRT_TO_BUS
        select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
Simple merge
@@@ -2,14 -2,13 +2,11 @@@
  #ifndef __ASM_SH_SPARSEMEM_H
  #define __ASM_SH_SPARSEMEM_H
  
- #ifdef __KERNEL__
  /*
   * SECTION_SIZE_BITS          2^N: how big each section will be
 - * MAX_PHYSADDR_BITS          2^N: how much physical address space we have
 - * MAX_PHYSMEM_BITS           2^N: how much memory we can have in that space
 + * MAX_PHYSMEM_BITS           2^N: how much physical address space we have
   */
  #define SECTION_SIZE_BITS     26
 -#define MAX_PHYSADDR_BITS     32
  #define MAX_PHYSMEM_BITS      32
  
- #endif
  #endif /* __ASM_SH_SPARSEMEM_H */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -27,8 -27,8 +27,9 @@@
  #include <asm/sections.h>
  #include <asm/setup.h>
  #include <asm/cache.h>
 +#include <asm/pgalloc.h>
  #include <linux/sizes.h>
+ #include "ioremap.h"
  
  pgd_t swapper_pg_dir[PTRS_PER_PGD];
  
Simple merge
diff --cc arch/um/Kconfig
@@@ -14,6 -14,8 +14,7 @@@ config UM
        select HAVE_FUTEX_CMPXCHG if FUTEX
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DEBUG_BUGVERBOSE
 -      select HAVE_COPY_THREAD_TLS
+       select NO_DMA
        select GENERIC_IRQ_SHOW
        select GENERIC_CPU_DEVICES
        select GENERIC_CLOCKEVENTS
Simple merge
@@@ -131,8 -122,8 +131,10 @@@ struct seccomp_data 
  #  define __NR_seccomp 358
  # elif defined(__s390__)
  #  define __NR_seccomp 348
 +# elif defined(__xtensa__)
 +#  define __NR_seccomp 337
+ # elif defined(__sh__)
+ #  define __NR_seccomp 372
  # else
  #  warning "seccomp syscall number unknown for this architecture"
  #  define __NR_seccomp 0xffff
@@@ -1711,14 -1624,10 +1713,18 @@@ TEST_F(TRACE_poke, getpid_runs_normally
  # define SYSCALL_SYSCALL_NUM regs[4]
  # define SYSCALL_RET  regs[2]
  # define SYSCALL_NUM_RET_SHARE_REG
 +#elif defined(__xtensa__)
 +# define ARCH_REGS    struct user_pt_regs
 +# define SYSCALL_NUM  syscall
 +/*
 + * On xtensa syscall return value is in the register
 + * a2 of the current window which is not fixed.
 + */
 +#define SYSCALL_RET(reg) a[(reg).windowbase * 4 + 2]
+ #elif defined(__sh__)
+ # define ARCH_REGS    struct pt_regs
+ # define SYSCALL_NUM  gpr[3]
+ # define SYSCALL_RET  gpr[0]
  #else
  # error "Do not know how to find your architecture's registers and syscalls"
  #endif
@@@ -1790,8 -1699,7 +1796,8 @@@ void change_syscall(struct __test_metad
        EXPECT_EQ(0, ret) {}
  
  #if defined(__x86_64__) || defined(__i386__) || defined(__powerpc__) || \
 -      defined(__s390__) || defined(__hppa__) || defined(__riscv) || defined(__sh__)
 +      defined(__s390__) || defined(__hppa__) || defined(__riscv) || \
-       defined(__xtensa__) || defined(__csky__)
++      defined(__xtensa__) || defined(__csky__) || defined(__sh__)
        {
                regs.SYSCALL_NUM = syscall;
        }