17 #ifndef __ASMARM_TLB_H
18 #define __ASMARM_TLB_H
20 #include <asm/cacheflush.h>
26 #define tlb_flush(tlb) ((void) tlb)
33 #include <asm/pgalloc.h>
34 #include <asm/tlbflush.h>
42 #if defined(CONFIG_SMP) || defined(CONFIG_CPU_32v7)
43 #define tlb_fast_mode(tlb) 0
45 #define tlb_fast_mode(tlb) 1
48 #define MMU_GATHER_BUNDLE 8
92 static inline void tlb_add_flush(
struct mmu_gather *tlb,
unsigned long addr)
102 static inline void __tlb_alloc_page(
struct mmu_gather *tlb)
107 tlb->
pages = (
void *)addr;
119 __tlb_alloc_page(tlb);
132 __tlb_alloc_page(tlb);
153 tlb_add_flush(tlb, addr);
188 return tlb->
max - tlb->
nr;
191 static inline void tlb_remove_page(
struct mmu_gather *tlb,
struct page *page)
200 pgtable_page_dtor(pte);
202 #ifdef CONFIG_ARM_LPAE
203 tlb_add_flush(tlb, addr);
211 tlb_add_flush(tlb, addr +
SZ_1M);
214 tlb_remove_page(tlb, pte);
220 #ifdef CONFIG_ARM_LPAE
221 tlb_add_flush(tlb, addr);
226 #define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr)
227 #define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr)
228 #define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp)
230 #define tlb_migrate_finish(mm) do { } while (0)