Skip to content

Commit 31a9122

Browse files
Anshuman Khandualsuryasaimadhu
authored andcommitted
x86/mm: Drop pud_mknotpresent()
There is an inconsistency between PMD and PUD-based THP page table helpers like the following, as pud_present() does not test for _PAGE_PSE. pmd_present(pmd_mknotpresent(pmd)) : True pud_present(pud_mknotpresent(pud)) : False Drop pud_mknotpresent() as there are no current users. If/when needed back later, pud_present() will also have to be fixed to accommodate _PAGE_PSE. Signed-off-by: Anshuman Khandual <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Baoquan He <[email protected]> Acked-by: Balbir Singh <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 4dd2a1b commit 31a9122

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

arch/x86/include/asm/pgtable.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -595,12 +595,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
595595
__pgprot(pmd_flags(pmd) & ~(_PAGE_PRESENT|_PAGE_PROTNONE)));
596596
}
597597

598-
static inline pud_t pud_mknotpresent(pud_t pud)
599-
{
600-
return pfn_pud(pud_pfn(pud),
601-
__pgprot(pud_flags(pud) & ~(_PAGE_PRESENT|_PAGE_PROTNONE)));
602-
}
603-
604598
static inline u64 flip_protnone_guard(u64 oldval, u64 val, u64 mask);
605599

606600
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)

0 commit comments

Comments
 (0)