]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/asm-generic/tlb.h
mm, x86: add support for PUD-sized transparent hugepages
[mirror_ubuntu-artful-kernel.git] / include / asm-generic / tlb.h
index 7eed8cf3130ada017b658649f543aba980085da1..4329bc6ef04b7b555337dc2f558ff7d7321668c4 100644 (file)
@@ -232,6 +232,20 @@ static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb,
                __tlb_remove_pmd_tlb_entry(tlb, pmdp, address);         \
        } while (0)
 
+/**
+ * tlb_remove_pud_tlb_entry - remember a pud mapping for later tlb
+ * invalidation. This is a nop so far, because only x86 needs it.
+ */
+#ifndef __tlb_remove_pud_tlb_entry
+#define __tlb_remove_pud_tlb_entry(tlb, pudp, address) do {} while (0)
+#endif
+
+#define tlb_remove_pud_tlb_entry(tlb, pudp, address)                   \
+       do {                                                            \
+               __tlb_adjust_range(tlb, address, HPAGE_PUD_SIZE);       \
+               __tlb_remove_pud_tlb_entry(tlb, pudp, address);         \
+       } while (0)
+
 /*
  * For things like page tables caches (ie caching addresses "inside" the
  * page tables, like x86 does), for legacy reasons, flushing an