]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/mmu_notifier.h
mm, x86: add support for PUD-sized transparent hugepages
[karo-tx-linux.git] / include / linux / mmu_notifier.h
index a1a210d59961a855964b03ee9a7eae7c74d7c86f..51891fb0d3ce075e9343495e54de6d8d03211ac9 100644 (file)
@@ -381,6 +381,19 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
        ___pmd;                                                         \
 })
 
+#define pudp_huge_clear_flush_notify(__vma, __haddr, __pud)            \
+({                                                                     \
+       unsigned long ___haddr = __haddr & HPAGE_PUD_MASK;              \
+       struct mm_struct *___mm = (__vma)->vm_mm;                       \
+       pud_t ___pud;                                                   \
+                                                                       \
+       ___pud = pudp_huge_clear_flush(__vma, __haddr, __pud);          \
+       mmu_notifier_invalidate_range(___mm, ___haddr,                  \
+                                     ___haddr + HPAGE_PUD_SIZE);       \
+                                                                       \
+       ___pud;                                                         \
+})
+
 #define pmdp_huge_get_and_clear_notify(__mm, __haddr, __pmd)           \
 ({                                                                     \
        unsigned long ___haddr = __haddr & HPAGE_PMD_MASK;              \
@@ -475,6 +488,7 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
 #define pmdp_clear_young_notify pmdp_test_and_clear_young
 #define        ptep_clear_flush_notify ptep_clear_flush
 #define pmdp_huge_clear_flush_notify pmdp_huge_clear_flush
+#define pudp_huge_clear_flush_notify pudp_huge_clear_flush
 #define pmdp_huge_get_and_clear_notify pmdp_huge_get_and_clear
 #define set_pte_at_notify set_pte_at