diff options
Diffstat (limited to 'include/asm-sparc64/tlb.h')
-rw-r--r-- | include/asm-sparc64/tlb.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h index 5d194eae870c..66138d959df5 100644 --- a/include/asm-sparc64/tlb.h +++ b/include/asm-sparc64/tlb.h | |||
@@ -27,7 +27,6 @@ struct mmu_gather { | |||
27 | unsigned int need_flush; | 27 | unsigned int need_flush; |
28 | unsigned int fullmm; | 28 | unsigned int fullmm; |
29 | unsigned int tlb_nr; | 29 | unsigned int tlb_nr; |
30 | unsigned long freed; | ||
31 | unsigned long vaddrs[TLB_BATCH_NR]; | 30 | unsigned long vaddrs[TLB_BATCH_NR]; |
32 | struct page *pages[FREE_PTE_NR]; | 31 | struct page *pages[FREE_PTE_NR]; |
33 | }; | 32 | }; |
@@ -51,7 +50,6 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, unsigned i | |||
51 | mp->mm = mm; | 50 | mp->mm = mm; |
52 | mp->pages_nr = num_online_cpus() > 1 ? 0U : ~0U; | 51 | mp->pages_nr = num_online_cpus() > 1 ? 0U : ~0U; |
53 | mp->fullmm = full_mm_flush; | 52 | mp->fullmm = full_mm_flush; |
54 | mp->freed = 0; | ||
55 | 53 | ||
56 | return mp; | 54 | return mp; |
57 | } | 55 | } |
@@ -78,19 +76,11 @@ extern void smp_flush_tlb_mm(struct mm_struct *mm); | |||
78 | 76 | ||
79 | static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, unsigned long end) | 77 | static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, unsigned long end) |
80 | { | 78 | { |
81 | unsigned long freed = mp->freed; | ||
82 | struct mm_struct *mm = mp->mm; | ||
83 | unsigned long rss = get_mm_counter(mm, rss); | ||
84 | |||
85 | if (rss < freed) | ||
86 | freed = rss; | ||
87 | add_mm_counter(mm, rss, -freed); | ||
88 | |||
89 | tlb_flush_mmu(mp); | 79 | tlb_flush_mmu(mp); |
90 | 80 | ||
91 | if (mp->fullmm) { | 81 | if (mp->fullmm) { |
92 | if (CTX_VALID(mm->context)) | 82 | if (CTX_VALID(mp->mm->context)) |
93 | do_flush_tlb_mm(mm); | 83 | do_flush_tlb_mm(mp->mm); |
94 | mp->fullmm = 0; | 84 | mp->fullmm = 0; |
95 | } else | 85 | } else |
96 | flush_tlb_pending(); | 86 | flush_tlb_pending(); |