Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c8e910d7 authored by Chintan Pandya's avatar Chintan Pandya Committed by Sudarshan Rajagopalan
Browse files

arm64: Implement page table free interfaces



arm64 requires break-before-make. Originally, before
setting up new pmd/pud entry for huge mapping, in few
cases, the modifying pmd/pud entry was still valid
and pointing to next level page table as we only
clear off leaf PTE in unmap leg.

 a) This was resulting into stale entry in TLBs (as few
    TLBs also cache intermediate mapping for performance
    reasons)
 b) Also, modifying pmd/pud was the only reference to
    next level page table and it was getting lost without
    freeing it. So, page leaks were happening.

Implement pud_free_pmd_page() and pmd_free_pte_page() to
enforce BBM and also free the leaking page tables.

Implementation requires,
 1) Clearing off the current pud/pmd entry
 2) Invalidation of TLB
 3) Freeing of the un-used next level page tables

Change-Id: I5d2ef6ff8a15a2fa832f2f376a885288a071a49e
Reviewed-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarChintan Pandya <cpandya@codeaurora.org>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Git-Commit: ec28bb9c9b0826d7bd36f44cccfa5295c291cadd
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarSudarshan Rajagopalan <sudaraja@codeaurora.org>
parent bdb6dcae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment