vserver 2.0-rc4
[linux-2.6.git] / include / asm-generic / tlb.h
index aa7d3c0..c9948d4 100644 (file)
@@ -15,7 +15,8 @@
 
 #include <linux/config.h>
 #include <linux/swap.h>
-#include <linux/vinline.h>
+#include <linux/vs_memory.h>
+#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 
 /*
@@ -92,7 +93,6 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
 
        if (rss < freed)
                freed = rss;
-       // mm->rss = rss - freed;
        vx_rsspages_sub(mm, freed);
        tlb_flush_mmu(tlb, start, end);
 
@@ -142,10 +142,20 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
                __pte_free_tlb(tlb, ptep);                      \
        } while (0)
 
+#ifndef __ARCH_HAS_4LEVEL_HACK
+#define pud_free_tlb(tlb, pudp)                                        \
+       do {                                                    \
+               tlb->need_flush = 1;                            \
+               __pud_free_tlb(tlb, pudp);                      \
+       } while (0)
+#endif
+
 #define pmd_free_tlb(tlb, pmdp)                                        \
        do {                                                    \
                tlb->need_flush = 1;                            \
                __pmd_free_tlb(tlb, pmdp);                      \
        } while (0)
 
+#define tlb_migrate_finish(mm) do {} while (0)
+
 #endif /* _ASM_GENERIC__TLB_H */