diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-11-27 15:05:05 -0500 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2008-12-03 04:46:35 -0500 |
| commit | 4ee5f55175a85fc179c93f00dd7f6a99c896f4d6 (patch) | |
| tree | bd85e5ec3a21c6ca139e930b5215e3c083f4b170 | |
| parent | 1b98326b91eb9eea346945779e1f245aa66b17ce (diff) | |
powerpc: Fix ppc32 mm_struct CPU tracking in SMP
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>
| -rw-r--r-- | arch/powerpc/include/asm/mmu_context.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index 6b993ef452ff..b570209b71a8 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h | |||
| @@ -180,6 +180,9 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
| 180 | 180 | ||
| 181 | tsk->thread.pgdir = next->pgd; | 181 | tsk->thread.pgdir = next->pgd; |
| 182 | 182 | ||
| 183 | if (!cpu_isset(smp_processor_id(), next->cpu_vm_mask)) | ||
| 184 | cpu_set(smp_processor_id(), next->cpu_vm_mask); | ||
| 185 | |||
| 183 | /* No need to flush userspace segments if the mm doesnt change */ | 186 | /* No need to flush userspace segments if the mm doesnt change */ |
| 184 | if (prev == next) | 187 | if (prev == next) |
| 185 | return; | 188 | return; |
