]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: Kconfig: Add support for LSUI
authorYeoreum Yun <yeoreum.yun@arm.com>
Sat, 14 Mar 2026 17:51:33 +0000 (17:51 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 27 Mar 2026 12:52:45 +0000 (12:52 +0000)
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for
previleged level to access to access user memory without clearing
PSTATE.PAN bit.

Add Kconfig option entry for FEAT_LSUI.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/Kconfig

index 38dba5f7e4d2d7e6d2ea4ef696578b5dae8d1192..890a1bedbf4a4156b70a1f50b8256d1349a49db4 100644 (file)
@@ -2215,6 +2215,26 @@ config ARM64_GCS
 
 endmenu # "ARMv9.4 architectural features"
 
+config AS_HAS_LSUI
+       def_bool $(as-instr,.arch_extension lsui)
+       help
+         Supported by LLVM 20+ and binutils 2.45+.
+
+menu "ARMv9.6 architectural features"
+
+config ARM64_LSUI
+       bool "Support Unprivileged Load Store Instructions (LSUI)"
+       default y
+       depends on AS_HAS_LSUI && !CPU_BIG_ENDIAN
+       help
+         The Unprivileged Load Store Instructions (LSUI) provides
+         variants load/store instructions that access user-space memory
+         from the kernel without clearing PSTATE.PAN bit.
+
+         This feature is supported by LLVM 20+ and binutils 2.45+.
+
+endmenu # "ARMv9.6 architectural feature"
+
 config ARM64_SVE
        bool "ARM Scalable Vector Extension support"
        default y