From 0faa91fd7b1fb0ecc2251fbdc3c695aaf78b2389 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 27 Apr 2003 19:30:54 +0100 Subject: [PATCH] [ARM] Make tlb_start_vma() flush the cache --- include/asm-arm/tlb.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/asm-arm/tlb.h b/include/asm-arm/tlb.h index af703647cefd7..f0ab134d99cff 100644 --- a/include/asm-arm/tlb.h +++ b/include/asm-arm/tlb.h @@ -18,6 +18,7 @@ #define __ASMARM_TLB_H #include +#include /* * TLB handling. This allows us to remove pages from the page @@ -26,6 +27,7 @@ struct mmu_gather { struct mm_struct *mm; unsigned int freed; + unsigned int fullmm; unsigned int flushes; unsigned int avoided_flushes; @@ -41,6 +43,7 @@ tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) tlb->mm = mm; tlb->freed = 0; + tlb->fullmm = full_mm_flush; return tlb; } @@ -68,7 +71,13 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) } #define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0) -#define tlb_start_vma(tlb,vma) do { } while (0) + +#define tlb_start_vma(tlb,vma) \ + do { \ + if (!tlb->fullmm) \ + flush_cache_range(vma, vma->vm_start, vma->vm_end); \ + } while (0) + #define tlb_end_vma(tlb,vma) do { } while (0) #define tlb_remove_page(tlb,page) free_page_and_swap_cache(page) -- 2.53.0