Lines Matching refs:tlb
3 * Based on arch/arm/include/asm/tlb.h
20 static void tlb_flush(struct mmu_gather *tlb);
22 #include <asm-generic/tlb.h>
29 static inline int tlb_get_level(struct mmu_gather *tlb)
32 if (tlb->freed_tables)
35 if (tlb->cleared_ptes && !(tlb->cleared_pmds ||
36 tlb->cleared_puds ||
37 tlb->cleared_p4ds))
40 if (tlb->cleared_pmds && !(tlb->cleared_ptes ||
41 tlb->cleared_puds ||
42 tlb->cleared_p4ds))
45 if (tlb->cleared_puds && !(tlb->cleared_ptes ||
46 tlb->cleared_pmds ||
47 tlb->cleared_p4ds))
53 static inline void tlb_flush(struct mmu_gather *tlb)
55 struct vm_area_struct vma = TLB_FLUSH_VMA(tlb->mm, 0);
56 bool last_level = !tlb->freed_tables;
57 unsigned long stride = tlb_get_unmap_size(tlb);
58 int tlb_level = tlb_get_level(tlb);
65 if (tlb->fullmm) {
67 flush_tlb_mm(tlb->mm);
71 __flush_tlb_range(&vma, tlb->start, tlb->end, stride,
75 static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte,
81 tlb_remove_ptdesc(tlb, ptdesc);
85 static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp,
91 tlb_remove_ptdesc(tlb, ptdesc);
96 static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pudp,
99 tlb_remove_ptdesc(tlb, virt_to_ptdesc(pudp));