diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-05-17 09:34:29 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-05-17 09:34:29 -0700 |
| commit | 5200ffe87371053eaf7eb195fa01944ccaa20c67 (patch) | |
| tree | 832b1711fef6faa5a2d8ea34ccea0206cc78a7f4 /include | |
| parent | 4cc4c6970e6573cc6a671f44de95097217a2be50 (diff) | |
Cleanup munmap a lot. Fix Intel P4 TLB corruptions on SMP.
Special thanks to Intel for support and traces.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/tlb.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index 0b7dc666fecf..778990a36b41 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -44,18 +44,12 @@ 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 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; + /* Use fast mode if only one CPU is online */ + tlb->nr = smp_num_cpus > 1 ? 0UL : ~0UL; return tlb; } |
