aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-10-29 21:16:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 00:40:37 -0400
commit4d6ddfa9242bc3d27fb0f7248f6fdee0299c731f (patch)
treeda5b753df64e7163a35487005e50a3b90b0b0b9b /include/asm-sparc64
parent15a23ffa2fc91cebdac44d4aee994f59d5c28dc0 (diff)
[PATCH] mm: tlb_is_full_mm was obscure
tlb_is_full_mm? What does that mean? The TLB is full? No, it means that the mm's last user has gone and the whole mm is being torn down. And it's an inline function because sparc64 uses a different (slightly better) "tlb_frozen" name for the flag others call "fullmm". And now the ptep_get_and_clear_full macro used in zap_pte_range refers directly to tlb->fullmm, which would be wrong for sparc64. Rather than correct that, I'd prefer to scrap tlb_is_full_mm altogether, and change sparc64 to just use the same poor name as everyone else - is that okay? Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/tlb.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h
index 169309bdbf82..5d194eae870c 100644
--- a/include/asm-sparc64/tlb.h
+++ b/include/asm-sparc64/tlb.h
@@ -25,7 +25,7 @@ struct mmu_gather {
25 struct mm_struct *mm; 25 struct mm_struct *mm;
26 unsigned int pages_nr; 26 unsigned int pages_nr;
27 unsigned int need_flush; 27 unsigned int need_flush;
28 unsigned int tlb_frozen; 28 unsigned int fullmm;
29 unsigned int tlb_nr; 29 unsigned int tlb_nr;
30 unsigned long freed; 30 unsigned long freed;
31 unsigned long vaddrs[TLB_BATCH_NR]; 31 unsigned long vaddrs[TLB_BATCH_NR];
@@ -50,7 +50,7 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, unsigned i
50 50
51 mp->mm = mm; 51 mp->mm = mm;
52 mp->pages_nr = num_online_cpus() > 1 ? 0U : ~0U; 52 mp->pages_nr = num_online_cpus() > 1 ? 0U : ~0U;
53 mp->tlb_frozen = full_mm_flush; 53 mp->fullmm = full_mm_flush;
54 mp->freed = 0; 54 mp->freed = 0;
55 55
56 return mp; 56 return mp;
@@ -88,10 +88,10 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un
88 88
89 tlb_flush_mmu(mp); 89 tlb_flush_mmu(mp);
90 90
91 if (mp->tlb_frozen) { 91 if (mp->fullmm) {
92 if (CTX_VALID(mm->context)) 92 if (CTX_VALID(mm->context))
93 do_flush_tlb_mm(mm); 93 do_flush_tlb_mm(mm);
94 mp->tlb_frozen = 0; 94 mp->fullmm = 0;
95 } else 95 } else
96 flush_tlb_pending(); 96 flush_tlb_pending();
97 97
@@ -101,11 +101,6 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un
101 put_cpu_var(mmu_gathers); 101 put_cpu_var(mmu_gathers);
102} 102}
103 103
104static inline unsigned int tlb_is_full_mm(struct mmu_gather *mp)
105{
106 return mp->tlb_frozen;
107}
108
109static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page) 104static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page)
110{ 105{
111 mp->need_flush = 1; 106 mp->need_flush = 1;