0001
0002 #ifndef _ASM_X86_TLB_H
0003 #define _ASM_X86_TLB_H
0004
0005 #define tlb_flush tlb_flush
0006 static inline void tlb_flush(struct mmu_gather *tlb);
0007
0008 #include <asm-generic/tlb.h>
0009
0010 static inline void tlb_flush(struct mmu_gather *tlb)
0011 {
0012 unsigned long start = 0UL, end = TLB_FLUSH_ALL;
0013 unsigned int stride_shift = tlb_get_unmap_shift(tlb);
0014
0015 if (!tlb->fullmm && !tlb->need_flush_all) {
0016 start = tlb->start;
0017 end = tlb->end;
0018 }
0019
0020 flush_tlb_mm_range(tlb->mm, start, end, stride_shift, tlb->freed_tables);
0021 }
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 static inline void __tlb_remove_table(void *table)
0033 {
0034 free_page_and_swap_cache(table);
0035 }
0036
0037 #endif