From: Dave Kleikamp Date: Tue, 18 Jun 2013 14:05:36 +0000 (-0500) Subject: sparc: tsb must be flushed before tlb X-Git-Tag: v3.0.88~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=519d018ae15412bd501598872300d4c883197b44;p=thirdparty%2Fkernel%2Fstable.git sparc: tsb must be flushed before tlb upstream commit 23a01138efe216f8084cfaa74b0b90dd4b097441 This fixes a race where a cpu may re-load a tlb from a stale tsb right after it has been flushed by a remote function call. I still see some instability when stressing the system with parallel kernel builds while creating memory pressure by writing to /proc/sys/vm/nr_hugepages, but this patch improves the stability significantly. Signed-off-by: Dave Kleikamp Acked-by: Bob Picco Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c index afd021ed94181..072f5530373e0 100644 --- a/arch/sparc/mm/tlb.c +++ b/arch/sparc/mm/tlb.c @@ -115,8 +115,8 @@ no_cache_flush: } if (!tb->active) { - global_flush_tlb_page(mm, vaddr); flush_tsb_user_page(mm, vaddr); + global_flush_tlb_page(mm, vaddr); goto out; }