]> www.infradead.org Git - users/jedix/linux-maple.git/commit
riscv: Add ISA extension parsing for pointer masking
authorSamuel Holland <samuel.holland@sifive.com>
Wed, 16 Oct 2024 20:27:43 +0000 (13:27 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 24 Oct 2024 21:12:53 +0000 (14:12 -0700)
commit2e6f6ea452aa9fa9f150520fdecf6bda31954db4
treecc0bbb130b15bb47ed676c4602f023ff33eab4a4
parent8727163a1ae304b5b4ac5952f593936ab9024d37
riscv: Add ISA extension parsing for pointer masking

The RISC-V Pointer Masking specification defines three extensions:
Smmpm, Smnpm, and Ssnpm. Add support for parsing each of them. The
specific extension which provides pointer masking support to userspace
(Supm) depends on the kernel's privilege mode, so provide a macro to
abstract this selection.

Smmpm implies the existence of the mseccfg CSR. As it is the only user
of this CSR so far, there is no need for an Xlinuxmseccfg extension.

Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20241016202814.4061541-3-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/hwcap.h
arch/riscv/kernel/cpufeature.c