aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/tlb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64/tlb.h')
-rw-r--r--include/asm-sparc64/tlb.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h
index 66138d959df5..61c01882b562 100644
--- a/include/asm-sparc64/tlb.h
+++ b/include/asm-sparc64/tlb.h
@@ -58,11 +58,9 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, unsigned i
58static inline void tlb_flush_mmu(struct mmu_gather *mp) 58static inline void tlb_flush_mmu(struct mmu_gather *mp)
59{ 59{
60 if (mp->need_flush) { 60 if (mp->need_flush) {
61 free_pages_and_swap_cache(mp->pages, mp->pages_nr);
62 mp->pages_nr = 0;
61 mp->need_flush = 0; 63 mp->need_flush = 0;
62 if (!tlb_fast_mode(mp)) {
63 free_pages_and_swap_cache(mp->pages, mp->pages_nr);
64 mp->pages_nr = 0;
65 }
66 } 64 }
67 65
68} 66}
@@ -78,11 +76,9 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un
78{ 76{
79 tlb_flush_mmu(mp); 77 tlb_flush_mmu(mp);
80 78
81 if (mp->fullmm) { 79 if (mp->fullmm)
82 if (CTX_VALID(mp->mm->context))
83 do_flush_tlb_mm(mp->mm);
84 mp->fullmm = 0; 80 mp->fullmm = 0;
85 } else 81 else
86 flush_tlb_pending(); 82 flush_tlb_pending();
87 83
88 /* keep the page table cache within bounds */ 84 /* keep the page table cache within bounds */
@@ -93,11 +89,11 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un
93 89
94static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page) 90static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page)
95{ 91{
96 mp->need_flush = 1;
97 if (tlb_fast_mode(mp)) { 92 if (tlb_fast_mode(mp)) {
98 free_page_and_swap_cache(page); 93 free_page_and_swap_cache(page);
99 return; 94 return;
100 } 95 }
96 mp->need_flush = 1;
101 mp->pages[mp->pages_nr++] = page; 97 mp->pages[mp->pages_nr++] = page;
102 if (mp->pages_nr >= FREE_PTE_NR) 98 if (mp->pages_nr >= FREE_PTE_NR)
103 tlb_flush_mmu(mp); 99 tlb_flush_mmu(mp);