4 #include <asm/tlbflush.h>
7 * TLB handling. This allows us to remove pages from the page
8 * tables, and efficiently handle the TLB issues.
15 unsigned int avoided_flushes;
18 extern struct mmu_gather mmu_gathers[NR_CPUS];
20 static inline struct mmu_gather *
21 tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
23 int cpu = smp_processor_id();
24 struct mmu_gather *tlb = &mmu_gathers[cpu];
33 tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
35 struct mm_struct *mm = tlb->mm;
36 unsigned long freed = tlb->freed;
41 // mm->rss = rss - freed;
42 vx_rsspages_sub(mm, freed);
48 tlb->avoided_flushes++;
51 /* keep the page table cache within bounds */
55 #define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0)
56 #define tlb_start_vma(tlb,vma) do { } while (0)
57 #define tlb_end_vma(tlb,vma) do { } while (0)
59 #define tlb_remove_page(tlb,page) free_page_and_swap_cache(page)
60 #define pte_free_tlb(tlb,ptep) pte_free(ptep)
61 #define pmd_free_tlb(tlb,pmdp) pmd_free(pmdp)