Skip to content

Commit 2bb7e0c

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
riscv: Fix compilation error with FAST_GUP and rv32
By surrounding the definition of pte_leaf_size() with a ifdef napot as it should have been. Fixes: e0fe5ab ("riscv: Fix pte_leaf_size() for NAPOT") Signed-off-by: Alexandre Ghiti <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent e0fe5ab commit 2bb7e0c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/riscv/include/asm/pgtable.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,11 @@ static inline pte_t pte_mkhuge(pte_t pte)
439439
return pte;
440440
}
441441

442+
#ifdef CONFIG_RISCV_ISA_SVNAPOT
442443
#define pte_leaf_size(pte) (pte_napot(pte) ? \
443444
napot_cont_size(napot_cont_order(pte)) :\
444445
PAGE_SIZE)
446+
#endif
445447

446448
#ifdef CONFIG_NUMA_BALANCING
447449
/*

0 commit comments

Comments
 (0)