diff mbox series

[RFC,v2,18/21] riscv: Kconfig: Introduce 64K page size

Message ID 20241205103729.14798-19-luxu.kernel@bytedance.com (mailing list archive)
State New
Headers show
Series riscv: Introduce 64K base page | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR fail PR summary
conchuod/patch-18-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh took 209.60s
conchuod/patch-18-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 1358.27s
conchuod/patch-18-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 1567.59s
conchuod/patch-18-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 79.84s
conchuod/patch-18-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 81.86s
conchuod/patch-18-test-6 warning .github/scripts/patches/tests/checkpatch.sh took 0.44s
conchuod/patch-18-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh took 48.91s
conchuod/patch-18-test-8 success .github/scripts/patches/tests/header_inline.sh took 0.01s
conchuod/patch-18-test-9 success .github/scripts/patches/tests/kdoc.sh took 0.73s
conchuod/patch-18-test-10 success .github/scripts/patches/tests/module_param.sh took 0.01s
conchuod/patch-18-test-11 success .github/scripts/patches/tests/verify_fixes.sh took 0.00s
conchuod/patch-18-test-12 success .github/scripts/patches/tests/verify_signedoff.sh took 0.04s
conchuod/vmtest-fixes-PR fail merge-conflict

Commit Message

Xu Lu Dec. 5, 2024, 10:37 a.m. UTC
This patch introduces new config to control whether enabling the 64K
base page feature on RISC-V.

The 64K config will set software page size as 64K and automatically use
svnapot to accelerate basic page mapping.

Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
---
 arch/riscv/Kconfig | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 2c0cb175a92a..592eb5766029 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -167,7 +167,6 @@  config RISCV
 	select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD
 	select HAVE_MOVE_PMD
 	select HAVE_MOVE_PUD
-	select HAVE_PAGE_SIZE_4KB
 	select HAVE_PCI
 	select HAVE_PERF_EVENTS
 	select HAVE_PERF_REGS
@@ -885,6 +884,28 @@  config RISCV_BOOT_SPINWAIT
 
 	  If unsure what to do here, say N.
 
+choice
+	prompt "Page size"
+	default RISCV_4K_PAGES
+	help
+	  Page size (translation granule) configuration.
+
+config RISCV_4K_PAGES
+	bool "4KB"
+	select HAVE_PAGE_SIZE_4KB
+	help
+	  This feature enables 4KB pages support.
+
+config RISCV_64K_PAGES
+	bool "64KB"
+	depends on RISCV_ISA_SVNAPOT && 64BIT
+	select HAVE_PAGE_SIZE_64KB
+	select RISCV_USE_SW_PAGE
+	help
+	  This feature enables 64KB pages support.
+
+endchoice
+
 config ARCH_SUPPORTS_KEXEC
 	def_bool y