Skip to content

Commit 3137db4

Browse files
ardbiesheuvelctmarinas
authored andcommitted
arm64/mm: Use generic __pud_free() helper in pud_free() implementation
Commit 0dd4f60 ("arm64: mm: Add support for folding PUDs at runtime") implements specialized PUD alloc/free helpers to allow the decision whether or not to fold PUDs to be made at runtime when the number of paging levels is 4 or higher. Its implementation of pud_free() is based on the generic version that existed when the patch was first written, but in the meantime, the freeing of a PUD has become a bit more involved, and so instead of simply freeing the page, we should invoke the generic __pud_free() that encapsulates whatever needs doing at this point. This fixes a reported warning emitted by the page flags self-diagnostics. Reported-by: Ryan Roberts <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Tested-by: Ryan Roberts <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 2758269 commit 3137db4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/arm64/include/asm/pgalloc.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
6060
{
6161
if (!pgtable_l4_enabled())
6262
return;
63-
BUG_ON((unsigned long)pud & (PAGE_SIZE-1));
64-
free_page((unsigned long)pud);
63+
__pud_free(mm, pud);
6564
}
6665
#else
6766
static inline void __p4d_populate(p4d_t *p4dp, phys_addr_t pudp, p4dval_t prot)

0 commit comments

Comments
 (0)