4 #include <asm/pgalloc.h>
5 #include <asm/tlbflush.h>
6 #include <linux/vs_memory.h>
9 * TLB handling. This allows us to remove pages from the page
10 * tables, and efficiently handle the TLB issues.
14 unsigned int need_flush;
18 DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);
20 static inline struct mmu_gather *
21 tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
23 struct mmu_gather *tlb = &get_cpu_var(mmu_gathers);
27 tlb->fullmm = full_mm_flush;
33 tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
36 flush_tlb_mm(tlb->mm);
38 /* keep the page table cache within bounds */
41 put_cpu_var(mmu_gathers);
44 #define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0)
45 //#define tlb_start_vma(tlb,vma) do { } while (0)
46 //FIXME - ARM32 uses this now that things changed in the kernel. seems like it may be pointless on arm26, however to get things compiling...
47 #define tlb_start_vma(tlb,vma) \
50 flush_cache_range(vma, vma->vm_start, vma->vm_end); \
52 #define tlb_end_vma(tlb,vma) do { } while (0)
55 tlb_remove_page(struct mmu_gather *tlb, struct page *page)
58 free_page_and_swap_cache(page);
61 #define pte_free_tlb(tlb,ptep) pte_free(ptep)
62 #define pmd_free_tlb(tlb,pmdp) pmd_free(pmdp)