[RFC PATCH 2/2] riscv: mm: correct the stale RV32 TASK_SIZE comment

Yu Jin lambda.jinyu at gmail.com
Sun Aug 30 09:12:05 PDT 2026


RV32 defines TASK_SIZE as FIXADDR_START. Its value depends on
VMEMMAP_SIZE, which in turn depends on the configured size of struct
page. The fixed 0x9fc00000 value in the comment is therefore stale.

Describe the macro relationship instead of replacing one
configuration-specific address with another.

Signed-off-by: Yu Jin <lambda.jinyu at gmail.com>
---
 arch/riscv/include/asm/pgtable.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 40b1ed4f3ea8..32348787462c 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -1231,10 +1231,8 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
 #endif
 
 /*
- * Task size is 0x4000000000 for RV64 or 0x9fc00000 for RV32.
- * Note that PGDIR_SIZE must evenly divide TASK_SIZE.
- * Task size is:
- * -        0x9fc00000	(~2.5GB) for RV32.
+ * For RV32, TASK_SIZE is FIXADDR_START and depends on VMEMMAP_SIZE.
+ * For RV64, task size is:
  * -      0x4000000000	( 256GB) for RV64 using SV39 mmu
  * -    0x800000000000	( 128TB) for RV64 using SV48 mmu
  * - 0x100000000000000	(  64PB) for RV64 using SV57 mmu
-- 
2.43.0




More information about the linux-riscv mailing list