Skip to content

Commit

Permalink
powerpc: Fix ppc32 mm_struct CPU tracking in SMP
Browse files Browse the repository at this point in the history
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 will break when we
merge the RCU based page table freeing patch and other upcoming 32-bit
embedded SMP work, so this adds the update.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Dec 3, 2008
1 parent 1b98326 commit 4ee5f55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,

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;
Expand Down

0 comments on commit 4ee5f55

Please sign in to comment.