Skip to content

Commit 26eee2b

Browse files
charlie-rivospalmer-dabbelt
authored andcommitted
RISC-V: mm: Update pgtable comment documentation
sv57 is supported in the kernel so pgtable.h should reflect that. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20230809232218.849726-4-charlie@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 4d0c04e commit 26eee2b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arch/riscv/include/asm/pgtable.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,14 +851,16 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
851851
* Task size is 0x4000000000 for RV64 or 0x9fc00000 for RV32.
852852
* Note that PGDIR_SIZE must evenly divide TASK_SIZE.
853853
* Task size is:
854-
* - 0x9fc00000 (~2.5GB) for RV32.
855-
* - 0x4000000000 ( 256GB) for RV64 using SV39 mmu
856-
* - 0x800000000000 ( 128TB) for RV64 using SV48 mmu
854+
* - 0x9fc00000 (~2.5GB) for RV32.
855+
* - 0x4000000000 ( 256GB) for RV64 using SV39 mmu
856+
* - 0x800000000000 ( 128TB) for RV64 using SV48 mmu
857+
* - 0x100000000000000 ( 64PB) for RV64 using SV57 mmu
857858
*
858859
* Note that PGDIR_SIZE must evenly divide TASK_SIZE since "RISC-V
859860
* Instruction Set Manual Volume II: Privileged Architecture" states that
860861
* "load and store effective addresses, which are 64bits, must have bits
861862
* 63–48 all equal to bit 47, or else a page-fault exception will occur."
863+
* Similarly for SV57, bits 63–57 must be equal to bit 56.
862864
*/
863865
#ifdef CONFIG_64BIT
864866
#define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2)

0 commit comments

Comments
 (0)