[lkml]   [2020]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] x86/memory: 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

This drops pud_mknotpresent() as there are no current users. If/when needed
back later, pud_present() will also have to fixed to accommodate _PAGE_PSE.

Cc: Thomas Gleixner <>
Cc: Ingo Molnar <>
Cc: Borislav Petkov <>
Cc: "H. Peter Anvin" <>
Cc: Dave Hansen <>
Cc: Kirill A. Shutemov <>
Cc: Dan Williams <>
Cc: Andrew Morton <>
Signed-off-by: Anshuman Khandual <>
This has been build and boot tested on x86.

Changes in V2:

- Dropped pud_mknotpresent() instead per Kirill

Changes in V1: (

arch/x86/include/asm/pgtable.h | 6 ------
1 file changed, 6 deletions(-)

diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 7e118660bbd9..d74dc560e3ab 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -595,12 +595,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
__pgprot(pmd_flags(pmd) & ~(_PAGE_PRESENT|_PAGE_PROTNONE)));

-static inline pud_t pud_mknotpresent(pud_t pud)
- return pfn_pud(pud_pfn(pud),
- __pgprot(pud_flags(pud) & ~(_PAGE_PRESENT|_PAGE_PROTNONE)));
static inline u64 flip_protnone_guard(u64 oldval, u64 val, u64 mask);

static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 \ /
  Last update: 2020-03-23 02:06    [W:0.088 / U:4.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site