diff options
Diffstat (limited to 'arch/arc/include/asm/tlb.h')
-rw-r--r-- | arch/arc/include/asm/tlb.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arc/include/asm/tlb.h b/arch/arc/include/asm/tlb.h index 3eb2ce0bdfa3..fe91719866a5 100644 --- a/arch/arc/include/asm/tlb.h +++ b/arch/arc/include/asm/tlb.h | |||
@@ -21,20 +21,28 @@ | |||
21 | 21 | ||
22 | #ifndef __ASSEMBLY__ | 22 | #ifndef __ASSEMBLY__ |
23 | 23 | ||
24 | #define tlb_flush(tlb) local_flush_tlb_mm((tlb)->mm) | 24 | #define tlb_flush(tlb) \ |
25 | do { \ | ||
26 | if (tlb->fullmm) \ | ||
27 | flush_tlb_mm((tlb)->mm); \ | ||
28 | } while (0) | ||
25 | 29 | ||
26 | /* | 30 | /* |
27 | * This pair is called at time of munmap/exit to flush cache and TLB entries | 31 | * This pair is called at time of munmap/exit to flush cache and TLB entries |
28 | * for mappings being torn down. | 32 | * for mappings being torn down. |
29 | * 1) cache-flush part -implemented via tlb_start_vma( ) can be NOP (for now) | 33 | * 1) cache-flush part -implemented via tlb_start_vma( ) can be NOP (for now) |
30 | * as we don't support aliasing configs in our VIPT D$. | 34 | * as we don't support aliasing configs in our VIPT D$. |
31 | * 2) tlb-flush part - implemted via tlb_end_vma( ) can be NOP as well- | 35 | * 2) tlb-flush part - implemted via tlb_end_vma( ) flushes the TLB range |
32 | * albiet for difft reasons - its better handled by moving to new ASID | ||
33 | * | 36 | * |
34 | * Note, read http://lkml.org/lkml/2004/1/15/6 | 37 | * Note, read http://lkml.org/lkml/2004/1/15/6 |
35 | */ | 38 | */ |
36 | #define tlb_start_vma(tlb, vma) | 39 | #define tlb_start_vma(tlb, vma) |
37 | #define tlb_end_vma(tlb, vma) | 40 | |
41 | #define tlb_end_vma(tlb, vma) \ | ||
42 | do { \ | ||
43 | if (!tlb->fullmm) \ | ||
44 | flush_tlb_range(vma, vma->vm_start, vma->vm_end); \ | ||
45 | } while (0) | ||
38 | 46 | ||
39 | #define __tlb_remove_tlb_entry(tlb, ptep, address) | 47 | #define __tlb_remove_tlb_entry(tlb, ptep, address) |
40 | 48 | ||