aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-11-07 17:12:08 -0500
committerDavid S. Miller <davem@davemloft.net>2005-11-07 17:12:08 -0500
commit59871bcd1197014aacdf8e398c407cab70ab74e7 (patch)
tree60786608e4c09dfa5b0d10952f1ab45564f927f5
parent261b033afc2db37ad371263db2e1316f37c8ed51 (diff)
[SPARC64] mm: simpler tlb_flush_mmu
Minor simplification to the sparc64 tlb_flush_mmu: tlb_remove_page set need_flush only after handling the tlb_fast_mode case, then tlb_flush_mmu need not consider whether it's tlb_fast_mode. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/asm-sparc64/tlb.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h
index 1eda17954f39..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}
@@ -91,11 +89,11 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un
91 89
92static 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)
93{ 91{
94 mp->need_flush = 1;
95 if (tlb_fast_mode(mp)) { 92 if (tlb_fast_mode(mp)) {
96 free_page_and_swap_cache(page); 93 free_page_and_swap_cache(page);
97 return; 94 return;
98 } 95 }
96 mp->need_flush = 1;
99 mp->pages[mp->pages_nr++] = page; 97 mp->pages[mp->pages_nr++] = page;
100 if (mp->pages_nr >= FREE_PTE_NR) 98 if (mp->pages_nr >= FREE_PTE_NR)
101 tlb_flush_mmu(mp); 99 tlb_flush_mmu(mp);