summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2002-05-15 12:09:13 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-05-15 12:09:13 -0700
commit4cc4c6970e6573cc6a671f44de95097217a2be50 (patch)
tree1140f828df89a4239c3a75660a8daaef46e5035c /include
parente9d00e5cb88db3f2d29aa89938e90e4011b735f2 (diff)
Fix up some more TLB shootdown issues.
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/tlb.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index 0e5c08cec926..0b7dc666fecf 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -44,11 +44,18 @@ extern mmu_gather_t mmu_gathers[NR_CPUS];
static inline mmu_gather_t *tlb_gather_mmu(struct mm_struct *mm)
{
mmu_gather_t *tlb = &mmu_gathers[smp_processor_id()];
+ unsigned long nr;
tlb->mm = mm;
tlb->freed = 0;
- /* Use fast mode if there is only one user of this mm (this process) */
- tlb->nr = (atomic_read(&(mm)->mm_users) == 1) ? ~0UL : 0UL;
+
+ /* Use fast mode if this MM only exists on this CPU */
+ nr = ~0UL;
+#ifdef CONFIG_SMP
+ if (mm->cpu_vm_mask != (1<<smp_processor_id()))
+ nr = 0UL;
+#endif
+ tlb->nr = nr;
return tlb;
}