linux/arch/riscv/kernel
Linus Torvalds feff82eb5f RISC-V updates for v7.1
- Add Kunit correctness testing and microbenchmarks for strlen(),
   strnlen(), and strrchr()
 
 - Add RISC-V-specific strnlen(), strchr(), strrchr() implementations
 
 - Add hardware error exception handling
 
 - Clean up and optimize our unaligned access probe code
 
 - Enable HAVE_IOREMAP_PROT to be able to use generic_access_phys()
 
 - Remove XIP kernel support
 
 - Warn when addresses outside the vmemmap range are passed to
   vmemmap_populate()
 
 - Update the ACPI FADT revision check to warn if it's not at least
   ACPI v6.6, which is when key RISC-V-specific tables were added to the
   specification
 
 - Increase COMMAND_LINE_SIZE to 2048 to match ARM64, x86, PowerPC, etc.
 
 - Make kaslr_offset() a static inline function, since there's no need
   for it to show up in the symbol table
 
 - Add KASLR offset and SATP to the VMCOREINFO ELF notes to improve
   kdump support
 
 - Add Makefile cleanup rule for vdso_cfi copied source files, and add
   a .gitignore for the build artifacts in that directory
 
 - Remove some redundant ifdefs that check Kconfig macros
 
 - Add missing SPDX license tag to the CFI selftest
 
 - Simplify UTS_MACHINE assignment in the RISC-V Makefile
 
 - Clarify some unclear comments and remove some superfluous comments
 
 - Fix various English typos across the RISC-V codebase
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEElRDoIDdEz9/svf2Kx4+xDQu9KksFAmnqoPQACgkQx4+xDQu9
 KksBGw/+K4cZ5+m2hnS8RVZmreDHPkpLuRmIxqPe1JG/cS0KHwWBX+IX9uYdrmqP
 Ex+hZyt+pqFAdbEcV0t4445RR8Lz7D4SxzFFk6q36OuWkrFahOnQQm0prdO+CSok
 Ch4AqbH0WNbgoU5xGpCbfsBeNeDOJWc+sNKmoMGF1mlZyy7s7m5jwu2vxdpuc7Ut
 pkzqA87JR2Pn2C0EitlJv2mYiKLrnl+ma+yRLjLC3mtubs1HjIUoPTtS4iEuZt41
 SabT0SWKPhKXvjxnVxqxKGizH77eciIz+fjecFGB2lO07Lc3z2asT8sJ1bnCspMI
 e0Thbohs5Z2q2vGg49UqfDCm47BUWkSjhtgOi1E/JcWPahgCGGP4mYLD6AVZ9biK
 gQofXZq5XGxLWjKOoNqh5nPIYIWDtgQgQkXkLiCNYcp1CZ0RaCkkER64UKeRuhoS
 tSZuLIbjNzqQMhD9tKWnPueQS3tz3CdNvSMWiDgy+2HoKYIxcaDJ5zPPCMVTWEHn
 ohoTLG63oRglV2x5ol27FQKip4SUpxXaDtnuPBytsgys88m0TIOkXvWpzU5si5jQ
 O3n43ZiHsnA7jRl4MVlFKDwzHFnm8eOMxpThU34oHJku8AyYQS9zTc05KfbjJEsp
 p7YDuh8bH7FHyxLQXHFNor4dCDRY7xU67urz3wjaGRopKA4UE4g=
 =hG4G
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-7.1-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V updates from Paul Walmsley:
 "There is one significant change outside arch/riscv in this pull
  request: the addition of a set of KUnit tests for strlen(), strnlen(),
  and strrchr().

  Otherwise, the most notable changes are to add some RISC-V-specific
  string function implementations, to remove XIP kernel support, to add
  hardware error exception handling, and to optimize our runtime
  unaligned access speed testing.

  A few comments on the motivation for removing XIP support. It's been
  broken in the RISC-V kernel for months. The code is not easy to
  maintain. Furthermore, for XIP support to truly be useful for RISC-V,
  we think that compile-time feature switches would need to be added for
  many of the RISC-V ISA features and microarchitectural properties that
  are currently implemented with runtime patching. No one has stepped
  forward to take responsibility for that work, so many of us think it's
  best to remove it until clear use cases and champions emerge.

  Summary:

   - Add Kunit correctness testing and microbenchmarks for strlen(),
     strnlen(), and strrchr()

   - Add RISC-V-specific strnlen(), strchr(), strrchr() implementations

   - Add hardware error exception handling

   - Clean up and optimize our unaligned access probe code

   - Enable HAVE_IOREMAP_PROT to be able to use generic_access_phys()

   - Remove XIP kernel support

   - Warn when addresses outside the vmemmap range are passed to
     vmemmap_populate()

   - Update the ACPI FADT revision check to warn if it's not at least
     ACPI v6.6, which is when key RISC-V-specific tables were added to
     the specification

   - Increase COMMAND_LINE_SIZE to 2048 to match ARM64, x86, PowerPC,
     etc.

   - Make kaslr_offset() a static inline function, since there's no need
     for it to show up in the symbol table

   - Add KASLR offset and SATP to the VMCOREINFO ELF notes to improve
     kdump support

   - Add Makefile cleanup rule for vdso_cfi copied source files, and add
     a .gitignore for the build artifacts in that directory

   - Remove some redundant ifdefs that check Kconfig macros

   - Add missing SPDX license tag to the CFI selftest

   - Simplify UTS_MACHINE assignment in the RISC-V Makefile

   - Clarify some unclear comments and remove some superfluous comments

   - Fix various English typos across the RISC-V codebase"

* tag 'riscv-for-linus-7.1-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (31 commits)
  riscv: Remove support for XIP kernel
  riscv: Reuse compare_unaligned_access() in check_vector_unaligned_access()
  riscv: Split out compare_unaligned_access()
  riscv: Reuse measure_cycles() in check_vector_unaligned_access()
  riscv: Split out measure_cycles() for reuse
  riscv: Clean up & optimize unaligned scalar access probe
  riscv: lib: add strrchr() implementation
  riscv: lib: add strchr() implementation
  riscv: lib: add strnlen() implementation
  lib/string_kunit: extend benchmarks to strnlen() and chr searches
  lib/string_kunit: add performance benchmark for strlen()
  lib/string_kunit: add correctness test for strrchr()
  lib/string_kunit: add correctness test for strnlen()
  lib/string_kunit: add correctness test for strlen()
  riscv: vdso_cfi: Add .gitignore for build artifacts
  riscv: vdso_cfi: Add clean rule for copied sources
  riscv: enable HAVE_IOREMAP_PROT
  riscv: mm: WARN_ON() for bad addresses in vmemmap_populate()
  riscv: acpi: update FADT revision check to 6.6
  riscv: add hardware error trap handler support
  ...
2026-04-24 10:00:37 -07:00
..
compat_vdso Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
pi riscv: pi: use 'targets' instead of extra-y in Makefile 2025-09-18 08:20:56 -06:00
probes riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
tests Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vdso arch/riscv: add dual vdso creation logic and select vdso based on hw 2026-01-29 02:38:40 -07:00
vdso_cfi riscv: vdso_cfi: Add .gitignore for build artifacts 2026-04-04 18:42:44 -06:00
vendor_extensions riscv: hwprobe: Add MIPS vendor extension probing 2025-09-19 10:33:56 -06:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
acpi_numa.c RISC-V: ACPI: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval 2026-04-06 16:55:15 +02:00
acpi.c RISC-V updates for v7.1 2026-04-24 10:00:37 -07:00
alternative.c riscv: errata: Fix the PAUSE Opcode for MIPS P8700 2025-09-19 10:33:56 -06:00
asm-offsets.c riscv: enable kernel access to shadow stack memory via the FWFT SBI call 2026-01-29 02:38:40 -07:00
bugs.c riscv: Add ghostwrite vulnerability 2025-01-18 12:33:39 -08:00
cacheinfo.c riscv: cacheinfo: Use of_property_present() for non-boolean properties 2025-02-14 13:04:20 -08:00
cfi.c cfi: Move BPF CFI types and helpers to generic code 2025-07-31 18:23:53 -07:00
compat_signal.c riscv: compat: signal: Add rt_frame implementation 2022-05-17 16:37:21 -07:00
compat_syscall_table.c riscv: convert to generic syscall table 2024-07-10 14:23:38 +02:00
copy-unaligned.h RISC-V: Report vector unaligned access speed hwprobe 2024-10-18 12:38:34 -07:00
copy-unaligned.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
cpu_ops_sbi.c riscv: cpu_ops_sbi: smp_processor_id() returns int, not unsigned int 2026-01-07 13:03:16 -07:00
cpu_ops_spinwait.c riscv: prevent pt_regs corruption for secondary idle threads 2024-05-30 09:42:51 -07:00
cpu_ops.c riscv: Use the same CPU operations for all CPUs 2024-01-04 15:03:07 -08:00
cpu-hotplug.c riscv: remove redundant #ifdef check in cpu-hotplug 2026-04-04 18:42:41 -06:00
cpu.c RISC-V: Don't print details of CPUs disabled in DT 2025-10-17 22:02:21 -06:00
cpufeature.c riscv: add kernel command line option to opt out of user CFI 2026-01-29 02:38:40 -07:00
crash_dump.c vmcore: convert copy_oldmem_page() to take an iov_iter 2022-04-29 14:37:59 -07:00
crash_save_regs.S RISC-V: Fixup get incorrect user mode PC for kernel mode regs 2022-08-11 08:54:40 -07:00
efi-header.S include: pe.h: Fix PE definitions 2025-05-21 16:46:37 +02:00
efi.c riscv: Use accessors to page table entries instead of direct dereference 2023-12-20 10:48:15 -08:00
entry.S riscv: add hardware error trap handler support 2026-04-04 18:42:44 -06:00
fpu.S RISC-V: Replace RISCV_MISALIGNED with RISCV_SCALAR_MISALIGNED 2024-10-18 12:38:32 -07:00
ftrace.c riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
head.h riscv: Remove support for XIP kernel 2026-04-04 18:42:44 -06:00
head.S riscv: Remove support for XIP kernel 2026-04-04 18:42:44 -06:00
hibernate-asm.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
hibernate.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
image-vars.h sysfb: Replace screen_info with sysfb_primary_display 2025-12-16 14:12:44 +01:00
irq.c riscv: Helper to parse hart index 2025-06-26 16:06:40 +02:00
jump_label.c riscv: Move nop definition to insn-def.h 2025-03-20 09:14:42 +00:00
kernel_mode_fpu.c riscv: add support for kernel-mode FPU 2024-05-19 14:36:19 -07:00
kernel_mode_vector.c riscv: vector: Support xtheadvector save/restore 2025-01-18 12:33:33 -08:00
kexec_elf.c riscv: kexec: Initialize kexec_buf struct 2025-09-05 15:31:28 -06:00
kexec_image.c riscv: kexec_image: Fix dead link to boot-image-header.rst 2026-01-05 17:54:11 -07:00
kexec_relocate.S riscv: kexec: Cleanup riscv_kexec_relocate 2023-09-20 02:53:29 -07:00
kgdb.c riscv: kgdb: fix several debug register assignment bugs 2026-04-04 18:36:52 -06:00
machine_kexec_file.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
machine_kexec.c kexec: Consolidate machine_kexec_mask_interrupts() implementation 2024-12-11 20:32:34 +01:00
Makefile arch/riscv: add dual vdso creation logic and select vdso based on hw 2026-01-29 02:38:40 -07:00
Makefile.syscalls syscalls: fix syscall macros for newfstat/newfstatat 2024-08-02 15:20:47 +02:00
mcount-dyn.S riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
mcount.S riscv: fgraph: Fix stack layout to match __arch_ftrace_regs argument of ftrace_return_to_handler 2025-03-19 12:03:25 +00:00
module-sections.c riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
module.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
paravirt.c riscv/paravirt: Use common code for paravirt_steal_clock() 2026-01-12 16:47:33 +01:00
patch.c riscv: patch: Avoid early phys_to_page() 2026-04-04 18:37:03 -06:00
perf_callchain.c The biggest change here is eliminating the awful idea that KVM had, of 2024-11-23 16:00:50 -08:00
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
process.c riscv: cfi: clear CFI lock status in start_thread() 2026-04-04 18:40:58 -06:00
ptrace.c riscv: ptrace: cfi: expand "SS" references to "shadow stack" in uapi headers 2026-04-04 18:40:58 -06:00
reset.c riscv: Use do_kernel_power_off() 2022-05-19 19:30:30 +02:00
return_address.c riscv: add CALLER_ADDRx support 2024-02-22 12:17:47 -08:00
riscv_ksyms.c riscv: Omit optimized string routines when using KASAN 2024-09-19 01:10:00 -07:00
sbi_ecall.c riscv: Fix RISCV_ALTERNATIVE_EARLY 2024-09-03 07:57:55 -07:00
sbi-ipi.c RISC-V: Enable the IPI before workqueue_online_cpu() 2024-08-01 07:15:43 -07:00
sbi.c riscv: sbi: Prefer SRST shutdown over legacy 2025-11-16 10:37:27 -07:00
setup.c riscv: Remove support for XIP kernel 2026-04-04 18:42:44 -06:00
signal.c riscv/signal: save and restore the shadow stack on a signal 2026-01-29 02:38:40 -07:00
smp.c riscv: Register IPI IRQs with unique names 2025-10-17 22:00:29 -06:00
smpboot.c riscv: smp: Clarify comment "cache" -> "instruction cache" 2026-04-04 18:42:40 -06:00
soc.c riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
stacktrace.c riscv: stacktrace: Disable KASAN checks for non-current tasks 2025-10-27 11:40:43 -06:00
suspend_entry.S riscv: Remove support for XIP kernel 2026-04-04 18:42:44 -06:00
suspend.c riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
sys_hwprobe.c riscv/hwprobe: add zicfilp / zicfiss enumeration in hwprobe 2026-01-29 02:38:40 -07:00
sys_riscv.c riscv/mm: ensure PROT_WRITE leads to VM_READ | VM_WRITE 2026-01-25 21:09:53 -07:00
syscall_table.c riscv: convert to generic syscall table 2024-07-10 14:23:38 +02:00
time.c RISC-V: paravirt: Add skeleton for pv-time support 2023-12-30 11:25:03 +05:30
traps_misaligned.c riscv: Move all duplicate insn parsing macros into asm/insn.h 2025-09-16 16:29:07 -06:00
traps.c RISC-V updates for v7.1 2026-04-24 10:00:37 -07:00
unaligned_access_speed.c riscv: Reuse compare_unaligned_access() in check_vector_unaligned_access() 2026-04-04 18:42:44 -06:00
usercfi.c mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
vdso.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
vec-copy-unaligned.S riscv: Fix the __riscv_copy_vec_words_unaligned implementation 2025-03-18 13:37:27 +00:00
vector.c riscv: vector: init vector context with proper vlenb 2026-02-09 15:27:33 -07:00
vendor_extensions.c riscv: Add xmipsexectl as a vendor extension 2025-09-18 20:36:00 -06:00
vmcore_info.c riscv: Remove support for XIP kernel 2026-04-04 18:42:44 -06:00
vmlinux-xip.lds.S riscv: remove limit on the size of read-only section for XIP kernel 2024-09-12 07:23:02 -07:00
vmlinux.lds.S riscv: Remove support for XIP kernel 2026-04-04 18:42:44 -06:00