From: Linus Torvalds Date: Tue, 31 May 2022 21:10:54 +0000 (-0700) Subject: Merge tag 'riscv-for-linus-5.19-mw0' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=35b51afd23c98e2f055ac563aca36173a12588b9;p=linux.git Merge tag 'riscv-for-linus-5.19-mw0' of git://git./linux/kernel/git/riscv/linux 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 ... --- 35b51afd23c98e2f055ac563aca36173a12588b9 diff --cc arch/arm64/Kconfig index a4968845e67f5,ff674808681a9..1652a9800ebee --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@@ -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" diff --cc arch/x86/include/asm/compat.h index 20fd0acd7d800,e74a107de0d07..b1221da477b74 --- a/arch/x86/include/asm/compat.h +++ b/arch/x86/include/asm/compat.h @@@ -15,20 -15,27 +15,26 @@@ #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 - #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 include/linux/kexec.h index fcd5035209f19,ebb1bffbf068c..ce6536f1d2699 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@@ -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