]> git.itanic.dy.fi Git - linux-stable/commitdiff
Merge tag 'riscv-for-linus-5.19-mw0' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 31 May 2022 21:10:54 +0000 (14:10 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 31 May 2022 21:10:54 +0000 (14:10 -0700)
Pull RISC-V updates from Palmer Dabbelt:

 - Support for the Svpbmt extension, which allows memory attributes to
   be encoded in pages

 - Support for the Allwinner D1's implementation of page-based memory
   attributes

 - Support for running rv32 binaries on rv64 systems, via the compat
   subsystem

 - Support for kexec_file()

 - Support for the new generic ticket-based spinlocks, which allows us
   to also move to qrwlock. These should have already gone in through
   the asm-geneic tree as well

 - A handful of cleanups and fixes, include some larger ones around
   atomics and XIP

* tag 'riscv-for-linus-5.19-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (51 commits)
  RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]
  riscv: compat: Using seperated vdso_maps for compat_vdso_info
  RISC-V: Fix the XIP build
  RISC-V: Split out the XIP fixups into their own file
  RISC-V: ignore xipImage
  RISC-V: Avoid empty create_*_mapping definitions
  riscv: Don't output a bogus mmu-type on a no MMU kernel
  riscv: atomic: Add custom conditional atomic operation implementation
  riscv: atomic: Optimize dec_if_positive functions
  riscv: atomic: Cleanup unnecessary definition
  RISC-V: Load purgatory in kexec_file
  RISC-V: Add purgatory
  RISC-V: Support for kexec_file on panic
  RISC-V: Add kexec_file support
  RISC-V: use memcpy for kexec_file mode
  kexec_file: Fix kexec_file.c build error for riscv platform
  riscv: compat: Add COMPAT Kbuild skeletal support
  riscv: compat: ptrace: Add compat_arch_ptrace implement
  riscv: compat: signal: Add rt_frame implementation
  riscv: add memory-type errata for T-Head
  ...

24 files changed:
1  2 
arch/arm64/Kconfig
arch/mips/Kconfig
arch/parisc/Kconfig
arch/parisc/include/asm/unistd.h
arch/powerpc/Kconfig
arch/riscv/Kconfig
arch/riscv/Kconfig.socs
arch/riscv/Makefile
arch/riscv/include/asm/csr.h
arch/riscv/include/asm/pgtable-64.h
arch/riscv/include/asm/pgtable.h
arch/riscv/mm/init.c
arch/s390/Kconfig
arch/s390/include/asm/compat.h
arch/sparc/Kconfig
arch/x86/Kconfig
arch/x86/include/asm/compat.h
fs/open.c
fs/stat.c
include/linux/compat.h
include/linux/kexec.h
init/Kconfig
kernel/kexec_file.c
mm/readahead.c

index a4968845e67f5e14fb4b65eb7c0bc0ae7276cf25,ff674808681a93f81afa9bf95c132a4d51eb8c5b..1652a9800ebee645616948df2249e186e948baff
@@@ -2155,12 -2120,8 +2155,8 @@@ config DM
          However, even with this option, the resultant kernel should
          continue to boot on existing non-UEFI platforms.
  
 -endmenu
 +endmenu # "Boot options"
  
- config SYSVIPC_COMPAT
-       def_bool y
-       depends on COMPAT && SYSVIPC
  menu "Power management options"
  
  source "kernel/power/Kconfig"
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 20fd0acd7d800b58a8b95b2ff807899af94cfae1,e74a107de0d077600be8ae60c2ae8811bb26ed16..b1221da477b7438bf7a562fbbec3069b254addc0
  #define compat_mode_t compat_mode_t
  typedef u16           compat_mode_t;
  
+ #define __compat_uid_t        __compat_uid_t
+ typedef u16           __compat_uid_t;
+ typedef u16           __compat_gid_t;
+ #define compat_dev_t  compat_dev_t
+ typedef u16           compat_dev_t;
+ #define compat_ipc_pid_t compat_ipc_pid_t
+ typedef u16            compat_ipc_pid_t;
+ #define compat_statfs compat_statfs
  #include <asm-generic/compat.h>
  
- #define COMPAT_USER_HZ                100
  #define COMPAT_UTS_MACHINE    "i686\0\0"
  
- typedef u16           __compat_uid_t;
- typedef u16           __compat_gid_t;
- typedef u16           compat_dev_t;
  typedef u16           compat_nlink_t;
- typedef u16           compat_ipc_pid_t;
- typedef __kernel_fsid_t       compat_fsid_t;
  
  struct compat_stat {
 -      compat_dev_t    st_dev;
 -      u16             __pad1;
 +      u32             st_dev;
        compat_ino_t    st_ino;
        compat_mode_t   st_mode;
        compat_nlink_t  st_nlink;
diff --cc fs/open.c
Simple merge
diff --cc fs/stat.c
Simple merge
Simple merge
index fcd5035209f19a510d8ede7103e1ea161088574c,ebb1bffbf068c3a7380f3a14dcef6829a81178d3..ce6536f1d269970856ecabad52f7a7604f27e210
@@@ -219,46 -227,8 +219,46 @@@ struct crash_mem 
  extern int crash_exclude_mem_range(struct crash_mem *mem,
                                   unsigned long long mstart,
                                   unsigned long long mend);
- extern int crash_prepare_elf64_headers(struct crash_mem *mem, int kernel_map,
+ extern int crash_prepare_elf64_headers(struct crash_mem *mem, int need_kernel_map,
                                       void **addr, unsigned long *sz);
 +
 +#ifndef arch_kexec_apply_relocations_add
 +/*
 + * arch_kexec_apply_relocations_add - apply relocations of type RELA
 + * @pi:               Purgatory to be relocated.
 + * @section:  Section relocations applying to.
 + * @relsec:   Section containing RELAs.
 + * @symtab:   Corresponding symtab.
 + *
 + * Return: 0 on success, negative errno on error.
 + */
 +static inline int
 +arch_kexec_apply_relocations_add(struct purgatory_info *pi, Elf_Shdr *section,
 +                               const Elf_Shdr *relsec, const Elf_Shdr *symtab)
 +{
 +      pr_err("RELA relocation unsupported.\n");
 +      return -ENOEXEC;
 +}
 +#endif
 +
 +#ifndef arch_kexec_apply_relocations
 +/*
 + * arch_kexec_apply_relocations - apply relocations of type REL
 + * @pi:               Purgatory to be relocated.
 + * @section:  Section relocations applying to.
 + * @relsec:   Section containing RELs.
 + * @symtab:   Corresponding symtab.
 + *
 + * Return: 0 on success, negative errno on error.
 + */
 +static inline int
 +arch_kexec_apply_relocations(struct purgatory_info *pi, Elf_Shdr *section,
 +                           const Elf_Shdr *relsec, const Elf_Shdr *symtab)
 +{
 +      pr_err("REL relocation unsupported.\n");
 +      return -ENOEXEC;
 +}
 +#endif
  #endif /* CONFIG_KEXEC_FILE */
  
  #ifdef CONFIG_KEXEC_ELF
diff --cc init/Kconfig
Simple merge
Simple merge
diff --cc mm/readahead.c
Simple merge