4 #include <asm/pgalloc.h>
5 #include <asm/tlbflush.h>
8 * TLB handling. This allows us to remove pages from the page
9 * tables, and efficiently handle the TLB issues.
16 unsigned int avoided_flushes;
19 extern struct mmu_gather mmu_gathers[NR_CPUS];
21 static inline struct mmu_gather *
22 tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
24 int cpu = smp_processor_id();
25 struct mmu_gather *tlb = &mmu_gathers[cpu];
34 tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
36 struct mm_struct *mm = tlb->mm;
37 unsigned long freed = tlb->freed;
42 mm->rss = rss - 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)