linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: <linuxppc-dev@ozlabs.org>
Cc: Kumar Gala <kumar.gala@freescale.com>
Subject: [PATCH] powerpc: Fix ppc32 mm_struct CPU tracking in SMP
Date: Fri, 28 Nov 2008 17:05:05 +1100	[thread overview]
Message-ID: <20081128060533.BA31ADDDDB@ozlabs.org> (raw)

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;

                 reply	other threads:[~2008-11-28  6:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081128060533.BA31ADDDDB@ozlabs.org \
    --to=benh@kernel.crashing.org \
    --cc=kumar.gala@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).