mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
riscv: pgtable: Fixup comment for KERN_VIRT_SIZE
KERN_VIRT_SIZE is 1/4 of the entries of the page global directory,
not half.
Fixes: f7ae02333d
("riscv: Move KASAN mapping next to the kernel mapping")
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Cc: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20230110080419.931185-1-guoren@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
61a9b71290
commit
6be1ff430d
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@
|
|||
#define PTRS_PER_PTE (PAGE_SIZE / sizeof(pte_t))
|
||||
|
||||
/*
|
||||
* Half of the kernel address space (half of the entries of the page global
|
||||
* Half of the kernel address space (1/4 of the entries of the page global
|
||||
* directory) is for the direct mapping.
|
||||
*/
|
||||
#define KERN_VIRT_SIZE ((PTRS_PER_PGD / 2 * PGDIR_SIZE) / 2)
|
||||
|
|
Loading…
Reference in a new issue