[PATCH 2/3] riscv: Fix wrong comment about task size for riscv64

Alexandre Ghiti
2018-12-10T06:24:28Z

The comment indicated a wrong size which was misleading, after
the following computation, TASK_SIZE is in fact equal to
0x4000000000.

TASK_SIZE = (PGDIR_SIZE * PTRS_PER_PGD / 2)
with PGDIR_SIZE = 1 << 30 and PTRS_PER_PGD = 4K / 8 = 0x200
=> TASK_SIZE = 0x40000000 * 0x100 = 0x4000000000

Signed-off-by: Alexandre Ghiti <aghiti@upmem.com>
---
arch/riscv/include/asm/pgtable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 50ea3d6e7de7..db3bf0dccd0d 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -420,7 +420,7 @@ static inline void pgtable_cache_init(void)
#define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE)

/*
- * Task size is 0x40000000000 for RV64 or 0xb800000 for RV32.
+ * Task size is 0x4000000000 for RV64 or 0xb800000 for RV32.
* Note that PGDIR_SIZE must evenly divide TASK_SIZE.
*/
#ifdef CONFIG_64BIT
--
2.16.2