From: Linus Torvalds Date: Sun, 16 Aug 2020 01:50:32 +0000 (-0700) Subject: Merge tag 'sh-for-5.9' of git://git.libc.org/linux-sh X-Git-Tag: microblaze-v5.10~6 X-Git-Url: http://git.monstr.eu/?p=linux-2.6-microblaze.git;a=commitdiff_plain;h=5bbec3cfe376ed0014d9456a9be11d5ed75d587b Merge tag 'sh-for-5.9' of git://git.libc.org/linux-sh 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 in sh: move the ioremap implementation out of line sh: move ioremap_fixed details out of 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 ... --- 5bbec3cfe376ed0014d9456a9be11d5ed75d587b diff --cc arch/m68k/Kconfig index 6663f1741798,8e488369a7e5..6f2f38d05772 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@@ -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 diff --cc arch/sh/include/asm/sparsemem.h index 084706bb8cca,ed287c4980bc..4703cbe23844 --- a/arch/sh/include/asm/sparsemem.h +++ b/arch/sh/include/asm/sparsemem.h @@@ -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 */ diff --cc arch/sh/mm/init.c index cd1379360f08,da7ea48f9439..4735176ab811 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@@ -27,8 -27,8 +27,9 @@@ #include #include #include +#include #include + #include "ioremap.h" pgd_t swapper_pg_dir[PTRS_PER_PGD]; diff --cc arch/um/Kconfig index ef69be17ff70,32c1d1945033..eb51fec75948 --- a/arch/um/Kconfig +++ b/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 diff --cc tools/testing/selftests/seccomp/seccomp_bpf.c index 535720b2592a,6eb21685c88f..7a6d40286a42 --- a/tools/testing/selftests/seccomp/seccomp_bpf.c +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c @@@ -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; }