aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/tlb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/tlb.h')
-rw-r--r--include/asm-generic/tlb.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index 3063125197ad..b3353e21f3b3 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -15,6 +15,7 @@
15#ifndef _ASM_GENERIC__TLB_H 15#ifndef _ASM_GENERIC__TLB_H
16#define _ASM_GENERIC__TLB_H 16#define _ASM_GENERIC__TLB_H
17 17
18#include <linux/mmu_notifier.h>
18#include <linux/swap.h> 19#include <linux/swap.h>
19#include <asm/pgalloc.h> 20#include <asm/pgalloc.h>
20#include <asm/tlbflush.h> 21#include <asm/tlbflush.h>
@@ -138,6 +139,16 @@ static inline void __tlb_reset_range(struct mmu_gather *tlb)
138 } 139 }
139} 140}
140 141
142static inline void tlb_flush_mmu_tlbonly(struct mmu_gather *tlb)
143{
144 if (!tlb->end)
145 return;
146
147 tlb_flush(tlb);
148 mmu_notifier_invalidate_range(tlb->mm, tlb->start, tlb->end);
149 __tlb_reset_range(tlb);
150}
151
141static inline void tlb_remove_page_size(struct mmu_gather *tlb, 152static inline void tlb_remove_page_size(struct mmu_gather *tlb,
142 struct page *page, int page_size) 153 struct page *page, int page_size)
143{ 154{
@@ -186,10 +197,8 @@ static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb,
186 197
187#define __tlb_end_vma(tlb, vma) \ 198#define __tlb_end_vma(tlb, vma) \
188 do { \ 199 do { \
189 if (!tlb->fullmm && tlb->end) { \ 200 if (!tlb->fullmm) \
190 tlb_flush(tlb); \ 201 tlb_flush_mmu_tlbonly(tlb); \
191 __tlb_reset_range(tlb); \
192 } \
193 } while (0) 202 } while (0)
194 203
195#ifndef tlb_end_vma 204#ifndef tlb_end_vma