linux/arch/riscv/include/asm
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
..
vdso riscv: hwprobe: Fix stale vDSO data for late-initialized keys at boot 2025-10-17 22:23:11 -06:00
vendor_extensions riscv: asm: use .insn for making custom instructions 2025-10-27 18:58:37 -06:00
acenv.h RISC-V: Add support to build the ACPI core 2023-06-01 08:45:01 -07:00
acpi.h ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu() 2026-04-06 16:55:16 +02:00
alternative-macros.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
alternative.h riscv: errata: Fix the PAUSE Opcode for MIPS P8700 2025-09-19 10:33:56 -06:00
arch_hweight.h riscv: hweight: Use riscv_has_extension_likely 2025-11-19 09:19:27 -07:00
archrandom.h RISC-V: Implement archrandom when Zkr is available 2024-01-17 18:20:49 -08:00
asm-extable.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
asm-offsets.h
asm-prototypes.h riscv: add hardware error trap handler support 2026-04-04 18:42:44 -06:00
asm.h riscv: asm: use .insn for making custom instructions 2025-10-27 18:58:37 -06:00
assembler.h arch/riscv: compile vdso with landing pad and shadow stack note 2026-01-29 02:38:40 -07:00
atomic.h riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
barrier.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
bitops.h riscv: remove irqflags.h inclusion in asm/bitops.h 2026-01-07 13:16:38 -07:00
bug.h Merge commit 'linus' into core/bugs, to resolve conflicts 2025-08-05 11:15:34 +02:00
bugs.h riscv: Add ghostwrite vulnerability 2025-01-18 12:33:39 -08:00
cache.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
cacheflush.h mm: introduce memdesc_flags_t 2025-09-13 16:55:07 -07:00
cacheinfo.h
cfi.h kcfi: Rename CONFIG_CFI_CLANG to CONFIG_CFI 2025-09-24 14:29:14 -07:00
checksum.h riscv: checksum: Use riscv_has_extension_likely 2025-11-19 09:19:27 -07:00
clint.h
clocksource.h
cmpxchg.h riscv: cmpxchg: Use riscv_has_extension_likely 2025-11-19 09:19:28 -07:00
compat.h riscv: compat: fix COMPAT_UTS_MACHINE definition 2026-01-29 00:59:17 -07:00
cpu_ops_sbi.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
cpu_ops.h riscv: Use the same CPU operations for all CPUs 2024-01-04 15:03:07 -08:00
cpu.h RISC-V: Add support to build the ACPI core 2023-06-01 08:45:01 -07:00
cpufeature-macros.h riscv: Move cpufeature.h macros into their own header 2024-11-11 07:33:08 -08:00
cpufeature.h riscv: zicfiss / zicfilp enumeration 2026-01-25 21:09:53 -07:00
cpuidle.h
crash_reserve.h kexec: split crashkernel reservation code out from crash_core.c 2024-02-23 17:48:21 -08:00
csr.h riscv: csr: define vtype register elements 2026-02-09 15:27:33 -07:00
current.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
delay.h
dma-noncoherent.h riscv: mm: dma-noncoherent: nonstandard cache operations support 2023-09-01 09:08:57 -07:00
dmi.h riscv: dmi: Add SMBIOS/DMI support 2024-06-26 08:02:33 -07:00
efi.h Merge patch series "riscv: Introduce KASLR" 2023-09-08 11:25:13 -07:00
elf.h riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
entry-common.h riscv/traps: Introduce software check exception and uprobe handling 2026-01-29 02:38:40 -07:00
errata_list_vendors.h riscv: errata: Fix the PAUSE Opcode for MIPS P8700 2025-09-19 10:33:56 -06:00
errata_list.h riscv: errata: Fix the PAUSE Opcode for MIPS P8700 2025-09-19 10:33:56 -06:00
exec.h riscv: Randomize lower bits of stack address 2024-09-17 08:05:10 -07:00
extable.h riscv: mm: stub extable related functions/macros for !MMU 2023-06-14 07:17:45 -07:00
fence.h riscv: Add license to fence.h 2024-09-03 07:18:33 -07:00
fixmap.h riscv: Move early dtb mapping into the fixmap region 2023-04-13 18:14:26 -07:00
fpu.h riscv: add support for kernel-mode FPU 2024-05-19 14:36:19 -07:00
ftrace.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
futex.h riscv/futex: sign extend compare value in atomic cmpxchg 2025-02-14 13:06:31 -08:00
gdb_xml.h
gpr-num.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
hugetlb.h mm: introduce memdesc_flags_t 2025-09-13 16:55:07 -07:00
hwcap.h riscv: zicfiss / zicfilp enumeration 2026-01-25 21:09:53 -07:00
hwprobe.h riscv: hwprobe: add support for RISCV_HWPROBE_KEY_IMA_EXT_1 2026-01-29 02:38:40 -07:00
image.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
insn-def.h riscv: Introduce Zalasr instructions 2025-11-19 09:19:28 -07:00
insn.h riscv: kprobes: Move branch_funct3 to insn.h 2025-09-16 18:46:43 -06:00
io.h riscv: introduce ioremap_wc() 2025-09-16 16:24:27 -06:00
irq_stack.h riscv: Deduplicate IRQ stack switching 2023-10-27 14:43:06 -07:00
irq_work.h arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
irq.h ACPI: RISC-V: Add RPMI System MSI to GSI mapping 2025-09-25 19:49:09 -06:00
irqflags.h riscv: Remove unnecessary irqflags processor.h include 2024-04-16 18:50:52 -07:00
jump_label.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
kasan.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
Kbuild fprobe: Add fprobe_header encoding feature 2024-12-26 10:50:05 -05:00
kdebug.h
kexec.h riscv: kexec_file: Support loading Image binary file 2025-06-05 11:09:34 -07:00
kfence.h riscv: Fix IPIs usage in kfence_protect_page() 2024-12-11 11:44:03 -08:00
kgdb.h riscv: kgdb: Ensure that BUFMAX > NUMREGBYTES 2025-10-09 19:36:45 -06:00
kprobes.h riscv: Only consider swbp/ss handlers for correct privileged mode 2023-09-20 06:45:27 -07:00
kvm_aia.h RISC-V: KVM: Drop the return value of kvm_riscv_vcpu_aia_init() 2025-07-28 22:27:07 +05:30
kvm_gstage.h RISC-V: KVM: Cache gstage pgd_levels in struct kvm_gstage 2026-04-04 13:46:46 +05:30
kvm_host.h RISC-V: KVM: Support runtime configuration for per-VM's HGATP mode 2026-04-04 13:21:21 +05:30
kvm_isa.h RISC-V: KVM: Factor-out ISA checks into separate sources 2026-04-03 17:35:01 +05:30
kvm_mmu.h RISC-V: KVM: Factor-out g-stage page table management 2025-07-28 22:27:30 +05:30
kvm_nacl.h RISC-V: KVM: Use SBI sync SRET call when available 2024-10-28 16:44:03 +05:30
kvm_tlb.h RISC-V: KVM: Flush VS-stage TLB after VCPU migration for Andes cores 2025-11-24 09:55:36 +05:30
kvm_types.h
kvm_vcpu_config.h RISC-V: KVM: Factor-out VCPU config into separate sources 2026-04-03 17:48:40 +05:30
kvm_vcpu_fp.h RISC-V: KVM: Improve ISA extension by using a bitmap 2022-07-29 17:14:11 +05:30
kvm_vcpu_insn.h RISC-V: KVM: Add extensible CSR emulation framework 2022-07-29 17:14:53 +05:30
kvm_vcpu_pmu.h RISC-V: KVM: Implement get event info function 2025-09-16 11:49:31 +05:30
kvm_vcpu_sbi_fwft.h RISC-V: KVM: Implement ONE_REG interface for SBI FWFT state 2025-09-16 10:54:21 +05:30
kvm_vcpu_sbi.h RISC-V: KVM: Add SBI MPXY extension support for Guest 2025-11-24 09:55:36 +05:30
kvm_vcpu_timer.h RISC-V: KVM: Fix kvm_riscv_vcpu_timer_pending() for Sstc 2022-10-21 11:52:45 +05:30
kvm_vcpu_vector.h KVM: RISC-V: refactor vector state reset 2025-05-21 09:34:46 +05:30
kvm_vmid.h RISC-V: KVM: Flush VS-stage TLB after VCPU migration for Andes cores 2025-11-24 09:55:36 +05:30
linkage.h
membarrier.h membarrier: riscv: Provide core serializing command 2024-02-15 08:04:14 -08:00
mman.h riscv/mm: ensure PROT_WRITE leads to VM_READ | VM_WRITE 2026-01-25 21:09:53 -07:00
mmio.h riscv/barrier: Consolidate fence definitions 2024-03-19 18:52:24 -07:00
mmiowb.h riscv/barrier: Consolidate fence definitions 2024-03-19 18:52:24 -07:00
mmu_context.h riscv/shstk: If needed allocate a new shadow stack on clone 2026-01-29 02:34:21 -07:00
mmu.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
module.h riscv: module: move find_section to module.h 2023-01-31 23:29:39 -08:00
module.lds.h riscv module: remove (NOLOAD) 2022-03-29 14:31:07 -07:00
numa.h
page.h RISC-V updates for v7.1 2026-04-24 10:00:37 -07:00
paravirt.h riscv/paravirt: Use common code for paravirt_steal_clock() 2026-01-12 16:47:33 +01:00
pci.h RISC-V Patches for the 5.20 Merge Window, Part 1 2022-08-06 15:04:48 -07:00
perf_event.h The biggest change here is eliminating the awful idea that KVM had, of 2024-11-23 16:00:50 -08:00
pgalloc.h riscv: pgtable: unconditionally use tlb_remove_ptdesc() 2025-04-01 15:17:14 -07:00
pgtable-32.h RISC-V: Provide pgtable_l5_enabled on rv32 2023-10-31 19:15:50 -07:00
pgtable-64.h riscv: mm: Define MAX_POSSIBLE_PHYSMEM_BITS for zsmalloc 2025-10-17 22:00:29 -06:00
pgtable-bits.h riscv: mm: add userfaultfd write-protect support 2025-11-24 15:08:55 -08:00
pgtable.h RISC-V updates for v7.1 2026-04-24 10:00:37 -07:00
probes.h
processor.h riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
ptrace.h riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-16 16:25:30 -06:00
runtime-const.h riscv: make runtime const not usable by modules 2026-04-04 18:37:31 -06:00
sbi.h riscv: Add SBI debug trigger extension and function ids 2025-12-19 00:22:30 -07:00
scs.h riscv: Remove support for XIP kernel 2026-04-04 18:42:44 -06:00
seccomp.h
sections.h riscv: Check if the code to patch lies in the exit section 2024-01-09 10:58:59 -08:00
semihost.h riscv: Implement semihost.h for earlycon semihost driver 2023-01-19 14:58:19 +01:00
set_memory.h riscv: Remove support for XIP kernel 2026-04-04 18:42:44 -06:00
signal32.h riscv: compat: signal: Add rt_frame implementation 2022-05-17 16:37:21 -07:00
simd.h riscv: vector: Fix a typo of preempt_v 2024-03-15 10:17:38 -07:00
smp.h riscv: remove redundant check for CONFIG_SMP 2026-04-04 18:42:41 -06:00
soc.h
sparsemem.h RISC-V: Don't have MAX_PHYSMEM_BITS exceed phys_addr_t 2024-09-20 01:32:39 -07:00
spinlock.h riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition 2025-01-08 10:46:01 -08:00
stackprotector.h stackprotector: actually use get_random_canary() 2022-11-18 02:18:10 +01:00
stacktrace.h riscv: declare overflow_stack as exported from traps.c 2024-02-07 09:55:27 -08:00
string.h riscv: lib: add strrchr() implementation 2026-04-04 18:42:44 -06:00
suspend.h riscv: Add stimecmp save and restore 2025-03-18 12:59:03 +00:00
swab.h riscv: introduce asm/swab.h 2025-09-18 08:20:25 -06:00
switch_to.h riscv: vector: Support xtheadvector save/restore 2025-01-18 12:33:33 -08:00
sync_core.h membarrier: riscv: Provide core serializing command 2024-02-15 08:04:14 -08:00
syscall_table.h riscv: convert to generic syscall table 2024-07-10 14:23:38 +02:00
syscall_wrapper.h riscv: Mark __se_sys_* functions __used 2024-03-26 14:11:03 -07:00
syscall.h riscv: fix minor typo in syscall.h comment 2026-01-25 21:08:59 -07:00
text-patching.h asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
thread_info.h riscv: fix various typos in comments and code 2026-04-04 18:42:39 -06:00
timex.h init: consolidate prototypes in linux/init.h 2023-06-09 17:44:16 -07:00
tlb.h mm: pgtable: introduce generic __tlb_remove_table() 2025-01-25 20:22:23 -08:00
tlbbatch.h riscv: Add support for BATCHED_UNMAP_TLB_FLUSH 2024-01-11 08:01:53 -08:00
tlbflush.h mm: remove arch_flush_tlb_batched_pending() arch helper 2025-07-24 19:12:32 -07:00
topology.h arch, mm: move definition of node_data to generic code 2024-09-03 21:15:28 -07:00
trace.h riscv: Add tracepoints for SBI calls and returns 2024-07-10 13:23:09 -07:00
uaccess.h riscv: Add intermediate cast to 'unsigned long' in __get_user_asm 2026-01-22 20:21:14 -07:00
unistd.h riscv: convert to generic syscall table 2024-07-10 14:23:38 +02:00
uprobes.h asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
usercfi.h riscv: cfi: clear CFI lock status in start_thread() 2026-04-04 18:40:58 -06:00
vdso.h arch/riscv: add dual vdso creation logic and select vdso based on hw 2026-01-29 02:38:40 -07:00
vector.h riscv: signal: abstract header saving for setup_sigcontext 2025-12-19 00:18:33 -07:00
vendor_extensions.h riscv: cpufeature: Extract common elements from extension checking 2024-07-22 15:36:57 -07:00
vendorid_list.h riscv: Update MIPS vendor id to 0x127 2025-11-15 15:27:02 -07:00
vermagic.h
vmalloc.h riscv: Add license to vmalloc.h 2024-09-03 07:18:34 -07:00
word-at-a-time.h kernel.h: removed REPEAT_BYTE from kernel.h 2024-02-01 09:47:59 -08:00