All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix ppc32 mm_struct CPU tracking in SMP
@ 2008-11-28  6:05 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2008-11-28  6:05 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Kumar Gala

The 32-bit hash code didn't need it so far so we don't update
mm->cpu_vm_mask on context switch. This however breaks the
merge of the RCU based page table freeing and other upcoming
32-bit embedded SMP work.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 arch/powerpc/include/asm/mmu_context.h |    3 +++
 1 file changed, 3 insertions(+)

--- linux-476.orig/arch/powerpc/include/asm/mmu_context.h	2008-11-28 15:46:39.000000000 +1100
+++ linux-476/arch/powerpc/include/asm/mmu_context.h	2008-11-28 16:59:06.000000000 +1100
@@ -186,6 +186,9 @@ static inline void switch_mm(struct mm_s
 
 	tsk->thread.pgdir = next->pgd;
 
+	if (!cpu_isset(smp_processor_id(), next->cpu_vm_mask))
+		cpu_set(smp_processor_id(), next->cpu_vm_mask);
+
 	/* No need to flush userspace segments if the mm doesnt change */
 	if (prev == next)
 		return;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-28  6:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28  6:05 [PATCH] powerpc: Fix ppc32 mm_struct CPU tracking in SMP Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.