riscv: Fix pte_leaf_size() for NAPOT
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Tue, 27 Feb 2024 20:50:16 +0000 (21:50 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 29 Feb 2024 18:21:23 +0000 (10:21 -0800)
commite0fe5ab4192c171c111976dbe90bbd37d3976be0
treee64f2b95f7cfb4d6d351af5bd5e2ed10a82b0a46
parent16ab4646c9057e0528b985ad772e3cb88c613db2
riscv: Fix pte_leaf_size() for NAPOT

pte_leaf_size() must be reimplemented to add support for NAPOT mappings.

Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240227205016.121901-3-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/pgtable.h