RISC-V With Linux 5.19 Preps "COMPAT" Mode For 32-bit Apps On 64-bit Kernels & More
For the Linux 5.19 cycle the RISC-V arch code is bringing initial compatibility work for allowing 32-bit RISC-V user-space applications to run on 64-bit RISC-V kernels, new RISC-V extension work, supporting the kexec_file system call, and more. Below are the key highlights.
- Support for kexec_file on RISC-V. Kexec_file_load is the newer Kexec system call for the Linux kernel. RISC-V had already provided Kexec support as the means to allow loading and booting into another kernel from the currently running kernel. The kexec_file system call is file-based and relies on file descriptors being passed for the kernel and initramfs rather than a list of segments.
- A new ticket-based spinlock system that uses generic atomics and doesn't require as much from the memory system as qspinlocks in order to be fair.
- Initial "COMPAT" support for being able to run 32-bit U-mode on 64-bit kernel at S-mode configuration. This COMPAT support is for being able to run 32-bit user-space applications on RISC-V 64-bit kernels.
- Support for the "Svpbmt" extension for "Supervisor-Mode: Page-Based Memory Types" to provide for pages being able to be marked as non-cacheable and/or I/O. As part of the merge is also enabling support for the Allwinner D1's page table attribute memory types. Additionally this patch series also introduces the "RISCV_ALTERNATIVE" option for being able to automatically patch errata required by the execution platform at run-time. This code patching is performed during the system boot stages. This RISC-V "ALTERNATIVE" framework is being introduced due to the Allwinner's D1 memory types implementation being different from the final Svpbmt spec.
See RISC-V's for-next branch of the patches queued up ahead of the imminent Linux 5.19 merge window.