aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/mm')
-rw-r--r--arch/sparc64/mm/init.c5
-rw-r--r--arch/sparc64/mm/tsb.c11
2 files changed, 1 insertions, 15 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 4893f3e2c336..1af63307b24f 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -261,7 +261,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p
261 struct page *page; 261 struct page *page;
262 unsigned long pfn; 262 unsigned long pfn;
263 unsigned long pg_flags; 263 unsigned long pg_flags;
264 unsigned long mm_rss;
265 264
266 pfn = pte_pfn(pte); 265 pfn = pte_pfn(pte);
267 if (pfn_valid(pfn) && 266 if (pfn_valid(pfn) &&
@@ -285,10 +284,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p
285 } 284 }
286 285
287 mm = vma->vm_mm; 286 mm = vma->vm_mm;
288 mm_rss = get_mm_rss(mm);
289 if (mm_rss >= mm->context.tsb_rss_limit)
290 tsb_grow(mm, mm_rss, GFP_ATOMIC);
291
292 if ((pte_val(pte) & _PAGE_ALL_SZ_BITS) == _PAGE_SZBITS) { 287 if ((pte_val(pte) & _PAGE_ALL_SZ_BITS) == _PAGE_SZBITS) {
293 struct tsb *tsb; 288 struct tsb *tsb;
294 unsigned long tag; 289 unsigned long tag;
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c
index 787533f01049..2cc8e6528c63 100644
--- a/arch/sparc64/mm/tsb.c
+++ b/arch/sparc64/mm/tsb.c
@@ -310,7 +310,6 @@ void tsb_grow(struct mm_struct *mm, unsigned long rss, gfp_t gfp_flags)
310 310
311int init_new_context(struct task_struct *tsk, struct mm_struct *mm) 311int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
312{ 312{
313 unsigned long initial_rss;
314 313
315 mm->context.sparc64_ctx_val = 0UL; 314 mm->context.sparc64_ctx_val = 0UL;
316 315
@@ -319,15 +318,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
319 * will be confused and think there is an older TSB to free up. 318 * will be confused and think there is an older TSB to free up.
320 */ 319 */
321 mm->context.tsb = NULL; 320 mm->context.tsb = NULL;
322 321 tsb_grow(mm, 0, GFP_KERNEL);
323 /* If this is fork, inherit the parent's TSB size. We would
324 * grow it to that size on the first page fault anyways.
325 */
326 initial_rss = mm->context.tsb_nentries;
327 if (initial_rss)
328 initial_rss -= 1;
329
330 tsb_grow(mm, initial_rss, GFP_KERNEL);
331 322
332 if (unlikely(!mm->context.tsb)) 323 if (unlikely(!mm->context.tsb))
333 return -ENOMEM; 324 return -ENOMEM;