linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can't flush tlb on e500
@ 2009-05-20 10:12 Saito Hideo
  2009-05-22  0:57 ` Hideo Saito
  2009-05-22  9:27 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 5+ messages in thread
From: Saito Hideo @ 2009-05-20 10:12 UTC (permalink / raw)
  To: linux-kernel

It seems that the code for powerpc with e500 on linux-2.6.29 has an
regression, because I can't execute hackbench on my platform. I
apologize if already reported.

For example, following message was asserted, however the command is
done successfully if the number given to hackbench is small.

% ./hackbench 20
SERVER: read (error: Bad file descriptor)

% ./hackbench 4
%

I think that the tlb should be cleared before mm->context.id is set
MMU_NO_CONTEXT.

--- arch/powerpc/mm/mmu_context_nohash.c.orig	2009-03-24
08:12:14.000000000 +0900
+++ arch/powerpc/mm/mmu_context_nohash.c	2009-05-20 18:33:53.000000000 +0900
@@ -122,22 +122,22 @@ static unsigned int steal_context_up(uns
 	struct mm_struct *mm;
 	int cpu = smp_processor_id();

 	/* Pick up the victim mm */
 	mm = context_mm[id];

 	pr_debug("[%d] steal context %d from mm @%p\n", cpu, id, mm);

-	/* Mark this mm has having no context anymore */
-	mm->context.id = MMU_NO_CONTEXT;
-
 	/* Flush the TLB for that context */
 	local_flush_tlb_mm(mm);

+	/* Mark this mm has having no context anymore */
+	mm->context.id = MMU_NO_CONTEXT;
+
 	/* XXX This clear should ultimately be part of local_flush_tlb_mm */
 	__clear_bit(id, stale_map[cpu]);

 	return id;
 }

 #ifdef DEBUG_MAP_CONSISTENCY
 static void context_check_map(void)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-22  9:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-20 10:12 can't flush tlb on e500 Saito Hideo
2009-05-22  0:57 ` Hideo Saito
2009-05-22  9:20   ` Benjamin Herrenschmidt
2009-05-22  9:27 ` Benjamin Herrenschmidt
2009-05-22  9:42   ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).