]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/x86/mm/pgtable.c
mm/vmalloc: add interfaces to free unmapped page table
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / mm / pgtable.c
index 004abf9ebf1222c169448090f7f1c570635bce41..1eed7ed518e6862ecf27f6fcf674f788e0cabd1f 100644 (file)
@@ -702,4 +702,28 @@ int pmd_clear_huge(pmd_t *pmd)
 
        return 0;
 }
+
+/**
+ * pud_free_pmd_page - Clear pud entry and free pmd page.
+ * @pud: Pointer to a PUD.
+ *
+ * Context: The pud range has been unmaped and TLB purged.
+ * Return: 1 if clearing the entry succeeded. 0 otherwise.
+ */
+int pud_free_pmd_page(pud_t *pud)
+{
+       return pud_none(*pud);
+}
+
+/**
+ * pmd_free_pte_page - Clear pmd entry and free pte page.
+ * @pmd: Pointer to a PMD.
+ *
+ * Context: The pmd range has been unmaped and TLB purged.
+ * Return: 1 if clearing the entry succeeded. 0 otherwise.
+ */
+int pmd_free_pte_page(pmd_t *pmd)
+{
+       return pmd_none(*pmd);
+}
 #endif /* CONFIG_HAVE_ARCH_HUGE_VMAP */