diff options
author | Alexandre Ghiti <alexghiti@rivosinc.com> | 2025-03-17 08:25:51 +0100 |
---|---|---|
committer | Alexandre Ghiti <alexghiti@rivosinc.com> | 2025-04-01 07:03:03 +0000 |
commit | 83d78ac677b9fdd8ea763507c6fe02d6bf415f3a (patch) | |
tree | 4bb7ae78dd8786289d205070653c3ce4465f6c08 /rust/helpers/build_bug.c | |
parent | a3313375e88e0075b9048eba15e5eb4dbf93f60e (diff) | |
download | linux-83d78ac677b9fdd8ea763507c6fe02d6bf415f3a.tar.gz linux-83d78ac677b9fdd8ea763507c6fe02d6bf415f3a.tar.bz2 linux-83d78ac677b9fdd8ea763507c6fe02d6bf415f3a.zip |
riscv: Fix hugetlb retrieval of number of ptes in case of !present pte
Ryan sent a fix [1] for arm64 that applies to riscv too: in some hugetlb
functions, we must not use the pte value to get the size of a mapping
because the pte may not be present.
So use the already present size parameter for huge_pte_clear() and the
newly introduced size parameter for huge_ptep_get_and_clear(). And make
sure to gather A/D bits only on present ptes.
Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page")
Link: https://lore.kernel.org/all/20250217140419.1702389-1-ryan.roberts@arm.com/ [1]
Link: https://lore.kernel.org/r/20250317072551.572169-1-alexghiti@rivosinc.com
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Diffstat (limited to 'rust/helpers/build_bug.c')
0 files changed, 0 insertions, 0 deletions